|
@@ 7145-7158 (lines=14) @@
|
| 7142 |
|
$reflector = new \ReflectionClass($this); |
| 7143 |
|
$factory = \phpDocumentor\Reflection\DocBlockFactory::createInstance(); |
| 7144 |
|
$docComment = $reflector->getDocComment(); |
| 7145 |
|
if ($docComment) { |
| 7146 |
|
$docblock = $factory->create($docComment); |
| 7147 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7148 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7149 |
|
$typeName = $tag->getVariableName(); |
| 7150 |
|
/** @var string|null $typeName */ |
| 7151 |
|
if ($typeName !== null) { |
| 7152 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7153 |
|
if ($typeCheckPhpDoc !== null) { |
| 7154 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7155 |
|
} |
| 7156 |
|
} |
| 7157 |
|
} |
| 7158 |
|
} |
| 7159 |
|
|
| 7160 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7161 |
|
while ($reflector = $reflector->getParentClass()) { |
|
@@ 7163-7180 (lines=18) @@
|
| 7160 |
|
/** @noinspection PhpAssignmentInConditionInspection */ |
| 7161 |
|
while ($reflector = $reflector->getParentClass()) { |
| 7162 |
|
$docComment = $reflector->getDocComment(); |
| 7163 |
|
if ($docComment) { |
| 7164 |
|
$docblock = $factory->create($docComment); |
| 7165 |
|
/** @var \phpDocumentor\Reflection\DocBlock\Tags\Property $tag */ |
| 7166 |
|
foreach ($docblock->getTagsByName('property') as $tag) { |
| 7167 |
|
$typeName = $tag->getVariableName(); |
| 7168 |
|
/** @var string|null $typeName */ |
| 7169 |
|
if ($typeName !== null) { |
| 7170 |
|
if (isset($properties[$typeName])) { |
| 7171 |
|
continue; |
| 7172 |
|
} |
| 7173 |
|
|
| 7174 |
|
$typeCheckPhpDoc = TypeCheckPhpDoc::fromPhpDocumentorProperty($tag, $typeName); |
| 7175 |
|
if ($typeCheckPhpDoc !== null) { |
| 7176 |
|
$properties[$typeName] = $typeCheckPhpDoc; |
| 7177 |
|
} |
| 7178 |
|
} |
| 7179 |
|
} |
| 7180 |
|
} |
| 7181 |
|
} |
| 7182 |
|
|
| 7183 |
|
return $PROPERTY_CACHE[$cacheKey] = $properties; |