Skip to content

Commit 2e074cb

Browse files
committed
minor #20808 [Serializer] Update args (andreybolonin)
This PR was merged into the 6.4 branch. Discussion ---------- [Serializer] Update args <!-- If your pull request fixes a BUG, use the oldest maintained branch that contains the bug (see https://symfony.com/releases for the list of maintained branches). If your pull request documents a NEW FEATURE, use the same Symfony branch where the feature was introduced (and `7.x` for features of unreleased versions). --> Commits ------- b95b104 Update custom_normalizer.rst
2 parents 5475b2d + b95b104 commit 2e074cb

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)