@@ -118,7 +118,7 @@ exists in your project::
118118 $this->sportsperson = $sportsperson;
119119 }
120120
121- public function setCreatedAt(\DateTime $createdAt = null): void
121+ public function setCreatedAt(? \DateTime $createdAt = null): void
122122 {
123123 $this->createdAt = $createdAt;
124124 }
@@ -798,7 +798,7 @@ When serializing, you can set a callback to format a specific object property::
798798 $encoder = new JsonEncoder();
799799
800800 // all callback parameters are optional (you can omit the ones you don't use)
801- $dateCallback = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
801+ $dateCallback = function ($innerObject, $outerObject, string $attributeName, ? string $format = null, array $context = []) {
802802 return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
803803 };
804804
@@ -1605,7 +1605,7 @@ having unique identifiers::
16051605 $classMetadataFactory = new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()));
16061606
16071607 // all callback parameters are optional (you can omit the ones you don't use)
1608- $maxDepthHandler = function ($innerObject, $outerObject, string $attributeName, string $format = null, array $context = []) {
1608+ $maxDepthHandler = function ($innerObject, $outerObject, string $attributeName, ? string $format = null, array $context = []) {
16091609 return '/foos/'.$innerObject->id;
16101610 };
16111611
0 commit comments