diff --git a/src/test/php/lang/reflection/unittest/InstantiationTest.class.php b/src/test/php/lang/reflection/unittest/InstantiationTest.class.php index 06c283f..7f85691 100755 --- a/src/test/php/lang/reflection/unittest/InstantiationTest.class.php +++ b/src/test/php/lang/reflection/unittest/InstantiationTest.class.php @@ -11,15 +11,15 @@ class InstantiationTest { /** @return iterable */ private function memberInitializers() { - yield [function($t, $args) { return $t->constructor()->newInstance($args); }]; - yield [function($t, $args) { return $t->initializer('__construct')->newInstance($args); }]; + yield [fn($t, $args) => $t->constructor()->newInstance($args)]; + yield [fn($t, $args) => $t->initializer('__construct')->newInstance($args)]; } /** @return iterable */ private function allInitializers() { - yield [function($t, $args) { return $t->newInstance(...$args); }]; - yield [function($t, $args) { return $t->constructor()->newInstance($args); }]; - yield [function($t, $args) { return $t->initializer('__construct')->newInstance($args); }]; + yield [fn($t, $args) => $t->newInstance(...$args)]; + yield [fn($t, $args) => $t->constructor()->newInstance($args)]; + yield [fn($t, $args) => $t->initializer('__construct')->newInstance($args)]; } #[Test] diff --git a/src/test/php/lang/reflection/unittest/VirtualPropertiesTest.class.php b/src/test/php/lang/reflection/unittest/VirtualPropertiesTest.class.php index ad4d4b9..234c251 100755 --- a/src/test/php/lang/reflection/unittest/VirtualPropertiesTest.class.php +++ b/src/test/php/lang/reflection/unittest/VirtualPropertiesTest.class.php @@ -32,7 +32,7 @@ public function readonly_modifier_shown_in_string_representation($type) { public function virtual_property_included_in_list($type) { Assert::equals( ['fixture' => 'public readonly'], - array_map(function($p) { return $p->modifiers()->names(); }, iterator_to_array($type->properties())) + array_map(fn($p) => $p->modifiers()->names(), iterator_to_array($type->properties())) ); }