Skip to content

Commit d626d24

Browse files
authored
Merge pull request #8148 from BenMorel/reflectionproperty
Add ReflectionProperty properties
2 parents 9b4c8cb + 933714f commit d626d24

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

dictionaries/PropertyMap.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,10 @@
450450
'reflectionparameter' => [
451451
'name' => 'string',
452452
],
453+
'reflectionproperty' => [
454+
'name' => 'string',
455+
'class' => 'string',
456+
],
453457
'phpparser\\node\\expr\\array_' => [
454458
'items' => 'array<int, PhpParser\Node\Expr\ArrayItem|null>',
455459
],

src/Psalm/Internal/Codebase/Reflection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@ public function registerClass(ReflectionClass $reflected_class): void
133133
$storage->properties[$property_name]->visibility = ClassLikeAnalyzer::VISIBILITY_PRIVATE;
134134
}
135135

136-
$property_id = (string)$class_property->class . '::$' . $property_name;
136+
$property_id = $class_property->class . '::$' . $property_name;
137137

138-
$storage->declaring_property_ids[$property_name] = (string)$class_property->class;
138+
$storage->declaring_property_ids[$property_name] = $class_property->class;
139139
$storage->appearing_property_ids[$property_name] = $property_id;
140140

141141
if (!$class_property->isPrivate()) {

0 commit comments

Comments
 (0)