Skip to content

Commit c40251f

Browse files
bpolaszeknorkunas
authored andcommitted
fix: PHP < 8.0 compatibility
1 parent 2e4139e commit c40251f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/Services/UnixTimestampNormalizer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,15 @@ final class UnixTimestampNormalizer implements NormalizerInterface
1111
/**
1212
* @param \DateTimeInterface $object
1313
*/
14-
public function normalize(mixed $object, string $format = null, array $context = []): int
14+
public function normalize($object, string $format = null, array $context = []): int
1515
{
1616
return $object->getTimestamp();
1717
}
1818

19-
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
19+
/**
20+
* @param mixed $data
21+
*/
22+
public function supportsNormalization($data, string $format = null, array $context = []): bool
2023
{
2124
return $data instanceof \DateTimeInterface && true === ($context['meilisearch'] ?? null);
2225
}

0 commit comments

Comments
 (0)