mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2026-01-14 21:31:23 +00:00
Add getSupportedTypes method and update return types in PersonJsonDenormalizerTest
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user