|
@@ 7204-7217 (lines=14) @@
|
| 7201 |
|
$reflector = new \ReflectionClass($this); |
| 7202 |
|
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
| 7203 |
|
$docComment = $reflector->getDocComment(); |
| 7204 |
|
if ($docComment) { |
| 7205 |
|
$docblock = $factory->create($docComment); |
| 7206 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7207 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7208 |
|
$typeName = $tag->getVariableName(); |
| 7209 |
|
/** @var string|null $typeName */ |
| 7210 |
|
if ($typeName !== null) { |
| 7211 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7212 |
|
if ($typeCheckPhpDoc !== null) { |
| 7213 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7214 |
|
} |
| 7215 |
|
} |
| 7216 |
|
} |
| 7217 |
|
} |
| 7218 |
|
|
| 7219 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7220 |
|
while ($reflector = $reflector->getParentClass()) { |
|
@@ 7222-7239 (lines=18) @@
|
| 7219 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7220 |
|
while ($reflector = $reflector->getParentClass()) { |
| 7221 |
|
$docComment = $reflector->getDocComment(); |
| 7222 |
|
if ($docComment) { |
| 7223 |
|
$docblock = $factory->create($docComment); |
| 7224 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7225 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7226 |
|
$typeName = $tag->getVariableName(); |
| 7227 |
|
/** @var string|null $typeName */ |
| 7228 |
|
if ($typeName !== null) { |
| 7229 |
|
if (isset($properties[$typeName])) { |
| 7230 |
|
continue; |
| 7231 |
|
} |
| 7232 |
|
|
| 7233 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7234 |
|
if ($typeCheckPhpDoc !== null) { |
| 7235 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7236 |
|
} |
| 7237 |
|
} |
| 7238 |
|
} |
| 7239 |
|
} |
| 7240 |
|
} |
| 7241 |
|
|
| 7242 |
|
return $PROPERTY_CACHE[$cacheKey] = $properties; |