mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix #4481 - ReflectionProperty implements Reflector
This commit is contained in:
parent
b3ff107c20
commit
e9dd16f336
@ -23,8 +23,17 @@ class DocblockParser
|
|||||||
// Strip off comments.
|
// Strip off comments.
|
||||||
$docblock = trim($docblock);
|
$docblock = trim($docblock);
|
||||||
|
|
||||||
$docblock = preg_replace('@^/\*\*@', '', $docblock);
|
if (substr($docblock, 0, 3) === '/**') {
|
||||||
$docblock = preg_replace('@\*\*?/$@', '', $docblock);
|
$docblock = substr($docblock, 3);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (substr($docblock, -2) === '*/') {
|
||||||
|
$docblock = substr($docblock, 0, -2);
|
||||||
|
|
||||||
|
if (substr($docblock, -1) === '*') {
|
||||||
|
$docblock = substr($docblock, 0, -1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Normalize multi-line @specials.
|
// Normalize multi-line @specials.
|
||||||
$lines = explode("\n", $docblock);
|
$lines = explode("\n", $docblock);
|
||||||
|
@ -2151,7 +2151,7 @@ class ReflectionClass implements Reflector {
|
|||||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReflectionFunction
|
class ReflectionFunction implements Reflector
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @since 8.0
|
* @since 8.0
|
||||||
@ -2162,7 +2162,7 @@ class ReflectionFunction
|
|||||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReflectionProperty
|
class ReflectionProperty implements Reflector
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @since 8.0
|
* @since 8.0
|
||||||
@ -2173,7 +2173,7 @@ class ReflectionProperty
|
|||||||
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
public function getAttributes(?string $name = null, int $flags = 0): array {}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReflectionMethod
|
class ReflectionMethod implements Reflector
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @since 8.0
|
* @since 8.0
|
||||||
|
Loading…
Reference in New Issue
Block a user