Fixed some deprecation messages

This commit is contained in:
Jan Böhmer 2023-04-15 21:18:11 +02:00
parent b3ecee749e
commit 5f29ee9052
8 changed files with 14 additions and 8 deletions

View file

@ -58,7 +58,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach
return $data instanceof Part;
}
public function normalize($object, string $format = null, array $context = [])
public function normalize($object, string $format = null, array $context = []): array
{
if (!$object instanceof Part) {
throw new \InvalidArgumentException('This normalizer only supports Part objects!');
@ -94,7 +94,7 @@ class PartNormalizer implements NormalizerInterface, DenormalizerInterface, Cach
return $data;
}
public function denormalize($data, string $type, string $format = null, array $context = [])
public function denormalize($data, string $type, string $format = null, array $context = []): ?Part
{
$this->normalizeKeys($data);