@@ -261,7 +261,7 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
261261 }
262262
263263 if ($ node ->name instanceof Node \Identifier) {
264- $ propertyReflection = $ scope ->getPropertyReflection ($ fetchedOnType , $ node ->name ->toString ());
264+ $ propertyReflection = $ scope ->getInstancePropertyReflection ($ fetchedOnType , $ node ->name ->toString ());
265265 if ($ propertyReflection !== null ) {
266266 $ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
267267 }
@@ -377,13 +377,13 @@ public function resolveDependencies(Node $node, Scope $scope): NodeDependencies
377377 $ className = $ scope ->resolveName ($ node ->class );
378378 if ($ this ->reflectionProvider ->hasClass ($ className )) {
379379 $ 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 );
382382 $ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
383383 }
384384 }
385385 } else {
386- $ propertyReflection = $ scope ->getPropertyReflection ($ scope ->getType ($ node ->class ), $ node ->name ->toString ());
386+ $ propertyReflection = $ scope ->getStaticPropertyReflection ($ scope ->getType ($ node ->class ), $ node ->name ->toString ());
387387 if ($ propertyReflection !== null ) {
388388 $ this ->addClassToDependencies ($ propertyReflection ->getDeclaringClass ()->getName (), $ dependenciesReflections );
389389 }
0 commit comments