mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-29 22:30:01 +02:00
Fixed "implicitly marking parameter as nullable" deprecations in PHP 8.4 fixed
This commit is contained in:
parent
d94c4af1be
commit
b724b05de6
31 changed files with 50 additions and 50 deletions
|
@ -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])) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue