@@ -118,7 +118,7 @@ exists in your project::
118118 $this->sportsperson = $sportsperson;
119119 }
120120
121- public function setCreatedAt(\DateTimeInterface $createdAt = null): void
121+ public function setCreatedAt(? \DateTimeInterface $createdAt = null): void
122122 {
123123 $this->createdAt = $createdAt;
124124 }
@@ -756,7 +756,7 @@ When serializing, you can set a callback to format a specific object property::
756756 $encoder = new JsonEncoder();
757757
758758 // all callback parameters are optional (you can omit the ones you don't use)
759- $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
759+ $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
760760 return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
761761 };
762762
@@ -1613,7 +1613,7 @@ having unique identifiers::
16131613 $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
16141614
16151615 // all callback parameters are optional (you can omit the ones you don't use)
1616- $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
1616+ $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
16171617 return '/foos/'.$innerObject->id;
16181618 };
16191619
0 commit comments