File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
src/test/php/lang/reflection/unittest Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,15 +11,15 @@ class InstantiationTest {
1111
1212 /** @return iterable */
1313 private function memberInitializers () {
14- yield [function ($ t , $ args ) { return $ t ->constructor ()->newInstance ($ args ); } ];
15- yield [function ($ t , $ args ) { return $ t ->initializer ('__construct ' )->newInstance ($ args ); } ];
14+ yield [fn ($ t , $ args ) => $ t ->constructor ()->newInstance ($ args )];
15+ yield [fn ($ t , $ args ) => $ t ->initializer ('__construct ' )->newInstance ($ args )];
1616 }
1717
1818 /** @return iterable */
1919 private function allInitializers () {
20- yield [function ($ t , $ args ) { return $ t ->newInstance (...$ args ); } ];
21- yield [function ($ t , $ args ) { return $ t ->constructor ()->newInstance ($ args ); } ];
22- yield [function ($ t , $ args ) { return $ t ->initializer ('__construct ' )->newInstance ($ args ); } ];
20+ yield [fn ($ t , $ args ) => $ t ->newInstance (...$ args )];
21+ yield [fn ($ t , $ args ) => $ t ->constructor ()->newInstance ($ args )];
22+ yield [fn ($ t , $ args ) => $ t ->initializer ('__construct ' )->newInstance ($ args )];
2323 }
2424
2525 #[Test]
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ public function readonly_modifier_shown_in_string_representation($type) {
3232 public function virtual_property_included_in_list ($ type ) {
3333 Assert::equals (
3434 ['fixture ' => 'public readonly ' ],
35- array_map (function ($ p ) { return $ p ->modifiers ()->names (); } , iterator_to_array ($ type ->properties ()))
35+ array_map (fn ($ p ) => $ p ->modifiers ()->names (), iterator_to_array ($ type ->properties ()))
3636 );
3737 }
3838
You can’t perform that action at this time.
0 commit comments