Rector changes and immplementations of required methods

This commit is contained in:
2025-05-22 17:47:07 +02:00
parent d9a47fdee9
commit 9fcc1634f5
1138 changed files with 2656 additions and 2616 deletions

View File

@@ -118,7 +118,7 @@ final class UserNormalizerTest extends TestCase
*
* @throws ExceptionInterface
*/
public function testNormalize(?User $user, mixed $format, mixed $context, mixed $expected)
public function testNormalize(?User $user, mixed $format, mixed $context, mixed $expected): void
{
$userRender = $this->prophesize(UserRender::class);
$userRender->renderString(Argument::type(User::class), Argument::type('array'))->willReturn($user ? $user->getLabel() : '');
@@ -127,12 +127,12 @@ final class UserNormalizerTest extends TestCase
$normalizer = new UserNormalizer($userRender->reveal(), $clock);
$normalizer->setNormalizer(new class () implements NormalizerInterface {
public function normalize($object, ?string $format = null, array $context = [])
public function normalize($object, ?string $format = null, array $context = []): string|int|float|bool|\ArrayObject|array|null
{
return ['context' => $context['docgen:expects'] ?? null];
}
public function supportsNormalization($data, ?string $format = null)
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
{
return true;
}