1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 13:51:54 +01:00

Merge pull request #8148 from BenMorel/reflectionproperty

Add ReflectionProperty properties
This commit is contained in:
orklah 2022-06-25 01:29:09 +02:00 committed by GitHub
commit d626d24241
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -450,6 +450,10 @@ return [
'reflectionparameter' => [
'name' => 'string',
],
'reflectionproperty' => [
'name' => 'string',
'class' => 'string',
],
'phpparser\\node\\expr\\array_' => [
'items' => 'array<int, PhpParser\Node\Expr\ArrayItem|null>',
],

View File

@ -133,9 +133,9 @@ class Reflection
$storage->properties[$property_name]->visibility = ClassLikeAnalyzer::VISIBILITY_PRIVATE;
}
$property_id = (string)$class_property->class . '::$' . $property_name;
$property_id = $class_property->class . '::$' . $property_name;
$storage->declaring_property_ids[$property_name] = (string)$class_property->class;
$storage->declaring_property_ids[$property_name] = $class_property->class;
$storage->appearing_property_ids[$property_name] = $property_id;
if (!$class_property->isPrivate()) {