@@ -813,35 +813,24 @@ public function getInstanceProperty(string $propertyName, ClassMemberAccessAnswe
813813 return $ this ->instanceProperties [$ key ];
814814 }
815815
816- public function getStaticProperty (string $ propertyName, ClassMemberAccessAnswerer $ scope ): ExtendedPropertyReflection
816+ public function getStaticProperty (string $ propertyName ): ExtendedPropertyReflection
817817 {
818818 $ key = $ propertyName ;
819- if ($ scope ->isInClass ()) {
820- $ key = sprintf ('%s-%s ' , $ key , $ scope ->getClassReflection ()->getCacheKey ());
821- }
822-
823- if (!isset ($ this ->staticProperties [$ key ])) {
824- if ($ this ->getPhpExtension ()->hasStaticProperty ($ this , $ propertyName )) {
825- $ property = $ this ->wrapExtendedProperty ($ this ->getPhpExtension ()->getStaticProperty ($ this , $ propertyName ));
826- if ($ scope ->canReadProperty ($ property )) {
827- return $ this ->staticProperties [$ key ] = $ property ;
828- }
829- $ this ->staticProperties [$ key ] = $ property ;
830- }
819+ if (isset ($ this ->staticProperties [$ key ])) {
820+ return $ this ->staticProperties [$ key ];
831821 }
832822
833- if (!isset ($ this ->staticProperties [$ key ])) {
834- if ($ this ->requireExtendsPropertiesClassReflectionExtension ->hasStaticProperty ($ this , $ propertyName )) {
835- $ property = $ this ->requireExtendsPropertiesClassReflectionExtension ->getStaticProperty ($ this , $ propertyName );
836- $ this ->staticProperties [$ key ] = $ property ;
837- }
823+ if ($ this ->getPhpExtension ()->hasStaticProperty ($ this , $ propertyName )) {
824+ $ property = $ this ->wrapExtendedProperty ($ this ->getPhpExtension ()->getStaticProperty ($ this , $ propertyName ));
825+ return $ this ->staticProperties [$ key ] = $ property ;
838826 }
839827
840- if (!isset ($ this ->staticProperties [$ key ])) {
841- throw new MissingPropertyFromReflectionException ($ this ->getName (), $ propertyName );
828+ if ($ this ->requireExtendsPropertiesClassReflectionExtension ->hasStaticProperty ($ this , $ propertyName )) {
829+ $ property = $ this ->requireExtendsPropertiesClassReflectionExtension ->getStaticProperty ($ this , $ propertyName );
830+ return $ this ->staticProperties [$ key ] = $ property ;
842831 }
843832
844- return $ this ->staticProperties [ $ key ] ;
833+ throw new MissingPropertyFromReflectionException ( $ this ->getName (), $ propertyName ) ;
845834 }
846835
847836 public function hasNativeProperty (string $ propertyName ): bool
0 commit comments