@@ -48,7 +48,7 @@ public function __construct(
4848 *
4949 * @return array<string, mixed>
5050 */
51- public function normalize (mixed $ object , string $ format = null , array $ context = []): ?array
51+ public function normalize (mixed $ object , ? string $ format = null , array $ context = []): ?array
5252 {
5353 try {
5454 return $ this ->autoMapper ->map ($ object , 'array ' , $ this ->createAutoMapperContext ($ format , $ context ));
@@ -68,7 +68,7 @@ public function normalize(mixed $object, string $format = null, array $context =
6868 *
6969 * @return T|null
7070 */
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
7272 {
7373 try {
7474 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
8282 /**
8383 * @param array<string, mixed> $context
8484 */
85- public function supportsNormalization (mixed $ data , string $ format = null , array $ context = []): bool
85+ public function supportsNormalization (mixed $ data , ? string $ format = null , array $ context = []): bool
8686 {
8787 if (!\is_object ($ data ) || $ data instanceof \stdClass) {
8888 return false ;
@@ -102,7 +102,7 @@ public function supportsNormalization(mixed $data, string $format = null, array
102102 /**
103103 * @param array<string, mixed> $context
104104 */
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
106106 {
107107 if (!class_exists ($ type )) {
108108 return false ;
@@ -145,7 +145,7 @@ public function getSupportedTypes(?string $format): array
145145 *
146146 * @return MapperContextArray
147147 */
148- private function createAutoMapperContext (string $ format = null , array $ serializerContext = []): array
148+ private function createAutoMapperContext (? string $ format = null , array $ serializerContext = []): array
149149 {
150150 /** @var MapperContextArray $context */
151151 $ context = [];
0 commit comments