Fixed "implicitly marking parameter as nullable" deprecations in PHP 8.4 fixed

This commit is contained in:
Jan Böhmer 2025-02-08 00:19:20 +01:00
parent d94c4af1be
commit b724b05de6
31 changed files with 50 additions and 50 deletions

View file

@ -42,7 +42,7 @@ class AttachmentNormalizer implements NormalizerInterface, NormalizerAwareInterf
{
}
public function normalize(mixed $object, string $format = null, array $context = []): array|null
public function normalize(mixed $object, ?string $format = null, array $context = []): array|null
{
if (!$object instanceof Attachment) {
throw new \InvalidArgumentException('This normalizer only supports Attachment objects!');
@ -60,7 +60,7 @@ class AttachmentNormalizer implements NormalizerInterface, NormalizerAwareInterf
return $data;
}
public function supportsNormalization(mixed $data, string $format = null, array $context = []): bool
public function supportsNormalization(mixed $data, ?string $format = null, array $context = []): bool
{
// avoid recursion: only call once per object
if (isset($context[self::ALREADY_CALLED])) {