diff --git a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php index bbc8a94e79da6..e60b24c5d3ba4 100644 --- a/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php +++ b/src/Symfony/Component/Serializer/Normalizer/NormalizerInterface.php @@ -18,13 +18,15 @@ /** * @author Jordi Boggiano + * + * @template TData */ interface NormalizerInterface { /** * Normalizes data into a set of arrays/scalars. * - * @param mixed $data Data to normalize + * @param TData $data Data to normalize * @param string|null $format Format the normalization result will be encoded as * @param array $context Context options for the normalizer * @@ -41,8 +43,8 @@ public function normalize(mixed $data, ?string $format = null, array $context = /** * Checks whether the given class is supported for normalization by this normalizer. * - * @param mixed $data Data to normalize - * @param string|null $format The format being (de-)serialized from or into + * @param TData|mixed $data Data to normalize + * @param string|null $format The format being (de-)serialized from or into */ public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool;