mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
Fix CountryOfBirthAggregator: allow to receive null data in getLabels method
This commit is contained in:
@@ -36,7 +36,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
|
||||
return null;
|
||||
}
|
||||
|
||||
public function alterQuery(QueryBuilder $qb, $data)
|
||||
public function alterQuery(QueryBuilder $qb, $data): void
|
||||
{
|
||||
// add a clause in select part
|
||||
if ('country' === $data['group_by_level']) {
|
||||
@@ -139,7 +139,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex
|
||||
];
|
||||
}
|
||||
|
||||
return static fn (string $value): string => $labels[$value];
|
||||
return static fn (?string $value): string => $labels[(string) $value];
|
||||
}
|
||||
|
||||
public function getQueryKeys($data)
|
||||
|
Reference in New Issue
Block a user