@@ -813,35 +813,25 @@ 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- }
822819
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- }
820+ if (isset ($ this ->staticProperties [$ key ])) {
821+ return $ this ->staticProperties [$ key ];
831822 }
832823
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- }
824+ if ($ this ->getPhpExtension ()->hasStaticProperty ($ this , $ propertyName )) {
825+ $ property = $ this ->wrapExtendedProperty ($ this ->getPhpExtension ()->getStaticProperty ($ this , $ propertyName ));
826+ return $ this ->staticProperties [$ key ] = $ property ;
838827 }
839828
840- if (!isset ($ this ->staticProperties [$ key ])) {
841- throw new MissingPropertyFromReflectionException ($ this ->getName (), $ propertyName );
829+ if ($ this ->requireExtendsPropertiesClassReflectionExtension ->hasStaticProperty ($ this , $ propertyName )) {
830+ $ property = $ this ->requireExtendsPropertiesClassReflectionExtension ->getStaticProperty ($ this , $ propertyName );
831+ return $ this ->staticProperties [$ key ] = $ property ;
842832 }
843833
844- return $ this ->staticProperties [ $ key ] ;
834+ throw new MissingPropertyFromReflectionException ( $ this ->getName (), $ propertyName ) ;
845835 }
846836
847837 public function hasNativeProperty (string $ propertyName ): bool
0 commit comments