DX: rector rules upt to PHP 74

This commit is contained in:
2023-04-15 00:20:19 +02:00
parent a68190f0c6
commit 858ade467c
213 changed files with 433 additions and 1052 deletions

View File

@@ -263,9 +263,7 @@ final class PersonContextTest extends TestCase
if (null === $translatableStringHelper) {
$translatableStringHelper = $this->prophesize(TranslatableStringHelperInterface::class);
// return only the 'fr' key
$translatableStringHelper->localize(Argument::type('array'))->will(static function ($args) {
return $args[0]['fr'];
});
$translatableStringHelper->localize(Argument::type('array'))->will(static fn($args) => $args[0]['fr']);
$translatableStringHelper = $translatableStringHelper->reveal();
}

View File

@@ -70,9 +70,7 @@ final class PersonContextWithThirdPartyTest extends KernelTestCase
{
$normalizer = $this->prophesize(NormalizerInterface::class);
$normalizer->normalize(Argument::type(ThirdParty::class), 'docgen', Argument::type('array'))
->will(static function ($args): array {
return ['class' => '3party', 'hash' => spl_object_hash($args[0])];
});
->will(static fn($args): array => ['class' => '3party', 'hash' => spl_object_hash($args[0])]);
$personContext = $this->prophesize(PersonContextInterface::class);