|
@@ 7185-7198 (lines=14) @@
|
| 7182 |
|
$reflector = new \ReflectionClass($this); |
| 7183 |
|
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
| 7184 |
|
$docComment = $reflector->getDocComment(); |
| 7185 |
|
if ($docComment) { |
| 7186 |
|
$docblock = $factory->create($docComment); |
| 7187 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7188 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7189 |
|
$typeName = $tag->getVariableName(); |
| 7190 |
|
/** @var string|null $typeName */ |
| 7191 |
|
if ($typeName !== null) { |
| 7192 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7193 |
|
if ($typeCheckPhpDoc !== null) { |
| 7194 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7195 |
|
} |
| 7196 |
|
} |
| 7197 |
|
} |
| 7198 |
|
} |
| 7199 |
|
|
| 7200 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7201 |
|
while ($reflector = $reflector->getParentClass()) { |
|
@@ 7203-7220 (lines=18) @@
|
| 7200 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7201 |
|
while ($reflector = $reflector->getParentClass()) { |
| 7202 |
|
$docComment = $reflector->getDocComment(); |
| 7203 |
|
if ($docComment) { |
| 7204 |
|
$docblock = $factory->create($docComment); |
| 7205 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7206 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7207 |
|
$typeName = $tag->getVariableName(); |
| 7208 |
|
/** @var string|null $typeName */ |
| 7209 |
|
if ($typeName !== null) { |
| 7210 |
|
if (isset($properties[$typeName])) { |
| 7211 |
|
continue; |
| 7212 |
|
} |
| 7213 |
|
|
| 7214 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7215 |
|
if ($typeCheckPhpDoc !== null) { |
| 7216 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7217 |
|
} |
| 7218 |
|
} |
| 7219 |
|
} |
| 7220 |
|
} |
| 7221 |
|
} |
| 7222 |
|
|
| 7223 |
|
return $PROPERTY_CACHE[$cacheKey] = $properties; |