mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-25 11:18:51 +02:00
Added additional type hints
This commit is contained in:
parent
3585b8a56a
commit
d5b07bbaa3
2 changed files with 2 additions and 2 deletions
|
@ -101,7 +101,7 @@ class DetermineTypeFromElementIRIDenormalizer implements DenormalizerInterface,
|
||||||
return $this->denormalizer->denormalize($data, $type, $format, $context);
|
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
|
//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])
|
return !isset($context[self::ALREADY_CALLED])
|
||||||
|
|
|
@ -38,7 +38,7 @@ class OverrideClassDenormalizer implements DenormalizerInterface, DenormalizerAw
|
||||||
|
|
||||||
public const CONTEXT_KEY = '__override_type__';
|
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
|
//Deserialize the data with the overridden type
|
||||||
$overrideType = $context[self::CONTEXT_KEY];
|
$overrideType = $context[self::CONTEXT_KEY];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue