Implements return types on aggregators

This commit is contained in:
2025-04-08 12:38:52 +02:00
parent ec5f4ed1d6
commit 0d0a626f50
100 changed files with 111 additions and 107 deletions

View File

@@ -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));

View File

@@ -141,7 +141,7 @@ class SortExportElementTest extends KernelTestCase
return [];
}
public function getLabels($key, array $values, mixed $data)
public function getLabels($key, array $values, mixed $data): callable
{
return fn ($v) => $v;
}