From 806f709d8093bb3d6ee60d8cfc8e78c80acf0de4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 18 Sep 2025 11:20:06 +0200 Subject: [PATCH] Update `DateNormalizer`: Add return type hints for `denormalize` and `normalize` methods --- .../ChillMainBundle/Serializer/Normalizer/DateNormalizer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php index 2493b1794..a98339d4b 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php @@ -22,7 +22,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt { public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag) {} - public function denormalize($data, $type, $format = null, array $context = []) + public function denormalize($data, $type, $format = null, array $context = []): ?DateTimeInterface { if (null === $data) { return null; @@ -51,7 +51,7 @@ class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInt return $result; } - public function normalize($date, $format = null, array $context = []) + public function normalize($date, $format = null, array $context = []): array { /* @var DateTimeInterface $date */ switch ($format) {