@@ -813,35 +813,25 @@ public function getInstanceProperty(string $propertyName, ClassMemberAccessAnswe
813
813
return $ this ->instanceProperties [$ key ];
814
814
}
815
815
816
- public function getStaticProperty (string $ propertyName, ClassMemberAccessAnswerer $ scope ): ExtendedPropertyReflection
816
+ public function getStaticProperty (string $ propertyName ): ExtendedPropertyReflection
817
817
{
818
818
$ key = $ propertyName ;
819
- if ($ scope ->isInClass ()) {
820
- $ key = sprintf ('%s-%s ' , $ key , $ scope ->getClassReflection ()->getCacheKey ());
821
- }
822
819
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 ];
831
822
}
832
823
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 ;
838
827
}
839
828
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 ;
842
832
}
843
833
844
- return $ this ->staticProperties [ $ key ] ;
834
+ throw new MissingPropertyFromReflectionException ( $ this ->getName (), $ propertyName ) ;
845
835
}
846
836
847
837
public function hasNativeProperty (string $ propertyName ): bool
0 commit comments