@@ -813,31 +813,21 @@ 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
823820 if (!isset ($ this ->staticProperties [$ key ])) {
824821 if ($ this ->getPhpExtension ()->hasStaticProperty ($ this , $ propertyName )) {
825822 $ 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 ;
823+ return $ this ->staticProperties [$ key ] = $ property ;
830824 }
831- }
832825
833- if (!isset ($ this ->staticProperties [$ key ])) {
834826 if ($ this ->requireExtendsPropertiesClassReflectionExtension ->hasStaticProperty ($ this , $ propertyName )) {
835827 $ property = $ this ->requireExtendsPropertiesClassReflectionExtension ->getStaticProperty ($ this , $ propertyName );
836- $ this ->staticProperties [$ key ] = $ property ;
828+ return $ this ->staticProperties [$ key ] = $ property ;
837829 }
838- }
839830
840- if (!isset ($ this ->staticProperties [$ key ])) {
841831 throw new MissingPropertyFromReflectionException ($ this ->getName (), $ propertyName );
842832 }
843833
0 commit comments