Added additional type hints

This commit is contained in:
Jan Böhmer 2024-03-03 18:55:50 +01:00
parent 3585b8a56a
commit d5b07bbaa3
2 changed files with 2 additions and 2 deletions

View file

@ -101,7 +101,7 @@ class DetermineTypeFromElementIRIDenormalizer implements DenormalizerInterface,
return $this->denormalizer->denormalize($data, $type, $format, $context);
}
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = [])
public function supportsDenormalization(mixed $data, string $type, ?string $format = null, array $context = []): bool
{
//Only denormalize if the _type discriminator is not set and the class is supported and we not have already called this function
return !isset($context[self::ALREADY_CALLED])

View file

@ -38,7 +38,7 @@ class OverrideClassDenormalizer implements DenormalizerInterface, DenormalizerAw
public const CONTEXT_KEY = '__override_type__';
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = [])
public function denormalize(mixed $data, string $type, ?string $format = null, array $context = []): mixed
{
//Deserialize the data with the overridden type
$overrideType = $context[self::CONTEXT_KEY];