diff --git a/docs/source/_static/code/exports/BirthdateFilter.php b/docs/source/_static/code/exports/BirthdateFilter.php index e4d1db671..71ea6032d 100644 --- a/docs/source/_static/code/exports/BirthdateFilter.php +++ b/docs/source/_static/code/exports/BirthdateFilter.php @@ -29,7 +29,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac } // here, we alter the query created by Export - public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); // we create the clause here @@ -53,13 +53,13 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac } // we give information on which type of export this filter applies - public function applyOn() + public function applyOn(): string { return 'person'; } // we build a form to collect some parameters from the users - public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder) + public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void { $builder->add('date_from', DateType::class, [ 'label' => 'Born after this date', @@ -94,7 +94,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac // here, we create a simple string which will describe the action of // the filter in the Response - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s birtdate: ' . 'between %date_from% and %date_to%', [ @@ -103,7 +103,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person\'s birthdate'; } @@ -112,7 +112,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac // is executed here. This function is added by the interface // `ExportElementValidatedInterface`, and can be ignore if there is // no need for a validation - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { $date_from = $data['date_from']; $date_to = $data['date_to']; diff --git a/docs/source/_static/code/exports/CountPerson.php b/docs/source/_static/code/exports/CountPerson.php index e94c011b7..ce4fb8017 100644 --- a/docs/source/_static/code/exports/CountPerson.php +++ b/docs/source/_static/code/exports/CountPerson.php @@ -72,24 +72,24 @@ class CountPerson implements ExportInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { // this array match the result keys in the query. We have only // one column. return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Count peoples'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/rector.php b/rector.php index ea5184dd4..bf74f29cd 100644 --- a/rector.php +++ b/rector.php @@ -25,8 +25,8 @@ return static function (RectorConfig $rectorConfig): void { \Rector\Php55\Rector\String_\StringClassNameToClassConstantRector::class => __DIR__ . 'src/Bundle/ChillMainBundle/Service/Notifier/LegacyOvhCloudFactory.php' ]); - $rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/test/App_KernelTestDebugContainer.xml '); - $rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php'); + //$rectorConfig->symfonyContainerXml(__DIR__ . '/var/cache/dev/test/App_KernelTestDebugContainer.xml '); + //$rectorConfig->symfonyContainerPhp(__DIR__ . '/tests/symfony-container.php'); //$rectorConfig->cacheClass(\Rector\Caching\ValueObject\Storage\FileCacheStorage::class); //$rectorConfig->cacheDirectory(__DIR__ . '/.cache/rector'); diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php index 4ba2f27c9..d92efc4ee 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php @@ -33,7 +33,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface private TranslatableStringHelperInterface $translatableStringHelper, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('after_date', PickRollingDateType::class, [ @@ -84,12 +84,12 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_actype_id']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.acp.by_activity_type.title'; } @@ -99,7 +99,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -130,7 +130,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface ->addGroupBy("{$p}_actype_id"); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php index 0d50937e4..9ceba56ae 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -27,7 +27,7 @@ class BySocialActionAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.socialActions', 'actsocialaction'); @@ -42,7 +42,7 @@ class BySocialActionAggregator implements AggregatorInterface return Declarations::ACTIVITY_ACP; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php index bde3159fc..9aaccb39b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -27,7 +27,7 @@ class BySocialIssueAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.socialIssues', 'actsocialissue'); @@ -42,7 +42,7 @@ class BySocialIssueAggregator implements AggregatorInterface return Declarations::ACTIVITY_ACP; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php index 28c968cc0..ff79fc507 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php @@ -25,7 +25,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actloc', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.location', 'actloc'); @@ -39,7 +39,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form required for this aggregator } @@ -84,7 +84,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.activity.by_location.Title'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php index 1117ddd4b..45a63c767 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php @@ -22,7 +22,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface { public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {} - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -59,7 +59,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['activity_presence_aggregator_attendee']; } @@ -80,7 +80,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface $qb->addGroupBy('activity_presence_aggregator_attendee'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php index f3b6e0461..efdcec193 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php @@ -36,7 +36,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { // add select element if ('reasons' === $data['level']) { @@ -72,7 +72,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add( 'level', @@ -140,7 +140,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { // add select element if ('reasons' === $data['level']) { @@ -154,12 +154,12 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali throw new \RuntimeException('The data provided are not recognised.'); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Aggregate by activity reason'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['level']) { $context diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index 4164662b7..fe53edb68 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -29,7 +29,7 @@ class ActivityTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acttype', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.activityType', 'acttype'); @@ -44,7 +44,7 @@ class ActivityTypeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form required for this aggregator } @@ -89,7 +89,7 @@ class ActivityTypeAggregator implements AggregatorInterface return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Aggregate by activity type'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index e7a691282..e1219a16a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -29,7 +29,7 @@ class ActivityUserAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { // add select element $qb->addSelect(sprintf('IDENTITY(activity.user) AS %s', self::KEY)); @@ -43,7 +43,7 @@ class ActivityUserAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add } @@ -85,7 +85,7 @@ class ActivityUserAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::KEY]; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php index 7c49f4dbd..650b889fd 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php @@ -27,7 +27,7 @@ class ActivityUsersAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actusers', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.users', 'actusers'); @@ -43,7 +43,7 @@ class ActivityUsersAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add on the form } @@ -85,12 +85,12 @@ class ActivityUsersAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['activity_users_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Aggregate by activity users'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php index afa66a8f9..09f98b2e2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php @@ -34,7 +34,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php index 64fa44a02..7912ab5c7 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php @@ -34,7 +34,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php index e043ef323..f467f98a7 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php @@ -27,7 +27,7 @@ class ByCreatorAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('IDENTITY(activity.createdBy) AS creator_aggregator'); $qb->addGroupBy('creator_aggregator'); @@ -38,7 +38,7 @@ class ByCreatorAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php index 605d5cfd7..a1ea7bae8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php @@ -27,7 +27,7 @@ class ByThirdpartyAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acttparty', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.thirdParties', 'acttparty'); @@ -42,7 +42,7 @@ class ByThirdpartyAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php index 933670535..6c2358959 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php @@ -34,7 +34,7 @@ class CreatorJobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php index 0bc917657..c24a9c466 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php @@ -34,7 +34,7 @@ class CreatorScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ class CreatorScopeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php index ef692d3e5..852e71ee2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php @@ -32,7 +32,7 @@ class DateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $order = null; @@ -67,7 +67,7 @@ class DateAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php index b98313bc5..cae8cf6b6 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php @@ -27,7 +27,7 @@ class LocationTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actloc', $qb->getAllAliases(), true)) { $qb->leftJoin('activity.location', 'actloc'); @@ -42,7 +42,7 @@ class LocationTypeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php index 56a15bfc4..8c30a83d8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php @@ -24,7 +24,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface { public function __construct(private HouseholdRepository $householdRepository) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add here } @@ -64,12 +64,12 @@ final readonly class HouseholdAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['activity_household_agg']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.person.by_household.title'; } @@ -79,7 +79,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->join( HouseholdMember::class, @@ -107,7 +107,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface ->addGroupBy('activity_household_agg'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY_PERSON; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php index 97defe25b..ee741b87e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php @@ -21,7 +21,7 @@ final readonly class PersonAggregator implements AggregatorInterface { public function __construct(private LabelPersonHelper $labelPersonHelper) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add here } @@ -51,12 +51,12 @@ final readonly class PersonAggregator implements AggregatorInterface return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person'); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['activity_by_person_agg']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.person.by_person.title'; } @@ -66,14 +66,14 @@ final readonly class PersonAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->addSelect('IDENTITY(activity.person) AS activity_by_person_agg') ->addGroupBy('activity_by_person_agg'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY_PERSON; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php index bec0d30d3..29bbd41c9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php @@ -27,7 +27,7 @@ final readonly class PersonsAggregator implements AggregatorInterface public function __construct(private LabelPersonHelper $labelPersonHelper) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add here } @@ -61,12 +61,12 @@ final readonly class PersonsAggregator implements AggregatorInterface return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.activity.by_persons.Persons'); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_pid']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.activity.by_persons.Group activity by persons'; } @@ -76,7 +76,7 @@ final readonly class PersonsAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -86,7 +86,7 @@ final readonly class PersonsAggregator implements AggregatorInterface ->addGroupBy("{$p}_pid"); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index f4e052dff..756f81d57 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -88,7 +88,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface return ['export_avg_activity_duration']; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php index ddf5adc95..5240dec3a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -96,7 +96,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac return ['export_avg_activity_visit_duration']; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index 69e1c1ac6..a1f0a30d8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -92,7 +92,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface return ['export_count_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php index 0bedc4374..fa3598258 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php @@ -93,7 +93,7 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe return ['export_count_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php index 1fe0a77f5..0ce5f722e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php @@ -92,7 +92,7 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface return ['export_count_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php index 9daaaa710..e16ee6af7 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php @@ -89,7 +89,7 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return array_merge( @@ -101,17 +101,17 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa ); } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $this->helper->getResult($query, $data); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return ListActivityHelper::MSG_KEY.'List activity linked to a course'; } - public function getType() + public function getType(): string { return $this->helper->getType(); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php index 8ac478a64..151018907 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -91,7 +91,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface return ['export_sum_activity_duration']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php index f168b8cca..735d55182 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -91,7 +91,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac return ['export_sum_activity_visit_duration']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index 8ea1f1abb..0239aa481 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -79,17 +79,17 @@ class CountActivity implements ExportInterface, GroupedExportInterface return static fn ($value) => '_header' === $value ? 'Number of activities linked to a person' : $value; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_count_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Count activities linked to a person'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php index 49cff8fd9..95a5aff2d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php @@ -80,17 +80,17 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe return static fn ($value) => '_header' === $value ? 'export.export.count_household_on_activity_person.header' : $value; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_count_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.export.count_household_on_activity_person.title'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php index 5d1ea078e..295b8e3d3 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php @@ -182,17 +182,17 @@ class ListActivity implements ListInterface, GroupedExportInterface } } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return $data['fields']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'List activity linked to a person'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index 4fc9dbdf0..e971fe129 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -99,17 +99,17 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface return static fn (string $value) => '_header' === $value ? $header : $value; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_stat_activity']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { if (self::SUM === $this->action) { return 'Sum activity linked to a person duration'; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php index d9b95ebd4..26e97bf06 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php @@ -39,7 +39,7 @@ final readonly class ActivityTypeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $exists = self::BASE_EXISTS; @@ -63,12 +63,12 @@ final readonly class ActivityTypeFilter implements FilterInterface } } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_activitytypes', EntityType::class, [ 'class' => ActivityType::class, @@ -100,7 +100,7 @@ final readonly class ActivityTypeFilter implements FilterInterface public function normalizeFormData(array $formData): array { - return ['accepted_activitytypes' => $this->normalizeDoctrineEntity($formData['accepted_activitytypes']), 'date_after' => $formData['date_after']->normalize(), 'date_before' => $formData['date_before']->normalize()]; + return ['accepted_activitytypes' => $this->normalizeDoctrineEntity($formData['accepted_activitytypes']), 'date_after' => $formData['date_after']?->normalize(), 'date_before' => $formData['date_before']?->normalize()]; } public function denormalizeFormData(array $formData, int $fromVersion): array diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index bd6fd253f..436eb8099 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -28,7 +28,7 @@ class BySocialActionFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actsocialaction', $qb->getAllAliases(), true)) { $qb->join('activity.socialActions', 'actsocialaction'); @@ -48,7 +48,7 @@ class BySocialActionFilter implements FilterInterface return Declarations::ACTIVITY_ACP; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_socialactions', PickSocialActionType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index 4474962ef..ef538c459 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -28,7 +28,7 @@ class BySocialIssueFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actsocialissue', $qb->getAllAliases(), true)) { $qb->join('activity.socialIssues', 'actsocialissue'); @@ -48,7 +48,7 @@ class BySocialIssueFilter implements FilterInterface return Declarations::ACTIVITY_ACP; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_socialissues', PickSocialIssueType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php index 3264220cb..242addf3b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/HasNoActivityFilter.php @@ -27,7 +27,7 @@ class HasNoActivityFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->andWhere(' @@ -43,7 +43,7 @@ class HasNoActivityFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form needed } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php index c10ed6530..bba364d1a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php @@ -25,12 +25,12 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt private RollingDateConverterInterface $rollingDateConverter, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.activity.course_having_activity_between_date.Title'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('start_date', PickRollingDateType::class, [ @@ -64,7 +64,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.activity.course_having_activity_between_date.Only course having an activity between from and to', @@ -80,7 +80,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $alias = 'act_period_having_act_betw_date_alias'; $from = 'act_period_having_act_betw_date_start'; @@ -97,7 +97,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt ->setParameter($to, $this->rollingDateConverter->convert($data['end_date'])); } - public function applyOn() + public function applyOn(): string { return \Chill\PersonBundle\Export\Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index 7dff6159a..e0650140d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -30,7 +30,7 @@ class ActivityDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->between( @@ -61,7 +61,7 @@ class ActivityDateFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, [ @@ -92,7 +92,7 @@ class ActivityDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'Filtered by date of activity: only between %date_from% and %date_to%', @@ -103,7 +103,7 @@ class ActivityDateFilter implements FilterInterface ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filtered by date activity'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php index 4e3d5257a..b88970323 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php @@ -32,12 +32,12 @@ final readonly class ActivityPresenceFilter implements FilterInterface private ActivityPresenceRepositoryInterface $activityPresenceRepository, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.activity.by_presence.Filter activity by activity presence'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('presences', EntityType::class, [ 'class' => ActivityPresence::class, @@ -69,7 +69,7 @@ final readonly class ActivityPresenceFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $presences = array_map( fn (ActivityPresence $presence) => $this->translatableStringHelper->localize($presence->getName()), @@ -87,14 +87,14 @@ final readonly class ActivityPresenceFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->andWhere('activity.attendee IN (:activity_presence_filter_presences)') ->setParameter('activity_presence_filter_presences', $data['presences']); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php index dceb6c4a8..4a8d93f8f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php @@ -36,7 +36,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('activity.activityType', ':selected_activity_types'); @@ -49,7 +49,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('types', EntityType::class, [ 'choices' => $this->activityTypeRepository->findAllActive(), @@ -92,7 +92,7 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data): string|\Symfony\Contracts\Translation\TranslatableInterface|array { // collect all the reasons'name used in this filter in one array $reasonsNames = array_map( @@ -105,12 +105,12 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by activity type'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['types'] || 0 === \count($data['types'])) { $context diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php index d2474751a..5ec11f51f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php @@ -30,7 +30,7 @@ final readonly class ActivityUsersFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $orX = $qb->expr()->orX(); @@ -42,12 +42,12 @@ final readonly class ActivityUsersFilter implements FilterInterface $qb->andWhere($orX); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, @@ -75,7 +75,7 @@ final readonly class ActivityUsersFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php index 40cfec067..982f36d67 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php @@ -30,7 +30,7 @@ class ByCreatorFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->andWhere( @@ -44,7 +44,7 @@ class ByCreatorFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php index a42c0a0f6..227a2bd07 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php @@ -40,7 +40,7 @@ final readonly class CreatorJobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -76,7 +76,7 @@ final readonly class CreatorJobFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('jobs', EntityType::class, [ diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php index 2209eb0fe..e3a291b42 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php @@ -37,7 +37,7 @@ class CreatorScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -73,7 +73,7 @@ class CreatorScopeFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scopes', EntityType::class, [ diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php index 9aca6b874..bf40a6e57 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php @@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -56,7 +56,7 @@ class EmergencyFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_emergency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php index ba19d7ac7..7490759d1 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationFilter.php @@ -31,7 +31,7 @@ final readonly class LocationFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->andWhere( $qb->expr()->in('activity.location', ':location') @@ -45,7 +45,7 @@ final readonly class LocationFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_location', PickUserLocationType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php index 0df289220..3e3435f85 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php @@ -28,7 +28,7 @@ class LocationTypeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('actloc', $qb->getAllAliases(), true)) { $qb->join('activity.location', 'actloc'); @@ -52,7 +52,7 @@ class LocationTypeFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_locationtype', PickLocationTypeType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index abba75822..b03d4c627 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -35,7 +35,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $join = $qb->getDQLPart('join'); @@ -60,7 +60,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt return Declarations::ACTIVITY_PERSON; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('reasons', EntityType::class, [ 'class' => ActivityReason::class, @@ -92,7 +92,7 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { // collect all the reasons'name used in this filter in one array $reasonsNames = array_map( @@ -108,12 +108,12 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by reason'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['reasons'] || 0 === \count($data['reasons'])) { $context diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php index f2bff9d04..f5dfe4c99 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php @@ -92,7 +92,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_from_rolling', PickRollingDateType::class, [ 'label' => 'export.filter.activity.person_between_dates.Implied in an activity after this date', @@ -165,7 +165,7 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem return 'export.filter.activity.person_between_dates.title'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if ($this->rollingDateConverter->convert($data['date_from_rolling']) >= $this->rollingDateConverter->convert($data['date_to_rolling'])) { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php index ad6074462..b72c7fa39 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php @@ -33,7 +33,7 @@ final readonly class PersonsFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -47,12 +47,12 @@ final readonly class PersonsFilter implements FilterInterface $qb->andWhere($orX); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_persons', PickPersonDynamicType::class, [ 'multiple' => true, @@ -82,7 +82,7 @@ final readonly class PersonsFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $users = []; diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php index bbdd7a1f7..b3c120275 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php @@ -36,7 +36,7 @@ class SentReceivedFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -57,7 +57,7 @@ class SentReceivedFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_sentreceived', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php index 2ea65c787..4844aa219 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php @@ -31,7 +31,7 @@ final readonly class UserFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -52,7 +52,7 @@ final readonly class UserFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php index 5c62daec1..a067c9708 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php @@ -38,7 +38,7 @@ class UsersJobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -61,12 +61,12 @@ class UsersJobFilter implements FilterInterface ); } - public function applyOn() + public function applyOn(): string { return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('jobs', EntityType::class, [ @@ -93,7 +93,7 @@ class UsersJobFilter implements FilterInterface return ['jobs' => $this->denormalizeDoctrineEntity($formData['jobs'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.activity.by_users_job.Filtered activity by users job: only %jobs%', [ '%jobs%' => implode( @@ -113,7 +113,7 @@ class UsersJobFilter implements FilterInterface ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.activity.by_users_job.Filter by users job'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php index 86556f462..a2f0cae79 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php @@ -38,7 +38,7 @@ class UsersScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -66,7 +66,7 @@ class UsersScopeFilter implements FilterInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scopes', EntityType::class, [ diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php index 04524e962..4a3bae3de 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php @@ -30,7 +30,7 @@ class ByActivityTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('IDENTITY(aside.type) AS by_aside_activity_type_aggregator') ->addGroupBy('by_aside_activity_type_aggregator'); @@ -41,7 +41,7 @@ class ByActivityTypeAggregator implements AggregatorInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // No form needed } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php index 73d1e65cd..9ad222be7 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php @@ -34,7 +34,7 @@ class ByUserJobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ class ByUserJobAggregator implements AggregatorInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php index b607fa822..f7f69f042 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php @@ -34,7 +34,7 @@ class ByUserScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -64,7 +64,7 @@ class ByUserScopeAggregator implements AggregatorInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php index 4d2b7a994..6cf542d2d 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php @@ -75,7 +75,7 @@ class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterfac return ['export_avg_aside_activity_duration']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php index a8ba41138..4bd7659ee 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php @@ -78,7 +78,7 @@ class CountAsideActivity implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php index 5b4457a67..0f6802104 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php @@ -157,7 +157,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [ 'id', @@ -180,7 +180,7 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn return $query->getQuery()->getResult(AbstractQuery::HYDRATE_ARRAY); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aside_activity.List of aside activities'; } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php index caa0eaed7..18f78f3f8 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php @@ -75,7 +75,7 @@ class SumAsideActivityDuration implements ExportInterface, GroupedExportInterfac return ['export_sum_aside_activity_duration']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php index d08884116..cd5fa65ac 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php @@ -38,7 +38,7 @@ class ByActivityTypeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('aside.type', ':types'); @@ -51,7 +51,7 @@ class ByActivityTypeFilter implements FilterInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('types', EntityType::class, [ diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php index c3877dd67..48c1f359b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php @@ -29,7 +29,7 @@ class ByDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->between( 'aside.date', @@ -53,7 +53,7 @@ class ByDateFilter implements FilterInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php index d0c2a6f45..1db98a9af 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php @@ -30,7 +30,7 @@ final readonly class ByUserFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('aside.agent', ':users'); @@ -44,7 +44,7 @@ final readonly class ByUserFilter implements FilterInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_users', PickUserDynamicType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php index 21774c880..6ae67501e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php @@ -38,7 +38,7 @@ class ByUserJobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -66,7 +66,7 @@ class ByUserJobFilter implements FilterInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('jobs', EntityType::class, [ diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php index 72f5f6d4b..500e1ecfa 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php @@ -38,7 +38,7 @@ class ByUserScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -66,7 +66,7 @@ class ByUserScopeFilter implements FilterInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scopes', EntityType::class, [ @@ -93,7 +93,7 @@ class ByUserScopeFilter implements FilterInterface return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.by_user_scope.Filtered aside activities by user scope: only %scopes%', [ '%scopes%' => implode( diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index 735142ee1..8c109b034 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -27,7 +27,7 @@ final readonly class AgentAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('caluser', $qb->getAllAliases(), true)) { $qb->join('cal.mainUser', 'caluser'); @@ -42,7 +42,7 @@ final readonly class AgentAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index f34b5c8f4..f2647b23e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -27,7 +27,7 @@ class CancelReasonAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { // TODO: still needs to take into account calendars without a cancel reason somehow if (!\in_array('calcancel', $qb->getAllAliases(), true)) { @@ -43,7 +43,7 @@ class CancelReasonAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index b4145c9b2..c5f8c9854 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -34,7 +34,7 @@ final readonly class JobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ final readonly class JobAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index 07f8debb3..e0d4e8381 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -26,7 +26,7 @@ final readonly class LocationAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('calloc', $qb->getAllAliases(), true)) { $qb->join('cal.location', 'calloc'); @@ -40,7 +40,7 @@ final readonly class LocationAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index 2b7a0ba33..1a11eaf3e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -27,7 +27,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('calloc', $qb->getAllAliases(), true)) { $qb->join('cal.location', 'calloc'); @@ -42,7 +42,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php index cb797a882..0ce7e71c5 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -23,7 +23,7 @@ class MonthYearAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect("to_char(cal.startDate, 'MM-YYYY') AS month_year_aggregator"); // $qb->addSelect("extract(month from age(cal.startDate, cal.endDate)) AS month_aggregator"); @@ -35,7 +35,7 @@ class MonthYearAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // No form needed } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php index c2070bdff..21ed82015 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -34,7 +34,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -65,7 +65,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php index a5d4e5fc7..d4651c5dc 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php @@ -33,7 +33,7 @@ class UrgencyAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('cal.urgent AS urgency_aggregator'); $qb->addGroupBy('urgency_aggregator'); @@ -44,7 +44,7 @@ class UrgencyAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php index 73d6778d2..8b14a1628 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php @@ -86,7 +86,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php index cf84b4ca6..afda99ee9 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php @@ -83,7 +83,7 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php index 5e5ae0ccc..80369e354 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php @@ -83,7 +83,7 @@ class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php index 74ada0db9..ee2bdd499 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -32,7 +32,7 @@ final readonly class AgentFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('cal.mainUser', ':agents'); @@ -52,7 +52,7 @@ final readonly class AgentFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_agents', EntityType::class, [ 'class' => User::class, diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php index 2ab113971..5998c7a7a 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -28,7 +28,7 @@ class BetweenDatesFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->andX( $qb->expr()->gte('cal.startDate', ':dateFrom'), @@ -52,7 +52,7 @@ class BetweenDatesFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, []) diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php index e646f8fc1..7c8dd6572 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php @@ -41,7 +41,7 @@ class CalendarRangeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (null !== $data['hasCalendarRange']) { $qb->andWhere($qb->expr()->isNotNull('cal.calendarRange')); @@ -55,7 +55,7 @@ class CalendarRangeFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('hasCalendarRange', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index a7e19ce99..4067a1e90 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -37,7 +37,7 @@ final readonly class JobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -71,7 +71,7 @@ final readonly class JobFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('job', EntityType::class, [ diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index 70e51aeb3..e9a2ddfc6 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -39,7 +39,7 @@ class ScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -73,7 +73,7 @@ class ScopeFilter implements FilterInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scope', EntityType::class, [ diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php index d332f2acc..2cbd78881 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php @@ -32,7 +32,7 @@ class EventDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $order = null; @@ -67,7 +67,7 @@ class EventDateAggregator implements AggregatorInterface return Declarations::EVENT; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php index 753040493..b4ad32770 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php @@ -29,7 +29,7 @@ class EventTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('eventtype', $qb->getAllAliases(), true)) { $qb->leftJoin('event.type', 'eventtype'); @@ -44,7 +44,7 @@ class EventTypeAggregator implements AggregatorInterface return Declarations::EVENT; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form required for this aggregator } @@ -89,7 +89,7 @@ class EventTypeAggregator implements AggregatorInterface return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group by event type'; } diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php index 3731ce34c..105856391 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php @@ -29,7 +29,7 @@ class RoleAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('event_part', $qb->getAllAliases(), true)) { $qb->leftJoin('event_part.role', 'role'); @@ -44,7 +44,7 @@ class RoleAggregator implements AggregatorInterface return Declarations::EVENT_PARTICIPANTS; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form required for this aggregator } @@ -89,7 +89,7 @@ class RoleAggregator implements AggregatorInterface return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group by participant role'; } diff --git a/src/Bundle/ChillEventBundle/Export/Export/CountEventParticipations.php b/src/Bundle/ChillEventBundle/Export/Export/CountEventParticipations.php index 0c9d793b3..d95fb4ecb 100644 --- a/src/Bundle/ChillEventBundle/Export/Export/CountEventParticipations.php +++ b/src/Bundle/ChillEventBundle/Export/Export/CountEventParticipations.php @@ -80,17 +80,17 @@ readonly class CountEventParticipations implements ExportInterface, GroupedExpor return static fn ($value) => '_header' === $value ? 'Count event participants' : $value; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_count_event_participants']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Count event participants'; } diff --git a/src/Bundle/ChillEventBundle/Export/Export/CountEvents.php b/src/Bundle/ChillEventBundle/Export/Export/CountEvents.php index 5a17987f5..fe51fdfd8 100644 --- a/src/Bundle/ChillEventBundle/Export/Export/CountEvents.php +++ b/src/Bundle/ChillEventBundle/Export/Export/CountEvents.php @@ -80,17 +80,17 @@ readonly class CountEvents implements ExportInterface, GroupedExportInterface return static fn ($value) => '_header' === $value ? 'Number of events' : $value; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_count_event']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Count events'; } diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php index 256acf52b..63cfa2776 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/EventDateFilter.php @@ -30,7 +30,7 @@ class EventDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->between( @@ -61,7 +61,7 @@ class EventDateFilter implements FilterInterface return Declarations::EVENT; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, [ @@ -92,7 +92,7 @@ class EventDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'Filtered by date of event: only between %date_from% and %date_to%', @@ -103,7 +103,7 @@ class EventDateFilter implements FilterInterface ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filtered by event date'; } diff --git a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php index f0473020a..78eaa3936 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/EventTypeFilter.php @@ -36,7 +36,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('event.type', ':selected_event_types'); @@ -49,7 +49,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac return Declarations::EVENT; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('types', EntityType::class, [ 'choices' => $this->eventTypeRepository->findAllActive(), @@ -83,7 +83,7 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $typeNames = array_map( fn (EventType $t): string => $this->translatableStringHelper->localize($t->getName()), @@ -95,12 +95,12 @@ class EventTypeFilter implements ExportElementValidatedInterface, FilterInterfac ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filtered by event type'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['types'] || 0 === \count($data['types'])) { $context diff --git a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php index ea64034dd..d40374320 100644 --- a/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php +++ b/src/Bundle/ChillEventBundle/Export/Filter/RoleFilter.php @@ -36,7 +36,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('event_part.role', ':selected_part_roles'); @@ -49,7 +49,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface return Declarations::EVENT_PARTICIPANTS; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('part_roles', EntityType::class, [ 'choices' => $this->roleRepository->findAllActive(), @@ -83,7 +83,7 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $roleNames = array_map( fn (Role $r): string => $this->translatableStringHelper->localize($r->getName()), @@ -95,12 +95,12 @@ class RoleFilter implements ExportElementValidatedInterface, FilterInterface ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by participant roles'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['part_roles'] || 0 === \count($data['part_roles'])) { $context diff --git a/src/Bundle/ChillJobBundle/src/Export/ListCV.php b/src/Bundle/ChillJobBundle/src/Export/ListCV.php index 009e6c1f6..5a106065b 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListCV.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListCV.php @@ -72,14 +72,14 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * * @param mixed $data the data, as returned by the user */ - public function validateForm($data, ExecutionContextInterface $context) {} + public function validateForm($data, ExecutionContextInterface $context): void {} /** * get a title, which will be used in UI (and translated). * * @return string */ - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Liste des CVs par personne'; } @@ -156,7 +156,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * * @return string */ - public function getType() + public function getType(): string { return Person::class; } @@ -219,7 +219,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * * @return array */ - public function getQueryKeys($data) + public function getQueryKeys($data): array { return array_keys($data['fields']); } @@ -240,7 +240,7 @@ class ListCV implements ListInterface, ExportElementValidatedInterface * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) */ - public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { $qb->select('person.id'); diff --git a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php index f5363d3f3..cf251d1b9 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListFrein.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListFrein.php @@ -85,14 +85,14 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * * @param mixed $data the data, as returned by the user */ - public function validateForm($data, ExecutionContextInterface $context) {} + public function validateForm($data, ExecutionContextInterface $context): void {} /** * get a title, which will be used in UI (and translated). * * @return string */ - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Liste des freins identifiés par personne'; } @@ -169,7 +169,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * * @return string */ - public function getType() + public function getType(): string { return Person::class; } @@ -242,7 +242,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * * @return array */ - public function getQueryKeys($data) + public function getQueryKeys($data): array { $freins = self::FREINS; $fields = []; @@ -333,7 +333,7 @@ class ListFrein implements ListInterface, ExportElementValidatedInterface * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) */ - public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { $qb->select('person.id'); diff --git a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php index c1bf499fc..97f89ddeb 100644 --- a/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php +++ b/src/Bundle/ChillJobBundle/src/Export/ListProjetProfessionnel.php @@ -90,14 +90,14 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * * @param mixed $data the data, as returned by the user */ - public function validateForm($data, ExecutionContextInterface $context) {} + public function validateForm($data, ExecutionContextInterface $context): void {} /** * get a title, which will be used in UI (and translated). * * @return string */ - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Liste des projets professionnels par personne'; } @@ -175,7 +175,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * * @return string */ - public function getType() + public function getType(): string { return Person::class; } @@ -248,7 +248,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * * @return array */ - public function getQueryKeys($data) + public function getQueryKeys($data): array { $projet_professionnel = self::PPROF; @@ -371,7 +371,7 @@ class ListProjetProfessionnel implements ListInterface, ExportElementValidatedIn * @param QueryBuilder|\Doctrine\ORM\NativeQuery $qb * @param mixed[] $data the data from the export's form (added by self::buildForm) */ - public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { $qb->select('person.id'); diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php index 6694ec06d..771bf058a 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVFormatter.php @@ -55,7 +55,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface /** * @uses appendAggregatorForm */ - public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases) + public function buildForm(FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases): void { $aggregators = $this->getExportManager()->getAggregators($aggregatorAliases); $nb = \count($aggregatorAliases); @@ -118,7 +118,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface return $descriptions; } - public function getName() + public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Comma separated values (CSV)'; } @@ -151,7 +151,7 @@ class CSVFormatter implements FormatterInterface, ExportManagerAwareInterface return $response; } - public function getType() + public function getType(): string { return 'tabular'; } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php index 3582da66a..fea419755 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php @@ -67,7 +67,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases, - ) { + ): void { $builder->add('numerotation', ChoiceType::class, [ 'choices' => [ 'yes' => true, @@ -99,7 +99,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac return ['numerotation' => true]; } - public function getName() + public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'CSV vertical list'; } @@ -163,7 +163,7 @@ class CSVListFormatter implements FormatterInterface, ExportManagerAwareInterfac return $response; } - public function getType() + public function getType(): string { return FormatterInterface::TYPE_LIST; } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php index 5fbf4a006..6d0a9d180 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php @@ -64,7 +64,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases, - ) { + ): void { $builder->add('numerotation', ChoiceType::class, [ 'choices' => [ 'yes' => true, @@ -97,7 +97,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI return ['numerotation' => true]; } - public function getName() + public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'CSV horizontal list'; } @@ -165,7 +165,7 @@ class CSVPivotedListFormatter implements FormatterInterface, ExportManagerAwareI return $response; } - public function getType() + public function getType(): string { return FormatterInterface::TYPE_LIST; } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php index 300e48b93..b2f1176f1 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadSheetFormatter.php @@ -119,7 +119,7 @@ class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwareInte FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases, - ) { + ): void { // choosing between formats $builder->add('format', ChoiceType::class, [ 'choices' => [ @@ -215,7 +215,7 @@ class SpreadSheetFormatter implements FormatterInterface, ExportManagerAwareInte return $response; } - public function getType() + public function getType(): string { return 'tabular'; } diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php index e34eab2ea..bf600f220 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php @@ -67,7 +67,7 @@ class SpreadsheetListFormatter implements FormatterInterface, ExportManagerAware FormBuilderInterface $builder, $exportAlias, array $aggregatorAliases, - ) { + ): void { $builder ->add('format', ChoiceType::class, [ 'choices' => [ @@ -107,7 +107,7 @@ class SpreadsheetListFormatter implements FormatterInterface, ExportManagerAware return ['numerotation' => true, 'format' => 'xlsx']; } - public function getName() + public function getName(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Spreadsheet list formatter (.xlsx, .ods)'; } @@ -218,7 +218,7 @@ class SpreadsheetListFormatter implements FormatterInterface, ExportManagerAware return $response; } - public function getType() + public function getType(): string { return FormatterInterface::TYPE_LIST; } diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index 2ec9672cb..f68a8d7d6 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -534,12 +534,12 @@ class DummyFilterWithApplying implements FilterInterface private readonly string $applyOn, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'dummy'; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -561,7 +561,7 @@ class DummyFilterWithApplying implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['dummy filter', []]; } @@ -571,9 +571,9 @@ class DummyFilterWithApplying implements FilterInterface return $this->role; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) {} + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void {} - public function applyOn() + public function applyOn(): string { return $this->applyOn; } @@ -589,7 +589,7 @@ class DummyExport implements ExportInterface private readonly array $supportedModifiers, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'dummy'; } @@ -631,17 +631,17 @@ class DummyExport implements ExportInterface return []; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return []; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return []; } - public function getType() + public function getType(): string { return 'dummy'; } diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index 210372658..614e01a25 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -119,7 +119,7 @@ class SortExportElementTest extends KernelTestCase return new class ($title) implements AggregatorInterface { public function __construct(private readonly string $title) {} - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -146,12 +146,12 @@ class SortExportElementTest extends KernelTestCase return fn ($v) => $v; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return []; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return $this->title; } @@ -161,9 +161,9 @@ class SortExportElementTest extends KernelTestCase return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) {} + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void {} - public function applyOn() + public function applyOn(): string { return []; } @@ -175,12 +175,12 @@ class SortExportElementTest extends KernelTestCase return new class ($title) implements FilterInterface { public function __construct(private readonly string $title) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return $this->title; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -202,7 +202,7 @@ class SortExportElementTest extends KernelTestCase return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['a', []]; } @@ -212,9 +212,9 @@ class SortExportElementTest extends KernelTestCase return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) {} + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void {} - public function applyOn() + public function applyOn(): string { return []; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php index 31f11376c..705cd9584 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php @@ -27,7 +27,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acploc', $qb->getAllAliases(), true)) { $qb->leftJoin('acp.administrativeLocation', 'acploc'); @@ -42,7 +42,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } @@ -89,7 +89,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface return ['location_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group by administrative location'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php index c2950e812..51e1a7759 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php @@ -72,12 +72,12 @@ final readonly class ClosingDateAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_closing_date']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.course.by_closing_date.title'; } @@ -87,7 +87,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -96,7 +96,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface $qb->addOrderBy("{$p}_closing_date", 'DESC'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php index 49a08156a..eb2f738d5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php @@ -27,7 +27,7 @@ class ClosingMotiveAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('IDENTITY(acp.closingMotive) AS closingmotive_aggregator'); $qb->addGroupBy('closingmotive_aggregator'); @@ -38,7 +38,7 @@ class ClosingMotiveAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } @@ -82,7 +82,7 @@ class ClosingMotiveAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['closingmotive_aggregator']; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index afb3015b8..7ca6e0de5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -26,7 +26,7 @@ class ConfidentialAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('acp.confidential AS confidential_aggregator'); $qb->addGroupBy('confidential_aggregator'); @@ -37,7 +37,7 @@ class ConfidentialAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php index b14e78d87..dda30dec2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php @@ -34,7 +34,7 @@ class CreatorJobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -78,7 +78,7 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php index ed434884d..74942be44 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php @@ -33,7 +33,7 @@ final readonly class DurationAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { match ($data['precision']) { 'day' => $qb->addSelect('(COALESCE(acp.closingDate, :now) - acp.openingDate) AS duration_aggregator'), @@ -54,7 +54,7 @@ final readonly class DurationAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('precision', ChoiceType::class, [ 'choices' => array_combine(self::CHOICES, self::CHOICES), diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index e81835f34..407055421 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -26,7 +26,7 @@ class EmergencyAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('acp.emergency AS emergency_aggregator'); $qb->addGroupBy('emergency_aggregator'); @@ -37,7 +37,7 @@ class EmergencyAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index 0ff4f0b70..69825b9a1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -27,7 +27,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpw', $qb->getAllAliases(), true)) { $qb->leftJoin('acp.works', 'acpw'); @@ -46,7 +46,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php index c3cbf4043..64a14eb1c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php @@ -41,7 +41,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->leftJoin('acp.locationHistories', 'acp_geog_agg_location_history'); @@ -111,7 +111,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_calc', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index c6df6c795..f6505a503 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -26,7 +26,7 @@ class IntensityAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('acp.intensity AS intensity_aggregator'); $qb->addGroupBy('intensity_aggregator'); @@ -37,7 +37,7 @@ class IntensityAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php index 80c82f782..708680928 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php @@ -35,7 +35,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -72,7 +72,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php index ee6bab7b7..3f26fce90 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php @@ -72,12 +72,12 @@ final readonly class OpeningDateAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_opening_date']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.course.by_opening_date.title'; } @@ -87,7 +87,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -96,7 +96,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface $qb->addOrderBy("{$p}_opening_date", 'DESC'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php index 1600cb20f..5ae5bab6b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php @@ -36,7 +36,7 @@ final readonly class OriginAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acporigin', $qb->getAllAliases(), true)) { $qb->leftJoin('acp.origin', 'acporigin'); @@ -51,7 +51,7 @@ final readonly class OriginAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php index a4539da2f..0899aa872 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php @@ -25,7 +25,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac private LabelPersonHelper $labelPersonHelper, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to do here } @@ -58,12 +58,12 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.course.by-user.title'; } @@ -73,7 +73,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $k = self::KEY; @@ -85,7 +85,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac ->addGroupBy($k); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index 6ed55c18f..d97df36dc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -39,7 +39,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->addSelect('IDENTITY('.self::A.'.user) AS referrer_aggregator') @@ -66,7 +66,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('start_date', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php index d11c12d2e..444c4e8a2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php @@ -39,7 +39,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -76,7 +76,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('start_date', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php index 0909f6e63..114c207ce 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php @@ -26,7 +26,7 @@ final readonly class RequestorAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acppart', $qb->getAllAliases(), true)) { $qb->join('acp.participations', 'acppart'); @@ -58,7 +58,7 @@ final readonly class RequestorAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index ea351f6e0..47adb1747 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -27,7 +27,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpscope', $qb->getAllAliases(), true)) { $qb->leftJoin('acp.scopes', 'acpscope'); @@ -42,7 +42,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php index 175b53cd6..020b8559d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php @@ -35,7 +35,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -72,7 +72,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index 8783e54d0..b22a5610a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -27,7 +27,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpw', $qb->getAllAliases(), true)) { // here, we will only see accompanying period linked with a socialAction @@ -43,7 +43,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php index 91afd7fde..192ea4a5a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php @@ -27,7 +27,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpsocialissue', $qb->getAllAliases(), true)) { // we will see accompanying period linked with social issues @@ -43,7 +43,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index ad013422b..68a6ab755 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -34,7 +34,7 @@ final readonly class StepAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array(self::A, $qb->getAllAliases(), true)) { $qb->leftJoin('acp.stepHistories', self::A); @@ -63,7 +63,7 @@ final readonly class StepAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('on_date', PickRollingDateType::class, []); } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php index 4da1e00b5..8f9b7560f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php @@ -39,7 +39,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -76,7 +76,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('start_date', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php index b8dd0d4d8..4d94c2bdf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php @@ -29,7 +29,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac private UserRepositoryInterface $userRepository, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add here } @@ -73,12 +73,12 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::COLUMN_NAME]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.course.by_user_working.title'; } @@ -88,7 +88,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!in_array('acpinfo', $qb->getAllAliases(), true)) { $qb->leftJoin( @@ -107,7 +107,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac $qb->addGroupBy('acpinfo_user.id'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php index c341c480a..c15d92067 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php @@ -27,7 +27,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface private ClosingMotiveRender $closingMotiveRender, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing to add here } @@ -67,14 +67,14 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [ self::KEY, ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.step_history.by_closing_motive.title'; } @@ -84,14 +84,14 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->addSelect('IDENTITY(acpstephistory.closingMotive) AS '.self::KEY) ->addGroupBy(self::KEY); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_STEP_HISTORY; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php index f4e65e42a..1968e5f1b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php @@ -26,7 +26,7 @@ final readonly class ByDateAggregator implements AggregatorInterface { private const KEY = 'acpstephistory_by_date_agg'; - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => array_combine( @@ -74,12 +74,12 @@ final readonly class ByDateAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::KEY]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.step_history.by_date.title'; } @@ -89,7 +89,7 @@ final readonly class ByDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::KEY; @@ -98,7 +98,7 @@ final readonly class ByDateAggregator implements AggregatorInterface $qb->addOrderBy($p, 'DESC'); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_STEP_HISTORY; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php index 966c1e8e5..95f3dcb58 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php @@ -29,7 +29,7 @@ final readonly class ByStepAggregator implements AggregatorInterface private TranslatorInterface $translator, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // nothing in this form } @@ -69,14 +69,14 @@ final readonly class ByStepAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [ self::KEY, ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.step_history.by_step.title'; } @@ -86,14 +86,14 @@ final readonly class ByStepAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->addSelect('acpstephistory.step AS '.self::KEY) ->addGroupBy(self::KEY); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_STEP_HISTORY; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php index 5db4aa13c..29a4284f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php @@ -32,7 +32,7 @@ final class ByEndDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $fmt = match ($data['frequency']) { 'week' => 'YYYY-IW', @@ -51,7 +51,7 @@ final class ByEndDateAggregator implements AggregatorInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php index bc8080b4d..bd7309ba0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php @@ -32,7 +32,7 @@ final class ByMaxDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $fmt = match ($data['frequency']) { 'week' => 'YYYY-IW', @@ -51,7 +51,7 @@ final class ByMaxDateAggregator implements AggregatorInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php index ed490b1cd..b44c50cc9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php @@ -32,7 +32,7 @@ final class ByStartDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $fmt = match ($data['frequency']) { 'week' => 'YYYY-IW', @@ -51,7 +51,7 @@ final class ByStartDateAggregator implements AggregatorInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('frequency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index 7877357d6..4915d21ed 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -27,7 +27,7 @@ class EvaluationTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('IDENTITY(workeval.evaluation) AS eval_evaluationtype_aggregator'); $qb->addGroupBy('eval_evaluationtype_aggregator'); @@ -38,7 +38,7 @@ class EvaluationTypeAggregator implements AggregatorInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php index 6304f5f9c..beeb29fca 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php @@ -26,7 +26,7 @@ class HavingEndDateAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->addSelect('CASE WHEN workeval.endDate IS NULL THEN true ELSE false END AS eval_enddate_aggregator') @@ -38,7 +38,7 @@ class HavingEndDateAggregator implements AggregatorInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // No form needed } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index aa6165432..71dffe74a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -29,7 +29,7 @@ class ChildrenNumberAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('composition_children', $qb->getAllAliases(), true)) { $clause = $qb->expr()->andX( @@ -58,7 +58,7 @@ class ChildrenNumberAggregator implements AggregatorInterface return Declarations::HOUSEHOLD_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('on_date', PickRollingDateType::class, []); } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 8224db8ce..2b765c91f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -31,7 +31,7 @@ class CompositionAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('composition_type', $qb->getAllAliases(), true)) { $clause = $qb->expr()->andX( @@ -60,7 +60,7 @@ class CompositionAggregator implements AggregatorInterface return Declarations::HOUSEHOLD_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('on_date', PickRollingDateType::class, []); } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php index 77d1ec1de..6d185abc4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php @@ -27,7 +27,7 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->leftJoin('person.administrativeStatus', 'admin_status'); $qb->addSelect('admin_status.id as administrative_status_aggregator'); @@ -35,12 +35,12 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa $qb->addGroupBy('administrative_status_aggregator'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -79,12 +79,12 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['administrative_status_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by administrative status'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php index 9ef38b188..966326dbb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php @@ -31,19 +31,19 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->addSelect('DATE_DIFF(:date_age_calculation, person.birthdate)/365 as person_age'); $qb->setParameter('date_age_calculation', $this->rollingDateConverter->convert($data['date_age_calculation'])); $qb->addGroupBy('person_age'); } - public function applyOn() + public function applyOn(): string { return 'person'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_age_calculation', PickRollingDateType::class, [ 'label' => 'Calculate age in relation to this date', @@ -81,19 +81,19 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [ 'person_age', ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Aggregate by age'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['date_age_calculation']) { $context->buildViolation('The date should not be empty') diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php index ca3f5b62d..d5504361b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php @@ -34,7 +34,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -71,12 +71,12 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface ->addGroupBy("{$p}_select"); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_calc', PickRollingDateType::class, [ 'label' => 'export.aggregator.person.by_household_composition.Calc date', @@ -122,12 +122,12 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_select']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.person.by_household_composition.Group course by household composition'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php index 7bac2044d..bd02e6800 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php @@ -29,7 +29,7 @@ final readonly class CenterAggregator implements AggregatorInterface private RollingDateConverterInterface $rollingDateConverter, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('at_date', PickRollingDateType::class, [ 'label' => 'export.aggregator.person.by_center.at_date', @@ -73,12 +73,12 @@ final readonly class CenterAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::COLUMN_NAME]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.person.by_center.title'; } @@ -88,7 +88,7 @@ final readonly class CenterAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $alias = 'pers_center_agg'; $atDate = 'pers_center_agg_at_date'; @@ -109,7 +109,7 @@ final readonly class CenterAggregator implements AggregatorInterface $qb->addGroupBy(self::COLUMN_NAME); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index 872802f4d..840af42b1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -75,12 +75,12 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex $qb->addGroupBy('country_of_birth_aggregator'); } - public function applyOn() + public function applyOn(): string { return 'person'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('group_by_level', ChoiceType::class, [ 'choices' => [ @@ -153,17 +153,17 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex return static fn (?string $value): string => $labels[(string) $value]; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['country_of_birth_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by country of birth'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['group_by_level']) { $context->buildViolation('You should select an option') diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php index 6130cd9e3..ef4366e30 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php @@ -27,7 +27,7 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->leftJoin('person.employmentStatus', 'es'); $qb->addSelect('es.id as employment_status_aggregator'); @@ -35,12 +35,12 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface $qb->addGroupBy('employment_status_aggregator'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -79,12 +79,12 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['employment_status_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by employment status'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php index cdb9c772b..9913be9c8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php @@ -28,7 +28,7 @@ final readonly class GenderAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->leftJoin('person.gender', 'g'); $qb->addSelect('g.id as gender'); @@ -36,12 +36,12 @@ final readonly class GenderAggregator implements AggregatorInterface $qb->addGroupBy('gender'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { @@ -82,12 +82,12 @@ final readonly class GenderAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['gender']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by gender'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php index e0e5fc26e..4f3dd2973 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php @@ -79,12 +79,12 @@ final readonly class GeographicalUnitAggregator implements AggregatorInterface ->addGroupBy('geog_unit_key'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_calc', PickRollingDateType::class, [ @@ -156,12 +156,12 @@ final readonly class GeographicalUnitAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['geog_unit_name', 'geog_unit_key']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by geographical unit based on his address'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index 3f7d483f2..e5c853c94 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -35,7 +35,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface, return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('householdmember', $qb->getAllAliases(), true)) { $qb->join(HouseholdMember::class, 'householdmember', Expr\Join::WITH, 'householdmember.person = person'); @@ -62,12 +62,12 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface, $qb->addGroupBy('household_position_aggregator'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_position', PickRollingDateType::class, [ 'label' => 'Household position in relation to this date', @@ -111,19 +111,19 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface, }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [ 'household_position_aggregator', ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Aggregate by household position'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['date_position']) { $context->buildViolation('The date should not be empty') diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 423294459..a0cbf9ad6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -27,7 +27,7 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('personmarital', $qb->getAllAliases(), true)) { $qb->join('person.maritalStatus', 'personmarital'); @@ -37,12 +37,12 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface $qb->addGroupBy('marital_status_aggregator'); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } @@ -84,12 +84,12 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['marital_status_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by marital status'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index 4a92a9eab..af1159933 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -31,7 +31,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { // add a clause in select part if ('country' === $data['group_by_level']) { @@ -70,12 +70,12 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor $qb->addGroupBy('nationality_aggregator'); } - public function applyOn() + public function applyOn(): string { return 'person'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('group_by_level', ChoiceType::class, [ 'choices' => [ @@ -150,17 +150,17 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor return static fn ($value): string => $labels[$value]; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['nationality_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group people by nationality'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['group_by_level']) { $context->buildViolation('You should select an option') diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php index 401d85ae7..0cfa5515d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php @@ -28,7 +28,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface private RollingDateConverterInterface $rollingDateConverter, ) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('calc_date', PickRollingDateType::class, [ @@ -71,12 +71,12 @@ final readonly class PostalCodeAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_postal_code_code', self::PREFIX.'_postal_code_label']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.person.by_postal_code.title'; } @@ -86,7 +86,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -107,7 +107,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface ; } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php index c09d35a2b..cdacef278 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php @@ -29,7 +29,7 @@ final readonly class ActionTypeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpwsocialaction', $qb->getAllAliases(), true)) { $qb->leftJoin('acpw.socialAction', 'acpwsocialaction'); @@ -46,12 +46,12 @@ final readonly class ActionTypeAggregator implements AggregatorInterface ->addGroupBy('social_action_type_aggregator'); } - public function applyOn() + public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } @@ -105,12 +105,12 @@ final readonly class ActionTypeAggregator implements AggregatorInterface }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['social_action_type_aggregator', 'action_type_aggregator']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Group social work actions by action type'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php index 4a91c25e9..753296283 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php @@ -32,7 +32,7 @@ class CreatorAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -46,7 +46,7 @@ class CreatorAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php index 6ebffe923..fff458f05 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php @@ -34,7 +34,7 @@ class CreatorJobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -63,7 +63,7 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php index b80c0d014..48804cd16 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php @@ -34,7 +34,7 @@ class CreatorScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -63,7 +63,7 @@ class CreatorScopeAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php index 65d7fed02..d5419da2c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php @@ -27,7 +27,7 @@ final readonly class GoalAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('goal', $qb->getAllAliases(), true)) { $qb->leftJoin('acpw.goals', 'goal'); @@ -42,7 +42,7 @@ final readonly class GoalAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php index c8719d41a..2bd457890 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php @@ -28,7 +28,7 @@ class GoalResultAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('goal', $qb->getAllAliases(), true)) { $qb->leftJoin('acpw.goals', 'goal'); @@ -48,7 +48,7 @@ class GoalResultAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php index 86f16c2aa..e5f0e4285 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php @@ -27,7 +27,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface public function __construct(private LabelThirdPartyHelper $labelThirdPartyHelper) {} - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form needed here } @@ -57,12 +57,12 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface return $this->labelThirdPartyHelper->getLabel($key, $values, 'export.aggregator.course_work.by_handling_third_party.header'); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return [self::PREFIX.'_h3party']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.aggregator.course_work.by_handling_third_party.title'; } @@ -72,7 +72,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -81,7 +81,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface ->addGroupBy("{$p}_h3party"); } - public function applyOn() + public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index 5c64a58f1..fcd6112a2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -35,7 +35,7 @@ final readonly class JobAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -58,7 +58,7 @@ final readonly class JobAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php index 538d200b4..c8e431479 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -36,7 +36,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -56,7 +56,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('referrer_at', PickRollingDateType::class, [ 'label' => 'export.aggregator.course_work.by_treating_agent.Calc date', diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php index 6512bb8d6..54702a935 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php @@ -27,7 +27,7 @@ final readonly class ResultAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('result', $qb->getAllAliases(), true)) { $qb->leftJoin('acpw.results', 'result'); @@ -42,7 +42,7 @@ final readonly class ResultAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { // no form } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index 73a7e269f..d40f0bb00 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -35,7 +35,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -58,7 +58,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder): void {} public function getNormalizationVersion(): int { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php index 9ca0c041f..e7f93a062 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php @@ -85,7 +85,7 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod implements ExportInt return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php index d0e9490d4..3448e93bc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php @@ -85,7 +85,7 @@ class AvgDurationAPWorkPersonAssociatedOnWork implements ExportInterface, Groupe return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 92155518a..40a0a6c40 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -97,7 +97,7 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php index 38962b456..5fcc8a6f7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php @@ -93,7 +93,7 @@ class CountAccompanyingCourseStepHistory implements ExportInterface, GroupedExpo return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php index 361a00b0b..922101f95 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php @@ -93,7 +93,7 @@ class CountAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod implements return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWork.php index 62b99d672..ea7f1c805 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWork.php @@ -93,7 +93,7 @@ class CountAccompanyingPeriodWorkAssociatePersonOnWork implements ExportInterfac return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index 75b54a10b..acf035424 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -89,7 +89,7 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php index 90580dcd9..e7e2d20da 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php @@ -108,7 +108,7 @@ class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface return ['household_export_result', 'acp_export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index 34c399027..9a620148a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php @@ -86,22 +86,22 @@ class CountPerson implements ExportInterface, GroupedExportInterface return static fn ($value) => $labels[$value]; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Count people'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork.php index 51951ee40..b3d08a4d8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork.php @@ -93,7 +93,7 @@ class CountPersonOnAccompanyingPeriodWorkAssociatePersonOnWork implements Export return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php index 6e46a1234..51dcfdb90 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php @@ -95,7 +95,7 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor return ['export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php index d730c1064..8ac6ffeef 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php @@ -89,22 +89,22 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp return $this->listAccompanyingPeriodHelper->getLabels($key, $values, $data); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return $this->listAccompanyingPeriodHelper->getQueryKeys($data); } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.list.acp.List of accompanying periods'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php index 0e5be943c..f93e030f7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php @@ -193,12 +193,12 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return self::FIELDS; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php index 41f3d6d0d..13822697d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php @@ -193,12 +193,12 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return self::FIELDS; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php index 88a6a46e1..201e5a234 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php @@ -181,12 +181,12 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter }; } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return self::FIELDS; } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php index e369999b3..b455d3f65 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php @@ -129,7 +129,7 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface ); } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index 31115f7aa..55ced4cc2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -101,7 +101,7 @@ class ListPerson implements ListInterface, GroupedExportInterface return $this->getLabelForCustomField($key, $values, $data); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { $fields = []; @@ -113,17 +113,17 @@ class ListPerson implements ListInterface, GroupedExportInterface return [...$fields, ...\array_keys($this->slugs)]; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'List peoples'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index 9ee2bf0e2..108eb2836 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -140,7 +140,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat /** * @return string */ - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'List duplicates'; } @@ -150,7 +150,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return PersonVoter::DUPLICATE; } - public function validateForm($data, ExecutionContextInterface $context) {} + public function validateForm($data, ExecutionContextInterface $context): void {} protected function getHeaders(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php index 4a141d4d1..de1f495cd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php @@ -96,22 +96,22 @@ final readonly class ListPersonHavingAccompanyingPeriod implements ListInterface return $this->listPersonHelper->getLabels($key, $values, $data); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return $this->listPersonHelper->getAllKeys(); } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.list.person_with_acp.List peoples having an accompanying period'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php index bccef75db..6c641914b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php @@ -96,7 +96,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte return $this->listAccompanyingPeriodHelper->getLabels($key, $values, $data); } - public function getQueryKeys($data) + public function getQueryKeys($data): array { return array_merge( $this->listPersonHelper->getAllKeys(), @@ -104,17 +104,17 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte ); } - public function getResult($query, $data, ExportGenerationContext $context) + public function getResult($query, $data, ExportGenerationContext $context): array { return $query->getQuery()->getResult(AbstractQuery::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.list.person_with_acp.List peoples having an accompanying period with period details'; } - public function getType() + public function getType(): string { return Declarations::PERSON_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 8c3eba742..5c5b5eee6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -112,7 +112,7 @@ final readonly class StatAccompanyingCourseDuration implements ExportInterface, return ['avg_export_result', 'count_acp_export_result', 'count_acppart_export_result', 'count_pers_export_result']; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index 8a265ef0a..b2f5390ee 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -29,7 +29,7 @@ class ActiveOnDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -59,7 +59,7 @@ class ActiveOnDateFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('on_date', PickRollingDateType::class, []); diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index 611ae7bb6..fb06f3913 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -28,7 +28,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = "OVERLAPSI (acp.openingDate, acp.closingDate), (:datefrom, :dateto) = 'TRUE'"; @@ -48,7 +48,7 @@ class ActiveOneDayBetweenDatesFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, []) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 6c43f25bd..605aecc15 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -30,7 +30,7 @@ final readonly class AdministrativeLocationFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->in('acp.administrativeLocation', ':locations'); $qb @@ -43,7 +43,7 @@ final readonly class AdministrativeLocationFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_locations', PickUserLocationType::class, [ 'label' => 'Accepted locations', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php index 12141e60a..a49f2f838 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php @@ -32,7 +32,7 @@ final readonly class ClosingMotiveFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('acp.closingMotive', ':closingmotive'); @@ -52,7 +52,7 @@ final readonly class ClosingMotiveFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_closingmotives', EntityType::class, [ 'class' => ClosingMotive::class, @@ -82,7 +82,7 @@ final readonly class ClosingMotiveFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data): array { $motives = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index b296d4962..cecef6526 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -35,7 +35,7 @@ class ConfidentialFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->eq('acp.confidential', ':confidential'); @@ -55,7 +55,7 @@ class ConfidentialFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_confidentials', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php index c74f67360..4f0bfe4f3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorFilter.php @@ -31,7 +31,7 @@ final readonly class CreatorFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acp_creator', $qb->getAllAliases(), true)) { $qb->join('acp.createdBy', 'acp_creator'); @@ -47,7 +47,7 @@ final readonly class CreatorFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_creators', PickUserDynamicType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php index 93055ae55..f8bfca0d1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php @@ -37,7 +37,7 @@ final readonly class CreatorJobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -84,7 +84,7 @@ final readonly class CreatorJobFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('creator_job', EntityType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index 59529d731..27cd35a04 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->eq('acp.emergency', ':emergency'); @@ -55,7 +55,7 @@ class EmergencyFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_emergency', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php index f504857ce..c8eb99df1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php @@ -31,7 +31,7 @@ final readonly class EvaluationFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpw', $qb->getAllAliases(), true)) { $qb->join('acp.works', 'acpw'); @@ -55,7 +55,7 @@ final readonly class EvaluationFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_evaluations', EntityType::class, [ 'class' => Evaluation::class, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index b5ac0bbc9..d043c1f7b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -45,7 +45,7 @@ class GeographicalUnitStatFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $subQueryDql = 'SELECT @@ -86,7 +86,7 @@ class GeographicalUnitStatFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_calc', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php index b625cd235..d0cd16a14 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php @@ -31,12 +31,12 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface private ThirdPartyRepository $thirdPartyRepository, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.work.by_handling3party.title'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('handling_3parties', PickThirdpartyDynamicType::class, [ 'label' => 'export.filter.work.by_handling3party.pick_3parties', @@ -64,7 +64,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface return ['handling_3parties' => []]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.work.by_handling3party.Only 3 parties %3parties%', @@ -85,7 +85,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -93,7 +93,7 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface $qb->setParameter("{$p}_3ps", $data['handling_3parties']); } - public function applyOn() + public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php index 28ba5acac..0f954b5a6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php @@ -29,7 +29,7 @@ class HasNoReferrerFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->andWhere(' @@ -54,7 +54,7 @@ class HasNoReferrerFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('calc_date', PickRollingDateType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php index 2645c1fb8..8644544c3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php @@ -29,7 +29,7 @@ class HasTemporaryLocationFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->join('acp.locationHistories', 'acp_having_temporarily_location') @@ -52,7 +52,7 @@ class HasTemporaryLocationFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('having_temporarily', ChoiceType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index 6d065eb47..d6271dff7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -35,7 +35,7 @@ class IntensityFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->eq('acp.intensity', ':intensity'); @@ -55,7 +55,7 @@ class IntensityFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_intensities', ChoiceType::class, [ 'choices' => self::CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php index dfdc5324f..120a1b385 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php @@ -28,12 +28,12 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI private RollingDateConverterInterface $rollingDateConverter, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.course.not_having_address_reference.title'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_calc', PickRollingDateType::class, [ 'label' => 'export.filter.course.not_having_address_reference.adress_at', @@ -62,7 +62,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.not_having_address_reference.describe', @@ -77,7 +77,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $k = 'acp_not_associated_ref_filter'; @@ -106,7 +106,7 @@ final readonly class NotAssociatedWithAReferenceAddressFilter implements FilterI $qb->setParameter("{$k}_date_calc", $this->rollingDateConverter->convert($data['date_calc'])); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index b5a99ee82..7125b3c09 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -29,7 +29,7 @@ class OpenBetweenDatesFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $clause = $qb->expr()->andX( $qb->expr()->gte('acp.openingDate', ':datefrom'), @@ -46,7 +46,7 @@ class OpenBetweenDatesFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_from', PickRollingDateType::class, []) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php index 79dc50faa..9fa553c82 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php @@ -32,7 +32,7 @@ final readonly class OriginFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('acp.origin', ':origin'); @@ -52,7 +52,7 @@ final readonly class OriginFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_origins', EntityType::class, [ 'class' => Origin::class, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 36b8be2ae..8f451f22a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -37,7 +37,7 @@ final readonly class ReferrerFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->join('acp.userHistories', self::A) @@ -65,7 +65,7 @@ final readonly class ReferrerFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_referrers', PickUserDynamicType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php index d5fc3ccfa..880e5fdd1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php @@ -52,7 +52,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $history = self::A; $start = self::P; @@ -77,7 +77,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_referrers', PickUserDynamicType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index c511b82f2..5ef2534c1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -38,7 +38,7 @@ final readonly class RequestorFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -107,7 +107,7 @@ final readonly class RequestorFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_choices', ChoiceType::class, [ 'choices' => self::REQUESTOR_CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index 57947a68e..8bb098861 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -38,7 +38,7 @@ final readonly class SocialActionFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -81,7 +81,7 @@ final readonly class SocialActionFilter implements FilterInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_socialactions', PickSocialActionType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php index 7dffa4872..e5f90e243 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php @@ -40,7 +40,7 @@ class SocialIssueFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('acpsocialissue', $qb->getAllAliases(), true)) { $qb->join('acp.socialIssues', 'acpsocialissue'); @@ -57,12 +57,12 @@ class SocialIssueFilter implements FilterInterface ); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('accepted_socialissues', PickSocialIssueType::class, [ 'multiple' => true, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php index 4c32d646c..dc8be8818 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php @@ -46,7 +46,7 @@ class StepFilterBetweenDates implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $alias = 'acp_filter_by_step_between_dat_alias'; $steps = 'acp_filter_by_step_between_dat_steps'; @@ -66,12 +66,12 @@ class StepFilterBetweenDates implements FilterInterface ->setParameter($steps, $data['accepted_steps_multi']); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_steps_multi', ChoiceType::class, [ @@ -112,7 +112,7 @@ class StepFilterBetweenDates implements FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $steps = array_map( fn (string $step) => $this->translator->trans(array_flip(self::STEPS)[$step]), @@ -126,7 +126,7 @@ class StepFilterBetweenDates implements FilterInterface ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.course.by_step.Filter by step between dates'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php index 2066fb25f..560e12af3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php @@ -76,12 +76,12 @@ class StepFilterOnDate implements FilterInterface ->setParameter('acp_filter_by_step_steps', $data['accepted_steps_multi']); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_steps_multi', ChoiceType::class, [ @@ -124,7 +124,7 @@ class StepFilterOnDate implements FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): array { $steps = array_map( fn (string $step) => $this->translator->trans(array_flip(self::STEPS)[$step]), @@ -136,7 +136,7 @@ class StepFilterOnDate implements FilterInterface ]]; } - public function getTitle() + public function getTitle(): string { return 'export.filter.course.by_step.Filter by step'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php index 40b255988..1c338171d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php @@ -45,7 +45,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -77,12 +77,12 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn ; } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('jobs', EntityType::class, [ @@ -102,7 +102,7 @@ final readonly class UserJobFilter implements FilterInterface, DataTransformerIn ; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.by_user_job.Filtered by user job: only job', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php index e7f144a30..b800bcde7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php @@ -79,7 +79,7 @@ final readonly class UserScopeFilter implements FilterInterface, DataTransformer return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scopes', EntityType::class, [ @@ -112,7 +112,7 @@ final readonly class UserScopeFilter implements FilterInterface, DataTransformer return ['scopes' => $this->denormalizeDoctrineEntity($formData['scopes'], $this->scopeRepository), 'start_date' => RollingDate::fromNormalized($formData['start_date']), 'end_date' => RollingDate::fromNormalized($formData['end_date'])]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.course.by_user_scope.Filtered by user main scope: only scopes', [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php index 244036ffc..2c4301269 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php @@ -35,12 +35,12 @@ final readonly class ByDateFilter implements FilterInterface private RollingDateConverterInterface $rollingDateConverter, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.step_history.by_date.title'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('start_date', PickRollingDateType::class, [ @@ -74,7 +74,7 @@ final readonly class ByDateFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'exports.filter.step_history.by_date.description', @@ -90,7 +90,7 @@ final readonly class ByDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $startDate = 'acp_step_history_by_date_start_filter'; $endDate = 'acp_step_history_by_date_end_filter'; @@ -103,7 +103,7 @@ final readonly class ByDateFilter implements FilterInterface ->setParameter($endDate, $this->rollingDateConverter->convert($data['end_date'])); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_STEP_HISTORY; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php index f65e0dae4..0e1dde46b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php @@ -25,12 +25,12 @@ final readonly class ByStepFilter implements FilterInterface private TranslatorInterface $translator, ) {} - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.step_history.by_step.title'; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $steps = [ AccompanyingPeriod::STEP_CONFIRMED, @@ -72,7 +72,7 @@ final readonly class ByStepFilter implements FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.step_history.by_step.description', @@ -87,14 +87,14 @@ final readonly class ByStepFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb ->andWhere('acpstephistory.step IN (:acpstephistory_by_step_filter_steps)') ->setParameter('acpstephistory_by_step_filter_steps', $data['steps']); } - public function applyOn() + public function applyOn(): string { return Declarations::ACP_STEP_HISTORY; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php index d34b1439e..ddb3d222d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php @@ -31,7 +31,7 @@ final readonly class EvaluationTypeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->andWhere( $qb->expr()->in('workeval.evaluation', ':evaluationtype') @@ -44,7 +44,7 @@ final readonly class EvaluationTypeFilter implements FilterInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $evaluations = $this->evaluationRepository->findAllActive(); diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index ead1a5b66..9ec86f44e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -32,7 +32,7 @@ class MaxDateFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (true === $data['maxdate']) { $clause = $qb->expr()->isNotNull('workeval.maxDate'); @@ -48,7 +48,7 @@ class MaxDateFilter implements FilterInterface return Declarations::EVAL_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('maxdate', ChoiceType::class, [ 'choices' => self::MAXDATE_CHOICES, diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php index d0c63fb69..cf33b8afc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php @@ -30,7 +30,7 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $subQuery = 'SELECT 1 @@ -57,12 +57,12 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface ->setParameter('person_filter_having_address_to_review_ref_statuses', $data['ref_statuses'] ?? [Address::ADDR_REFERENCE_STATUS_TO_REVIEW]); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_calc', PickRollingDateType::class, [ @@ -98,7 +98,7 @@ class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY), 'ref_statuses' => [Address::ADDR_REFERENCE_STATUS_TO_REVIEW]]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.person.by_address_ref_status.Filtered by person\'s address status computed at %datecalc%, only %statuses%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php index 4632c6bd4..a99b17b09 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php @@ -32,7 +32,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -65,12 +65,12 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface $qb->setParameter('max_date', $maxDate); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('min_age', IntegerType::class, [ 'label' => 'Minimum age', @@ -110,7 +110,7 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s age: ' .'between %min_age% and %max_age%', [ @@ -119,12 +119,12 @@ class AgeFilter implements ExportElementValidatedInterface, FilterInterface ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person\'s age'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { $min = $data['min_age']; $max = $data['max_age']; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php index c307439db..c1e91e269 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php @@ -31,7 +31,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->between( @@ -57,12 +57,12 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac ); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_from', PickRollingDateType::class, [ 'label' => 'Born after this date', @@ -93,7 +93,7 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s birthdate: ' .'between %date_from% and %date_to%', [ @@ -102,12 +102,12 @@ class BirthdateFilter implements ExportElementValidatedInterface, FilterInterfac ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person\'s birthdate'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { $date_from = $data['date_from']; $date_to = $data['date_to']; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php index 8f6e1efc1..b830cc687 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php @@ -38,7 +38,7 @@ class ByHouseholdCompositionFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = 'person_by_household_compo_filter'; @@ -57,12 +57,12 @@ class ByHouseholdCompositionFilter implements FilterInterface ->setParameter("{$p}_date", $this->rollingDateConverter->convert($data['calc_date']), Types::DATE_IMMUTABLE); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('compositions', EntityType::class, [ @@ -98,7 +98,7 @@ class ByHouseholdCompositionFilter implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $compos = array_map( fn (HouseholdCompositionType $compositionType) => $this->translatableStringHelper->localize($compositionType->getLabel()), @@ -111,7 +111,7 @@ class ByHouseholdCompositionFilter implements FilterInterface ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.person.by_composition.Filter by household composition'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php index 2fb488a98..c21a4c5b2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php @@ -30,7 +30,7 @@ class DeadOrAliveFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); @@ -78,12 +78,12 @@ class DeadOrAliveFilter implements FilterInterface $qb->setParameter('date_calc', $calc); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('person_state', ChoiceType::class, [ 'choices' => [ @@ -119,7 +119,7 @@ class DeadOrAliveFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by a state of %deadOrAlive%: ' .'at this date %date_calc%', [ @@ -128,7 +128,7 @@ class DeadOrAliveFilter implements FilterInterface ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return "Filter by person's that are alive or have deceased at a certain date"; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index 0fb9956b7..fd32aba35 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -31,7 +31,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->between( @@ -57,12 +57,12 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac ); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_from', PickRollingDateType::class, [ 'label' => 'Death after this date', @@ -93,7 +93,7 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s deathdate: ' .'between %date_from% and %date_to%', [ @@ -102,12 +102,12 @@ class DeathdateFilter implements ExportElementValidatedInterface, FilterInterfac ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person\'s deathdate'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { $date_from = $data['date_from']; $date_to = $data['date_to']; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php index b80db6172..dc9fdec67 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php @@ -41,7 +41,7 @@ class GenderFilter implements return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $isIn = $qb->expr()->in('person.gender', ':person_gender'); @@ -59,12 +59,12 @@ class GenderFilter implements $qb->setParameter('person_gender', array_filter($acceptedGenders ?? [], fn ($gender) => null !== $gender)); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $genderChoices = $this->genderRepository->findByActiveOrdered(); $choices = ['None' => null]; @@ -122,7 +122,7 @@ class GenderFilter implements return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $genders = []; @@ -145,12 +145,12 @@ class GenderFilter implements * * @return string */ - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person gender'; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (!\is_iterable($data['accepted_genders_entity']) || 0 === \count($data['accepted_genders_entity'])) { $context->buildViolation('You should select an option') diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php index fc7def8f9..bb9eb1d2a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php @@ -39,7 +39,7 @@ final readonly class GeographicalUnitFilter implements \Chill\MainBundle\Export\ return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $subQuery = 'SELECT 1 @@ -68,12 +68,12 @@ final readonly class GeographicalUnitFilter implements \Chill\MainBundle\Export\ ->setParameter('person_filter_geog_units', array_map(static fn (SimpleGeographicalUnitDTO $unitDTO) => $unitDTO->id, $data['units'])); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('date_calc', PickRollingDateType::class, [ @@ -124,7 +124,7 @@ final readonly class GeographicalUnitFilter implements \Chill\MainBundle\Export\ return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return [ 'export.filter.by_geog_unit.Filtered by person\'s geographical unit (based on address) computed at %datecalc%, only %units%', diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php index 6d1a12934..eb60d004d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php @@ -29,7 +29,7 @@ final readonly class MaritalStatusFilter implements FilterInterface return null; } - public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $qb->andWhere( $qb->expr()->in('person.maritalStatus', ':maritalStatus') @@ -37,12 +37,12 @@ final readonly class MaritalStatusFilter implements FilterInterface $qb->setParameter('maritalStatus', $data['maritalStatus']); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder) + public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void { $builder->add('maritalStatus', EntityType::class, [ 'class' => MaritalStatus::class, @@ -74,12 +74,12 @@ final readonly class MaritalStatusFilter implements FilterInterface return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s marital status']; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by person\'s marital status'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php index 06550eded..e8c280476 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php @@ -36,7 +36,7 @@ final readonly class NationalityFilter implements return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->in('person.nationality', ':person_nationality'); @@ -51,12 +51,12 @@ final readonly class NationalityFilter implements $qb->setParameter('person_nationality', [$data['nationalities']]); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('nationalities', Select2CountryType::class, [ 'placeholder' => 'Choose countries', @@ -83,7 +83,7 @@ final readonly class NationalityFilter implements return []; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $countries = $data['nationalities']; @@ -95,12 +95,12 @@ final readonly class NationalityFilter implements ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return "Filter by person's nationality"; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { if (null === $data['nationalities']) { $context->buildViolation('A nationality must be selected') diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php index fdb1a50b8..3083b4c8e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php @@ -40,7 +40,7 @@ final readonly class ResidentialAddressAtThirdpartyFilter implements FilterInter return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('resaddr', $qb->getAllAliases(), true)) { $qb->join(ResidentialAddress::class, 'resaddr', Expr\Join::WITH, 'resaddr.person = person'); @@ -86,12 +86,12 @@ final readonly class ResidentialAddressAtThirdpartyFilter implements FilterInter $qb->add('where', $where); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('thirdparty_cat', EntityType::class, [ 'class' => ThirdPartyCategory::class, @@ -126,7 +126,7 @@ final readonly class ResidentialAddressAtThirdpartyFilter implements FilterInter return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by person\'s who have a residential address located at a thirdparty of type %thirdparty_type% and valid on %date_calc%', [ '%thirdparty_type%' => $this->translatableStringHelper->localize($data['thirdparty_cat'][0]->getName()), @@ -134,7 +134,7 @@ final readonly class ResidentialAddressAtThirdpartyFilter implements FilterInter ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return "Filter by person's who have a residential address located at a thirdparty of type"; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php index 960d440d2..ad481d616 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php @@ -30,7 +30,7 @@ class ResidentialAddressAtUserFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (!\in_array('resaddr', $qb->getAllAliases(), true)) { $qb->join(ResidentialAddress::class, 'resaddr', Expr\Join::WITH, 'resaddr.person = person'); @@ -66,12 +66,12 @@ class ResidentialAddressAtUserFilter implements FilterInterface $qb->add('where', $where); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder) + public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void { $builder->add('date_calc', PickRollingDateType::class, [ 'label' => 'Date during which residential address was valid', @@ -98,12 +98,12 @@ class ResidentialAddressAtUserFilter implements FilterInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ["Filtered by person's who have a residential address located at another user"]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return "Filter by person's who have a residential address located at another user"; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index a09c3e9e7..3e249181d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -32,7 +32,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = 'with_participation_between_dates_filter'; @@ -54,7 +54,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_after', PickRollingDateType::class, [ 'label' => 'export.filter.person.with_participation_between_dates.date_after', @@ -88,7 +88,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.person.with_participation_between_dates.Filtered by participations during period: between %dateafter% and %datebefore%', [ '%dateafter%' => $this->rollingDateConverter->convert($data['date_after'])->format('d-m-Y'), @@ -96,7 +96,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.person.with_participation_between_dates.title'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php index 10fc5016f..32a0404d9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php @@ -31,7 +31,7 @@ class WithoutHouseholdComposition implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = 'person_by_household_no_compo_filter'; @@ -50,12 +50,12 @@ class WithoutHouseholdComposition implements FilterInterface ->setParameter("{$p}_date", $this->rollingDateConverter->convert($data['calc_date']), Types::DATE_IMMUTABLE); } - public function applyOn() + public function applyOn(): string { return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('calc_date', PickRollingDateType::class, [ @@ -83,14 +83,14 @@ class WithoutHouseholdComposition implements FilterInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['export.filter.person.by_no_composition.Persons filtered by no composition at %date%', [ '%date%' => $this->rollingDateConverter->convert($data['calc_date'])->format('d-m-Y'), ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.person.by_no_composition.Filter persons without household composition'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php index be6473cbc..1d3dc29b0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutParticipationBetweenDatesFilter.php @@ -32,7 +32,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = 'without_participation_between_dates_filter'; @@ -56,7 +56,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder->add('date_after', PickRollingDateType::class, [ 'label' => 'export.filter.person.without_participation_between_dates.date_after', @@ -90,7 +90,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt ]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['exports.filter.person.without_participation_between_dates.Filtered by having no participations during period: between', [ 'dateafter' => $this->rollingDateConverter->convert($data['date_after']), @@ -98,7 +98,7 @@ final readonly class WithoutParticipationBetweenDatesFilter implements FilterInt ]]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'export.filter.person.without_participation_between_dates.title'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php index 688195cd5..274daed02 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorFilter.php @@ -32,7 +32,7 @@ final readonly class CreatorFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -47,7 +47,7 @@ final readonly class CreatorFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('creators', PickUserDynamicType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php index 28d409670..94be81a39 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php @@ -37,7 +37,7 @@ final readonly class CreatorJobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -66,7 +66,7 @@ final readonly class CreatorJobFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('jobs', EntityType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php index 390e2edca..919d29a3e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php @@ -37,7 +37,7 @@ class CreatorScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -66,7 +66,7 @@ class CreatorScopeFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scopes', EntityType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 74082fee0..82f7aefb5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -37,7 +37,7 @@ final readonly class JobFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -56,7 +56,7 @@ final readonly class JobFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('job', EntityType::class, [ @@ -86,7 +86,7 @@ final readonly class JobFilter implements FilterInterface return ['job' => $this->denormalizeDoctrineEntity($formData['job'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { $userjobs = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php index 9b1a1a57c..5d6f40d5c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -33,7 +33,7 @@ final readonly class ReferrerFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -55,7 +55,7 @@ final readonly class ReferrerFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('accepted_agents', PickUserDynamicType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index 6aa4ea097..b3cbb8941 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -37,7 +37,7 @@ final readonly class ScopeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $p = self::PREFIX; @@ -50,12 +50,12 @@ final readonly class ScopeFilter implements FilterInterface ->setParameter("{$p}_scope", $data['scope']); } - public function applyOn() + public function applyOn(): string { return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('scope', EntityType::class, [ diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index 93d5e0097..ec0e6f547 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -33,7 +33,7 @@ class SocialWorkTypeFilter implements FilterInterface return null; } - public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { if (\count($data['actionType']) > 0) { $qb @@ -73,7 +73,7 @@ class SocialWorkTypeFilter implements FilterInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) + public function buildForm(FormBuilderInterface $builder): void { $builder ->add('actionType', HiddenType::class) diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php index a524cc0eb..ab2a45bc9 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php @@ -269,7 +269,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface } } - public function getQueryKeys($data) + public function getQueryKeys($data): array { $fields = []; @@ -283,12 +283,12 @@ class ReportList implements ExportElementValidatedInterface, ListInterface return [...$fields, ...\array_keys($this->slugs)]; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context) + public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return $this->translator->trans( "List for report '%type%'", @@ -298,7 +298,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface ); } - public function getType() + public function getType(): string { return 'report'; } @@ -429,7 +429,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface return [Declarations::PERSON_TYPE, 'report']; } - public function validateForm($data, ExecutionContextInterface $context) + public function validateForm($data, ExecutionContextInterface $context): void { // get the field starting with address_ $addressFields = array_filter( diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php b/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php index fcc21e726..55218f3ce 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportListProvider.php @@ -53,7 +53,7 @@ class ReportListProvider implements ExportElementsProviderInterface $this->customFieldProvider = $customFieldProvider; } - public function getExportElements() + public function getExportElements(): iterable { $groups = $this->em->getRepository(CustomFieldsGroup::class) ->findBy(['entity' => Report::class]); diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php index 294a8d5e9..c997fed0b 100644 --- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php +++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php @@ -26,7 +26,7 @@ class ReportDateFilter implements FilterInterface return null; } - public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext) + public function alterQuery(\Doctrine\ORM\QueryBuilder $qb, $data, \Chill\MainBundle\Export\ExportGenerationContext $exportGenerationContext): void { $where = $qb->getDQLPart('where'); $clause = $qb->expr()->between( @@ -52,12 +52,12 @@ class ReportDateFilter implements FilterInterface ); } - public function applyOn() + public function applyOn(): string { return 'report'; } - public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder) + public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder): void { $builder->add('date_from', PickRollingDateType::class, [ 'label' => 'Report is after this date', @@ -88,7 +88,7 @@ class ReportDateFilter implements FilterInterface return ['date_from' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), 'date_to' => new RollingDate(RollingDate::T_TODAY)]; } - public function describeAction($data, $format = 'string') + public function describeAction($data, $format = 'string'): string|\Symfony\Contracts\Translation\TranslatableInterface|array { return ['Filtered by report\'s date: ' .'between %date_from% and %date_to%', [ @@ -97,7 +97,7 @@ class ReportDateFilter implements FilterInterface ], ]; } - public function getTitle() + public function getTitle(): string|\Symfony\Contracts\Translation\TranslatableInterface { return 'Filter by report\'s date'; }