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