|
@@ 6573-6586 (lines=14) @@
|
| 6570 |
|
$reflector = new \ReflectionClass($this); |
| 6571 |
|
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
| 6572 |
|
$docComment = $reflector->getDocComment(); |
| 6573 |
|
if ($docComment) { |
| 6574 |
|
$docblock = $factory->create($docComment); |
| 6575 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 6576 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 6577 |
|
$typeName = $tag->getVariableName(); |
| 6578 |
|
/** @var string|null $typeName */ |
| 6579 |
|
if ($typeName !== null) { |
| 6580 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 6581 |
|
if ($typeCheckPhpDoc !== null) { |
| 6582 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 6583 |
|
} |
| 6584 |
|
} |
| 6585 |
|
} |
| 6586 |
|
} |
| 6587 |
|
|
| 6588 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 6589 |
|
while ($reflector = $reflector->getParentClass()) { |
|
@@ 6591-6608 (lines=18) @@
|
| 6588 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 6589 |
|
while ($reflector = $reflector->getParentClass()) { |
| 6590 |
|
$docComment = $reflector->getDocComment(); |
| 6591 |
|
if ($docComment) { |
| 6592 |
|
$docblock = $factory->create($docComment); |
| 6593 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 6594 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 6595 |
|
$typeName = $tag->getVariableName(); |
| 6596 |
|
/** @var string|null $typeName */ |
| 6597 |
|
if ($typeName !== null) { |
| 6598 |
|
if (isset($properties[$typeName])) { |
| 6599 |
|
continue; |
| 6600 |
|
} |
| 6601 |
|
|
| 6602 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 6603 |
|
if ($typeCheckPhpDoc !== null) { |
| 6604 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 6605 |
|
} |
| 6606 |
|
} |
| 6607 |
|
} |
| 6608 |
|
} |
| 6609 |
|
} |
| 6610 |
|
|
| 6611 |
|
return $PROPERTY_CACHE[$cacheKey] = $properties; |