@@ -261,7 +261,7 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
261
261
}
262
262
263
263
if ($ node ->name instanceof Node \Identifier) {
264
- $ propertyReflection = $ scope ->getPropertyReflection ($ fetchedOnType , $ node ->name ->toString ());
264
+ $ propertyReflection = $ scope ->getInstancePropertyReflection ($ fetchedOnType , $ node ->name ->toString ());
265
265
if ($ propertyReflection !== null ) {
266
266
$ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
267
267
}
@@ -377,13 +377,13 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
377
377
$ className = $ scope ->resolveName ($ node ->class );
378
378
if ($ this ->reflectionProvider ->hasClass ($ className )) {
379
379
$ propertyClassReflection = $ this ->reflectionProvider ->getClass ($ className );
380
- if ($ propertyClassReflection ->hasProperty ($ node ->name ->toString ())) {
381
- $ propertyReflection = $ propertyClassReflection ->getProperty ($ node ->name ->toString (), $ scope );
380
+ if ($ propertyClassReflection ->hasStaticProperty ($ node ->name ->toString ())) {
381
+ $ propertyReflection = $ propertyClassReflection ->getStaticProperty ($ node ->name ->toString (), $ scope );
382
382
$ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
383
383
}
384
384
}
385
385
} else {
386
- $ propertyReflection = $ scope ->getPropertyReflection ($ scope ->getType ($ node ->class ), $ node ->name ->toString ());
386
+ $ propertyReflection = $ scope ->getStaticPropertyReflection ($ scope ->getType ($ node ->class ), $ node ->name ->toString ());
387
387
if ($ propertyReflection !== null ) {
388
388
$ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
389
389
}
0 commit comments