@@ 7392-7405 (lines=14) @@ | ||
7389 | $reflector = new \ReflectionClass($this); |
|
7390 | $factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
|
7391 | $docComment = $reflector->getDocComment(); |
|
7392 | if ($docComment) { |
|
7393 | $docblock = $factory->create($docComment); |
|
7394 | /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
|
7395 | foreach ($docblock->getTagsByName('property') as $tag) { |
|
7396 | $typeName = $tag->getVariableName(); |
|
7397 | /** @var string|null $typeName */ |
|
7398 | if ($typeName !== null) { |
|
7399 | $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
|
7400 | if ($typeCheckPhpDoc !== null) { |
|
7401 | $properties[$typeName] = $typeCheckPhpDoc; |
|
7402 | } |
|
7403 | } |
|
7404 | } |
|
7405 | } |
|
7406 | ||
7407 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
7408 | while ($reflector = $reflector->getParentClass()) { |
|
@@ 7410-7427 (lines=18) @@ | ||
7407 | /** @noinspection PhpAssignmentInConditionInspection */ |
|
7408 | while ($reflector = $reflector->getParentClass()) { |
|
7409 | $docComment = $reflector->getDocComment(); |
|
7410 | if ($docComment) { |
|
7411 | $docblock = $factory->create($docComment); |
|
7412 | /** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
|
7413 | foreach ($docblock->getTagsByName('property') as $tag) { |
|
7414 | $typeName = $tag->getVariableName(); |
|
7415 | /** @var string|null $typeName */ |
|
7416 | if ($typeName !== null) { |
|
7417 | if (isset($properties[$typeName])) { |
|
7418 | continue; |
|
7419 | } |
|
7420 | ||
7421 | $typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
|
7422 | if ($typeCheckPhpDoc !== null) { |
|
7423 | $properties[$typeName] = $typeCheckPhpDoc; |
|
7424 | } |
|
7425 | } |
|
7426 | } |
|
7427 | } |
|
7428 | } |
|
7429 | ||
7430 | return $PROPERTY_CACHE[$cacheKey] = $properties; |