Skip to content

Commit ba8e9e0

Browse files
committed
Missed two
1 parent 8c57773 commit ba8e9e0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer/custom_context_builders.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ value is ``0000-00-00``. To do that you'll first have to create your normalizer:
3333
{
3434
use DenormalizerAwareTrait;
3535

36-
public function denormalize($data, string $type, string $format = null, array $context = []): mixed
36+
public function denormalize($data, string $type, ?string $format = null, array $context = []): mixed
3737
{
3838
if ('0000-00-00' === $data) {
3939
return null;
@@ -44,7 +44,7 @@ value is ``0000-00-00``. To do that you'll first have to create your normalizer:
4444
return $this->denormalizer->denormalize($data, $type, $format, $context);
4545
}
4646

47-
public function supportsDenormalization($data, string $type, string $format = null, array $context = []): bool
47+
public function supportsDenormalization($data, string $type, ?string $format = null, array $context = []): bool
4848
{
4949
return true === ($context['zero_datetime_to_null'] ?? false)
5050
&& is_a($type, \DateTimeInterface::class, true);

0 commit comments

Comments
 (0)