@@ -25,8 +25,8 @@ public static function strictGet(string $class, string $name): void
2525 {
2626 $ rc = new \ReflectionClass ($ class );
2727 $ hint = self ::getSuggestion (array_merge (
28- array_filter ($ rc ->getProperties (\ReflectionProperty::IS_PUBLIC ), function ($ p ) { return !$ p ->isStatic (); } ),
29- self ::parseFullDoc ($ rc , '~^[ \t*]*@property(?:-read)?[ \t]+(?:\S+[ \t]+)??\$(\w+)~m ' )
28+ array_filter ($ rc ->getProperties (\ReflectionProperty::IS_PUBLIC ), fn ($ p ) => !$ p ->isStatic ()),
29+ self ::parseFullDoc ($ rc , '~^[ \t*]*@property(?:-read)?[ \t]+(?:\S+[ \t]+)??\$(\w+)~m ' ),
3030 ), $ name );
3131 throw new MemberAccessException ("Cannot read an undeclared property $ class:: \$$ name " . ($ hint ? ", did you mean \$$ hint? " : '. ' ));
3232 }
@@ -37,8 +37,8 @@ public static function strictSet(string $class, string $name): void
3737 {
3838 $ rc = new \ReflectionClass ($ class );
3939 $ hint = self ::getSuggestion (array_merge (
40- array_filter ($ rc ->getProperties (\ReflectionProperty::IS_PUBLIC ), function ($ p ) { return !$ p ->isStatic (); } ),
41- self ::parseFullDoc ($ rc , '~^[ \t*]*@property(?:-write)?[ \t]+(?:\S+[ \t]+)??\$(\w+)~m ' )
40+ array_filter ($ rc ->getProperties (\ReflectionProperty::IS_PUBLIC ), fn ($ p ) => !$ p ->isStatic ()),
41+ self ::parseFullDoc ($ rc , '~^[ \t*]*@property(?:-write)?[ \t]+(?:\S+[ \t]+)??\$(\w+)~m ' ),
4242 ), $ name );
4343 throw new MemberAccessException ("Cannot write to an undeclared property $ class:: \$$ name " . ($ hint ? ", did you mean \$$ hint? " : '. ' ));
4444 }
@@ -67,7 +67,7 @@ public static function strictCall(string $class, string $method, array $addition
6767 $ hint = self ::getSuggestion (array_merge (
6868 get_class_methods ($ class ),
6969 self ::parseFullDoc (new \ReflectionClass ($ class ), '~^[ \t*]*@method[ \t]+(?:\S+[ \t]+)??(\w+)\(~m ' ),
70- $ additionalMethods
70+ $ additionalMethods,
7171 ), $ method );
7272 throw new MemberAccessException ("Call to undefined method $ class:: $ method() " . ($ hint ? ", did you mean $ hint()? " : '. ' ));
7373 }
@@ -95,8 +95,8 @@ public static function strictStaticCall(string $class, string $method): void
9595
9696 } else {
9797 $ hint = self ::getSuggestion (
98- array_filter ((new \ReflectionClass ($ class ))->getMethods (\ReflectionMethod::IS_PUBLIC ), function ($ m ) { return $ m ->isStatic (); } ),
99- $ method
98+ array_filter ((new \ReflectionClass ($ class ))->getMethods (\ReflectionMethod::IS_PUBLIC ), fn ($ m ) => $ m ->isStatic ()),
99+ $ method,
100100 );
101101 throw new MemberAccessException ("Call to undefined static method $ class:: $ method() " . ($ hint ? ", did you mean $ hint()? " : '. ' ));
102102 }
@@ -121,7 +121,7 @@ public static function getMagicProperties(string $class): array
121121 '~^ [ \t*]* @property(|-read|-write) [ \t]+ [^\s$]+ [ \t]+ \$ (\w+) ()~mx ' ,
122122 (string ) $ rc ->getDocComment (),
123123 $ matches ,
124- PREG_SET_ORDER
124+ PREG_SET_ORDER ,
125125 );
126126
127127 $ props = [];
0 commit comments