Skip to content

Commit b95b104

Browse files
Update custom_normalizer.rst
1 parent 937f8e9 commit b95b104

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

serializer/custom_normalizer.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ to customize the normalized data. To do that, leverage the ``ObjectNormalizer``:
3333
) {
3434
}
3535

36-
public function normalize($topic, ?string $format = null, array $context = []): array
36+
public function normalize(mixed $object, ?string $format = null, array $context = []): array
3737
{
38-
$data = $this->normalizer->normalize($topic, $format, $context);
38+
$data = $this->normalizer->normalize($object, $format, $context);
3939

4040
// Here, add, edit, or delete some data:
4141
$data['href']['self'] = $this->router->generate('topic_show', [

0 commit comments

Comments
 (0)