Fix Normalizer return hinting.

This commit is contained in:
Buster Neece 2022-11-16 08:39:25 -06:00
parent 93eb40a799
commit dabce8a072
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
1 changed files with 3 additions and 1 deletions

View File

@ -44,8 +44,10 @@ final class DoctrineEntityNormalizer extends AbstractNormalizer implements Norma
/**
* Replicates the "toArray" functionality previously present in Doctrine 1.
*
* @return array|string|int|float|bool|\ArrayObject<int, mixed>|null
*/
public function normalize(mixed $object, ?string $format = null, array $context = []): array
public function normalize(mixed $object, ?string $format = null, array $context = []): mixed
{
if (!is_object($object)) {
throw new \InvalidArgumentException('Cannot normalize non-object.');