mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 06:14:59 +00:00
Implements return types on aggregators
This commit is contained in:
@@ -19,7 +19,7 @@ trait ExportDataNormalizerTrait
|
||||
/**
|
||||
* @param object|list<object> $entity
|
||||
*/
|
||||
public function normalizeDoctrineEntity(object|array $entity): array|int
|
||||
public function normalizeDoctrineEntity(object|array|null $entity): array|int
|
||||
{
|
||||
if (is_array($entity)) {
|
||||
return array_values(array_filter(array_map(static fn (object $entity) => $entity->getId(), $entity), fn ($value) => null !== $value));
|
||||
|
Reference in New Issue
Block a user