@@ -48,7 +48,7 @@ public function __construct(
48
48
*
49
49
* @return array<string, mixed>
50
50
*/
51
- public function normalize (mixed $ object , string $ format = null , array $ context = []): ?array
51
+ public function normalize (mixed $ object , ? string $ format = null , array $ context = []): ?array
52
52
{
53
53
try {
54
54
return $ this ->autoMapper ->map ($ object , 'array ' , $ this ->createAutoMapperContext ($ format , $ context ));
@@ -68,7 +68,7 @@ public function normalize(mixed $object, string $format = null, array $context =
68
68
*
69
69
* @return T|null
70
70
*/
71
- public function denormalize (mixed $ data , string $ type , string $ format = null , array $ context = []): mixed
71
+ public function denormalize (mixed $ data , string $ type , ? string $ format = null , array $ context = []): mixed
72
72
{
73
73
try {
74
74
return $ this ->autoMapper ->map ($ data , $ type , $ this ->createAutoMapperContext ($ format , $ context ));
@@ -82,7 +82,7 @@ public function denormalize(mixed $data, string $type, string $format = null, ar
82
82
/**
83
83
* @param array<string, mixed> $context
84
84
*/
85
- public function supportsNormalization (mixed $ data , string $ format = null , array $ context = []): bool
85
+ public function supportsNormalization (mixed $ data , ? string $ format = null , array $ context = []): bool
86
86
{
87
87
if (!\is_object ($ data ) || $ data instanceof \stdClass) {
88
88
return false ;
@@ -102,7 +102,7 @@ public function supportsNormalization(mixed $data, string $format = null, array
102
102
/**
103
103
* @param array<string, mixed> $context
104
104
*/
105
- public function supportsDenormalization (mixed $ data , string $ type , string $ format = null , array $ context = []): bool
105
+ public function supportsDenormalization (mixed $ data , string $ type , ? string $ format = null , array $ context = []): bool
106
106
{
107
107
if (!class_exists ($ type )) {
108
108
return false ;
@@ -145,7 +145,7 @@ public function getSupportedTypes(?string $format): array
145
145
*
146
146
* @return MapperContextArray
147
147
*/
148
- private function createAutoMapperContext (string $ format = null , array $ serializerContext = []): array
148
+ private function createAutoMapperContext (? string $ format = null , array $ serializerContext = []): array
149
149
{
150
150
/** @var MapperContextArray $context */
151
151
$ context = [];
0 commit comments