Refactor type annotations in export interfaces

Updated return type annotations in `AggregatorInterface` for clarity and adjusted generics in `ListInterface` to better reflect supported query types. This improves code readability and strengthens type safety.
This commit is contained in:
2025-04-08 12:38:38 +02:00
parent d9251239f7
commit ec5f4ed1d6
2 changed files with 6 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ interface AggregatorInterface extends ModifierInterface
* @param string $key The column key, as added in the query
* @param mixed[] $values The values from the result. if there are duplicates, those might be given twice. Example: array('FR', 'BE', 'CZ', 'FR', 'BE', 'FR')
*
* @return callable(mixed $value): string|int|\DateTimeInterface|TranslatableInterface where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
* @return callable(mixed $value): (string|int|\DateTimeInterface|TranslatableInterface) where the first argument is the value, and the function should return the label to show in the formatted file. Example : `function($countryCode) use ($countries) { return $countries[$countryCode]->getName(); }`
*/
public function getLabels($key, array $values, mixed $data): callable;