1
0
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:
Matt Brown 2020-11-05 09:29:20 -05:00
parent b3ff107c20
commit e9dd16f336
2 changed files with 14 additions and 5 deletions

View File

@ -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);

View File

@ -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