|
@@ 7044-7057 (lines=14) @@
|
| 7041 |
|
$reflector = new \ReflectionClass($this); |
| 7042 |
|
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
| 7043 |
|
$docComment = $reflector->getDocComment(); |
| 7044 |
|
if ($docComment) { |
| 7045 |
|
$docblock = $factory->create($docComment); |
| 7046 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7047 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7048 |
|
$typeName = $tag->getVariableName(); |
| 7049 |
|
/** @var string|null $typeName */ |
| 7050 |
|
if ($typeName !== null) { |
| 7051 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7052 |
|
if ($typeCheckPhpDoc !== null) { |
| 7053 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7054 |
|
} |
| 7055 |
|
} |
| 7056 |
|
} |
| 7057 |
|
} |
| 7058 |
|
|
| 7059 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7060 |
|
while ($reflector = $reflector->getParentClass()) { |
|
@@ 7062-7079 (lines=18) @@
|
| 7059 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7060 |
|
while ($reflector = $reflector->getParentClass()) { |
| 7061 |
|
$docComment = $reflector->getDocComment(); |
| 7062 |
|
if ($docComment) { |
| 7063 |
|
$docblock = $factory->create($docComment); |
| 7064 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7065 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7066 |
|
$typeName = $tag->getVariableName(); |
| 7067 |
|
/** @var string|null $typeName */ |
| 7068 |
|
if ($typeName !== null) { |
| 7069 |
|
if (isset($properties[$typeName])) { |
| 7070 |
|
continue; |
| 7071 |
|
} |
| 7072 |
|
|
| 7073 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7074 |
|
if ($typeCheckPhpDoc !== null) { |
| 7075 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7076 |
|
} |
| 7077 |
|
} |
| 7078 |
|
} |
| 7079 |
|
} |
| 7080 |
|
} |
| 7081 |
|
|
| 7082 |
|
return $PROPERTY_CACHE[$cacheKey] = $properties; |