@@ -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 }
@@ -723,7 +723,7 @@ When serializing, you can set a callback to format a specific object property::
723723 $encoder = new JsonEncoder();
724724
725725 // all callback parameters are optional (you can omit the ones you don't use)
726- $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
726+ $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
727727 return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
728728 };
729729
@@ -1574,7 +1574,7 @@ having unique identifiers::
15741574 $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
15751575
15761576 // all callback parameters are optional (you can omit the ones you don't use)
1577- $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
1577+ $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
15781578 return '/foos/'.$innerObject->id;
15791579 };
15801580
0 commit comments