@@ -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 }
@@ -751,7 +751,7 @@ When serializing, you can set a callback to format a specific object property::
751751 $encoder = new JsonEncoder();
752752
753753 // all callback parameters are optional (you can omit the ones you don't use)
754- $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
754+ $dateCallback = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
755755 return $innerObject instanceof \DateTime ? $innerObject->format(\DateTime::ISO8601) : '';
756756 };
757757
@@ -1629,7 +1629,7 @@ having unique identifiers::
16291629 $classMetadataFactory = new ClassMetadataFactory(new AttributeLoader());
16301630
16311631 // all callback parameters are optional (you can omit the ones you don't use)
1632- $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, string $format = null, array $context = []): string {
1632+ $maxDepthHandler = function (object $innerObject, object $outerObject, string $attributeName, ? string $format = null, array $context = []): string {
16331633 return '/foos/'.$innerObject->id;
16341634 };
16351635
0 commit comments