mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 03:08:51 +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
|
@ -63,13 +63,13 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm
|
|||
{
|
||||
}
|
||||
|
||||
public function supportsNormalization($data, string $format = null, array $context = []): bool
|
||||
public function supportsNormalization($data, ?string $format = null, array $context = []): bool
|
||||
{
|
||||
//We only remove the type field for CSV export
|
||||
return !isset($context[self::ALREADY_CALLED]) && $format === 'csv' && $data instanceof Part ;
|
||||
}
|
||||
|
||||
public function normalize($object, string $format = null, array $context = []): array
|
||||
public function normalize($object, ?string $format = null, array $context = []): array
|
||||
{
|
||||
if (!$object instanceof Part) {
|
||||
throw new \InvalidArgumentException('This normalizer only supports Part objects!');
|
||||
|
@ -117,7 +117,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Norm
|
|||
return $data;
|
||||
}
|
||||
|
||||
public function denormalize($data, string $type, string $format = null, array $context = []): ?Part
|
||||
public function denormalize($data, string $type, ?string $format = null, array $context = []): ?Part
|
||||
{
|
||||
$this->normalizeKeys($data);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue