@@ 7422-7435 (lines=14) @@ | ||
7419 | $reflector = new \ReflectionClass($this); |
|
7420 | $factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
|
7421 | $docComment = $reflector->getDocComment(); |
|
7422 | if ($docComment) { |
|
7423 | $docblock = $factory->create($docComment); |
|
7424 | /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
|
7425 | foreach ($docblock->getTagsByName('property') as $tag) { |
|
7426 | $typeName = $tag->getVariableName(); |
|
7427 | /** @var string|null $typeName */ |
|
7428 | if ($typeName !== null) { |
|
7429 | $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
|
7430 | if ($typeCheckPhpDoc !== null) { |
|
7431 | $properties[$typeName] = $typeCheckPhpDoc; |
|
7432 | } |
|
7433 | } |
|
7434 | } |
|
7435 | } |
|
7436 | ||
7437 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
7438 | while ($reflector = $reflector->getParentClass()) { |
|
@@ 7440-7457 (lines=18) @@ | ||
7437 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
7438 | while ($reflector = $reflector->getParentClass()) { |
|
7439 | $docComment = $reflector->getDocComment(); |
|
7440 | if ($docComment) { |
|
7441 | $docblock = $factory->create($docComment); |
|
7442 | /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
|
7443 | foreach ($docblock->getTagsByName('property') as $tag) { |
|
7444 | $typeName = $tag->getVariableName(); |
|
7445 | /** @var string|null $typeName */ |
|
7446 | if ($typeName !== null) { |
|
7447 | if (isset($properties[$typeName])) { |
|
7448 | continue; |
|
7449 | } |
|
7450 | ||
7451 | $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
|
7452 | if ($typeCheckPhpDoc !== null) { |
|
7453 | $properties[$typeName] = $typeCheckPhpDoc; |
|
7454 | } |
|
7455 | } |
|
7456 | } |
|
7457 | } |
|
7458 | } |
|
7459 | ||
7460 | return $PROPERTY_CACHE[$cacheKey] = $properties; |