From 1615515efc75445682fd3fe4c68884f863ad2bea Mon Sep 17 00:00:00 2001 From: Maxime COLIN Date: Mon, 20 Feb 2023 10:42:28 +0100 Subject: [PATCH] allow int enum to be normalized as int --- src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php b/src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php index 381266b..e0e1845 100644 --- a/src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php +++ b/src/Bridge/Symfony/Serializer/Normalizer/EnumNormalizer.php @@ -26,9 +26,11 @@ class EnumNormalizer implements NormalizerInterface, DenormalizerInterface /** * {@inheritdoc} * - * @param EnumInterface $object + * @param EnumInterface $object + * + * @return T */ - public function normalize($object, $format = null, array $context = []): string + public function normalize($object, $format = null, array $context = []) { return $object->getValue(); }