Add getSupportedTypes method and update return types in PersonJsonDenormalizerTest

This commit is contained in:
2026-01-05 16:13:17 +01:00
parent 5fb3338af5
commit e6a2a2d165

View File

@@ -172,7 +172,7 @@ final class PersonJsonDenormalizerTest extends TestCase
public ?Gender $gender = null;
public ?Center $center = null;
public function denormalize($data, $type, $format = null, array $context = [])
public function denormalize($data, $type, $format = null, array $context = []): mixed
{
if (PhoneNumber::class === $type) {
return '' === $data ? null : new PhoneNumber();
@@ -193,10 +193,15 @@ final class PersonJsonDenormalizerTest extends TestCase
return null;
}
public function supportsDenormalization($data, $type, $format = null)
public function supportsDenormalization($data, $type, $format = null, array $context = []): bool
{
return true;
}
public function getSupportedTypes(?string $format): array
{
return ['*' => false];
}
};
$denormalizer = new PersonJsonDenormalizer($this->createIdentifierManager());