Skip to content

Commit c9edb6d

Browse files
committed
Fix PHP 8.4 compability
1 parent 6841386 commit c9edb6d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

api/src/Serializer/FeedNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ public function __construct(
2020
}
2121

2222

23-
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
23+
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
2424
{
2525
return $data instanceof Feed;
2626
}
2727

2828
/**
2929
* @param Feed $object
3030
*/
31-
public function normalize(mixed $object, string $format = null, array $context = []): array
31+
public function normalize(mixed $object, ?string $format = null, array $context = []): array
3232
{
3333
/** @var array $data */
3434
$data = $this->normalizer->normalize(

api/src/Serializer/ItemNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ public function __construct(
2121
$this->normalizer = $normalizer;
2222
}
2323

24-
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
24+
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
2525
{
2626
return $data instanceof Item;
2727
}
2828

2929
/**
3030
* @param Item $object
3131
*/
32-
public function normalize(mixed $object, string $format = null, array $context = []): array
32+
public function normalize(mixed $object, ?string $format = null, array $context = []): array
3333
{
3434
/** @var array $data */
3535
$data = $this->normalizer->normalize(

api/src/Serializer/PaginatorNormalizer.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class PaginatorNormalizer implements NormalizerInterface, NormalizerAwareInterfa
1414
/**
1515
* @param Paginator<object> $object
1616
*/
17-
public function normalize(mixed $object, string $format = null, array $context = []): array
17+
public function normalize(mixed $object, ?string $format = null, array $context = []): array
1818
{
1919
$objectIterator = $object->getIterator();
2020
assert($objectIterator instanceof \Countable);
@@ -28,7 +28,7 @@ public function normalize(mixed $object, string $format = null, array $context =
2828
];
2929
}
3030

31-
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
31+
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
3232
{
3333
return $data instanceof Paginator;
3434
}

0 commit comments

Comments
 (0)