mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-28 01:25:00 +00:00
Add getSupportedTypes method for (de)normalizerInterface implementations
This commit is contained in:
@@ -86,6 +86,8 @@ class StoredObjectDenormalizer implements DenormalizerInterface
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
// TODO: Implement getSupportedTypes() method.
|
||||
return [
|
||||
StoredObject::class => true,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
@@ -117,6 +117,13 @@ class RequestPdfSignMessageSerializerTest extends TestCase
|
||||
{
|
||||
return $data instanceof PDFSignatureZone;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
return [
|
||||
PDFSignatureZone::class => true,
|
||||
];
|
||||
}
|
||||
};
|
||||
$denormalizer = new class () implements DenormalizerInterface {
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
|
||||
@@ -128,6 +135,13 @@ class RequestPdfSignMessageSerializerTest extends TestCase
|
||||
{
|
||||
return PDFSignatureZone::class === $type;
|
||||
}
|
||||
|
||||
public function getSupportedTypes(?string $format): array
|
||||
{
|
||||
return [
|
||||
PDFSignatureZone::class => true,
|
||||
];
|
||||
}
|
||||
};
|
||||
|
||||
$serializer = new Serializer([$normalizer, $denormalizer]);
|
||||
|
Reference in New Issue
Block a user