mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Refactor method signatures for stricter type safety
Updated method parameters to enforce stricter type declarations, improving code clarity and reducing potential runtime errors. This change ensures better consistency across interfaces and aligns with modern PHP typing practices.
This commit is contained in:
parent
0d0a626f50
commit
6f1a26742d
@ -96,7 +96,7 @@ interface AggregatorInterface extends ModifierInterface
|
|||||||
*
|
*
|
||||||
* @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;
|
public function getLabels(string $key, array $values, mixed $data): callable;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* give the list of keys the current export added to the queryBuilder in
|
* give the list of keys the current export added to the queryBuilder in
|
||||||
|
@ -101,7 +101,7 @@ interface ExportInterface extends ExportElementInterface
|
|||||||
*
|
*
|
||||||
* @return (callable(string|int|float|'_header'|null $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(string|int|float|'_header'|null $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);
|
public function getLabels(string $key, array $values, mixed $data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* give the list of keys the current export added to the queryBuilder in
|
* give the list of keys the current export added to the queryBuilder in
|
||||||
|
@ -59,9 +59,9 @@ interface FormatterInterface
|
|||||||
* @deprecated use generate instead
|
* @deprecated use generate instead
|
||||||
*/
|
*/
|
||||||
public function getResponse(
|
public function getResponse(
|
||||||
$result,
|
array $result,
|
||||||
$formatterData,
|
array $formatterData,
|
||||||
$exportAlias,
|
string $exportAlias,
|
||||||
array $exportData,
|
array $exportData,
|
||||||
array $filtersData,
|
array $filtersData,
|
||||||
array $aggregatorsData,
|
array $aggregatorsData,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user