Skip to content

Commit e21f236

Browse files
Dispositifjaviereguiluz
authored andcommitted
Add compatible type-hinting
Declaration must be compatible with NormalizerInterface
1 parent 669b4f2 commit e21f236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer/custom_normalizer.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
3535
$this->normalizer = $normalizer;
3636
}
3737

38-
public function normalize($topic, $format = null, array $context = [])
38+
public function normalize($topic, string $format = null, array $context = [])
3939
{
4040
$data = $this->normalizer->normalize($topic, $format, $context);
4141

@@ -47,7 +47,7 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
4747
return $data;
4848
}
4949

50-
public function supportsNormalization($data, $format = null, array $context = [])
50+
public function supportsNormalization($data, string $format = null, array $context = [])
5151
{
5252
return $data instanceof Topic;
5353
}

0 commit comments

Comments
 (0)