From fb57b76a4ad69bc2082a45c9e44dd4b8220cc721 Mon Sep 17 00:00:00 2001 From: makmaoui <37940572+makmaoui@users.noreply.github.com> Date: Thu, 15 Aug 2019 17:04:48 +0200 Subject: [PATCH] Fix variable name --- components/serializer.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/serializer.rst b/components/serializer.rst index 3f70b05ef4d..4eba1055433 100644 --- a/components/serializer.rst +++ b/components/serializer.rst @@ -655,7 +655,7 @@ When serializing, you can set a callback to format a specific object property:: $encoder = new JsonEncoder(); // all callback parameters are optional (you can omit the ones you don't use) - $callback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) { + $dateCallback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) { return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : ''; };