mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Fix PHPDocs and return type declarations in export interfaces
Corrected typos in PHPDocs, added missing type templates, and ensured proper return type declarations. These changes improve code readability, consistency, and type safety across export-related interfaces.
This commit is contained in:
parent
8e952cc966
commit
b2d3d806b6
@ -94,9 +94,9 @@ interface AggregatorInterface extends ModifierInterface
|
|||||||
* @param string $key The column key, as added in the query
|
* @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')
|
* @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(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(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);
|
public function getLabels($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
|
||||||
|
@ -28,7 +28,7 @@ use Symfony\Contracts\Translation\TranslatableInterface;
|
|||||||
* @example Chill\PersonBundle\Export\CountPerson an example of implementation
|
* @example Chill\PersonBundle\Export\CountPerson an example of implementation
|
||||||
*
|
*
|
||||||
* @template Q of QueryBuilder|NativeQuery
|
* @template Q of QueryBuilder|NativeQuery
|
||||||
* @tempalte D of array
|
* @template D of array
|
||||||
*/
|
*/
|
||||||
interface ExportInterface extends ExportElementInterface
|
interface ExportInterface extends ExportElementInterface
|
||||||
{
|
{
|
||||||
|
@ -19,5 +19,8 @@ namespace Chill\MainBundle\Export;
|
|||||||
* (and list does not support aggregation on their data).
|
* (and list does not support aggregation on their data).
|
||||||
*
|
*
|
||||||
* When used, the `ExportManager` will not handle aggregator for this class.
|
* When used, the `ExportManager` will not handle aggregator for this class.
|
||||||
|
*
|
||||||
|
* @template D of array
|
||||||
|
* @template-implements ExportInterface<D>
|
||||||
*/
|
*/
|
||||||
interface ListInterface extends ExportInterface {}
|
interface ListInterface extends ExportInterface {}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user