mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-02 21:13:57 +00:00
apply more cs rules for php-cs
This commit is contained in:
@@ -25,6 +25,7 @@ use Symfony\Component\Form\FormBuilderInterface;
|
||||
* aggregation, use `ListInterface`.
|
||||
*
|
||||
* @example Chill\PersonBundle\Export\CountPerson an example of implementation
|
||||
*
|
||||
* @template Q of QueryBuilder|NativeQuery
|
||||
*/
|
||||
interface ExportInterface extends ExportElementInterface
|
||||
@@ -35,7 +36,7 @@ interface ExportInterface extends ExportElementInterface
|
||||
public function buildForm(FormBuilderInterface $builder);
|
||||
|
||||
/**
|
||||
* Get the default data, that can be use as "data" for the form
|
||||
* Get the default data, that can be use as "data" for the form.
|
||||
*/
|
||||
public function getFormDefaultData(): array;
|
||||
|
||||
@@ -93,11 +94,11 @@ interface ExportInterface extends ExportElementInterface
|
||||
* which do not need to be translated, or value already translated in
|
||||
* database. But the header must be, in every case, translated.
|
||||
*
|
||||
* @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 $data The data from the export's form (as defined in `buildForm`)
|
||||
* @param mixed $data The data from the export's form (as defined in `buildForm`)
|
||||
*
|
||||
* @return (callable(null|string|int|float|'_header' $value): string|int|\DateTimeInterface) 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) 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);
|
||||
|
||||
@@ -115,8 +116,8 @@ interface ExportInterface extends ExportElementInterface
|
||||
/**
|
||||
* Return the results of the query builder.
|
||||
*
|
||||
* @param Q $query
|
||||
* @param mixed[] $data the data from the export's fomr (added by self::buildForm)
|
||||
* @param Q $query
|
||||
* @param mixed[] $data the data from the export's fomr (added by self::buildForm)
|
||||
*
|
||||
* @return mixed[] an array of results
|
||||
*/
|
||||
@@ -142,10 +143,10 @@ interface ExportInterface extends ExportElementInterface
|
||||
*
|
||||
* The returned object should be an instance of QueryBuilder or NativeQuery.
|
||||
*
|
||||
* @param array $acl an array where each row has a `center` key containing the Chill\MainBundle\Entity\Center, and `circles` keys containing the reachable circles. Example: `array( array('center' => $centerA, 'circles' => array($circleA, $circleB) ) )`
|
||||
* @param array $acl an array where each row has a `center` key containing the Chill\MainBundle\Entity\Center, and `circles` keys containing the reachable circles. Example: `array( array('center' => $centerA, 'circles' => array($circleA, $circleB) ) )`
|
||||
* @param array $data the data from the form, if any
|
||||
*
|
||||
* @return Q the query to execute.
|
||||
* @return Q the query to execute
|
||||
*/
|
||||
public function initiateQuery(array $requiredModifiers, array $acl, array $data = []);
|
||||
|
||||
|
Reference in New Issue
Block a user