Skip to content

Commit fac38a5

Browse files
committed
minor symfony#54584 [Serializer] explicitly mark nullable parameters as nullable (xabbuh)
This PR was merged into the 5.4 branch. Discussion ---------- [Serializer] explicitly mark nullable parameters as nullable | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | refs symfony#54180 | License | MIT Commits ------- 61e5476 explicitly mark nullable parameters as nullable
2 parents 47814e4 + 61e5476 commit fac38a5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Component/Serializer/Tests/Normalizer/AbstractObjectNormalizerTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,17 +670,17 @@ public function __construct()
670670
parent::__construct(null, new MetadataAwareNameConverter(new ClassMetadataFactory(new AnnotationLoader(new AnnotationReader()))));
671671
}
672672

673-
protected function extractAttributes(object $object, string $format = null, array $context = []): array
673+
protected function extractAttributes(object $object, ?string $format = null, array $context = []): array
674674
{
675675
return [];
676676
}
677677

678-
protected function getAttributeValue(object $object, string $attribute, string $format = null, array $context = [])
678+
protected function getAttributeValue(object $object, string $attribute, ?string $format = null, array $context = [])
679679
{
680680
return null;
681681
}
682682

683-
protected function setAttributeValue(object $object, string $attribute, $value, string $format = null, array $context = [])
683+
protected function setAttributeValue(object $object, string $attribute, $value, ?string $format = null, array $context = [])
684684
{
685685
$object->$attribute = $value;
686686
}

0 commit comments

Comments
 (0)