From 5b2a2a1bc5699f04530eb843918c56331c004e73 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 13 Dec 2023 17:45:08 +0100 Subject: [PATCH 01/82] Add WithParticipationBetweenDatesFilter to ChillPersonBundle This update adds a new filter, WithParticipationBetweenDatesFilter, to the ChillPersonBundle. This filter helps to find persons who participated in any parcours between specified date ranges. Additionally, relevant French translations have been updated and the filter has been registered in the services configuration file. --- .../WithParticipationBetweenDatesFilter.php | 96 +++++++++++++++++++ .../config/services/exports_person.yaml | 4 + .../translations/messages.fr.yml | 4 + 3 files changed, 104 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php new file mode 100644 index 000000000..52d788894 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -0,0 +1,96 @@ +andWhere( + $qb->expr()->exists( + 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ". + "WHERE {$p}_acpp.person = person ". + "AND OVERLAPSI (acpp.startDate, acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = 'TRUE' ") + ) + ->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE) + ->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE); + + } + + public function applyOn(): string + { + return Declarations::PERSON_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder->add('date_after', PickRollingDateType::class, [ + 'label' => 'export.filter.person.with_participation_between_dates.date_after', + ]); + + $builder->add('date_before', PickRollingDateType::class, [ + 'label' => 'export.filter.person.with_participation_between_dates.date_before', + ]); + } + + public function getFormDefaultData(): array + { + return [ + 'date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), + 'date_before' => new RollingDate(RollingDate::T_TODAY), + ]; + } + + public function describeAction($data, $format = 'string') + { + return ['Filtered by participations during period: between %dateafter% and %datebefore%', [ + '%dateafter%' => $this->rollingDateConverter->convert($data['date_after'])->format('d-m-Y'), + '%datebefore%' => $this->rollingDateConverter->convert($data['date_before'])->format('d-m-Y'), + ]]; + } + + public function getTitle() + { + return 'export.filter.person.with_participation_between_dates.title'; + } + +} diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_person.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_person.yaml index d25a3b9e6..c0ed03115 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_person.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_person.yaml @@ -116,6 +116,10 @@ services: tags: - { name: chill.export_filter, alias: person_without_household_composition_filter } + Chill\PersonBundle\Export\Filter\PersonFilters\WithParticipationBetweenDatesFilter: + tags: + - { name: chill.export_filter, alias: person_with_participation_between_dates_filter } + ## Aggregators chill.person.export.aggregator_nationality: class: Chill\PersonBundle\Export\Aggregator\PersonAggregators\NationalityAggregator diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 82c538c69..578bdb8d0 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1142,6 +1142,10 @@ export: Filtered by person\'s address status computed at %datecalc%, only %statuses%: Filtré par comparaison à l'adresse de référence, calculé à %datecalc%, seulement %statuses% Status: Statut Address at date: Adresse à la date + with_participation_between_dates: + date_after: Concerné par un parcours après le + date_before: Concerné par un parcours avant le + title: Filtrer les usagers ayant été associés à un parcours ouverts un jour dans la période de temps indiquée course: having_info_within_interval: From b9890d13026b0fc3a99455630d31303e5e32858c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 10:33:30 +0100 Subject: [PATCH 02/82] Minor fixes --- .../WithParticipationBetweenDatesFilter.php | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 52d788894..121abb8d0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -46,14 +46,19 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf $qb ->andWhere( - $qb->expr()->exists( - 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ". - "WHERE {$p}_acpp.person = person ". - "AND OVERLAPSI (acpp.startDate, acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = 'TRUE' ") + $qb->expr()->andX( + $qb->expr()->exists( + "SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp ". + "WHERE {$p}_acp.person = person ". + "AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE"), + $qb->expr()->exists( + 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ". + "WHERE {$p}_acpp.person = person ". + "AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE") + ) ) ->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE) ->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE); - } public function applyOn(): string @@ -75,7 +80,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf public function getFormDefaultData(): array { return [ - 'date_after' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), + 'date_after' => new RollingDate(RollingDate::T_YEAR_CURRENT_START), 'date_before' => new RollingDate(RollingDate::T_TODAY), ]; } From 044bab45ad3f8443679fc4ff29a61dccfb177f80 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 15:29:59 +0100 Subject: [PATCH 03/82] Fix query : was missing parenthesis. --- .../WithParticipationBetweenDatesFilter.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 121abb8d0..ab921c895 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -20,6 +20,7 @@ use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; use Chill\MainBundle\Templating\TranslatableStringHelper; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Export\Declarations; use Doctrine\DBAL\Types\Types; @@ -46,16 +47,14 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf $qb ->andWhere( - $qb->expr()->andX( + $qb->expr()->exists( - "SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp ". + "SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp JOIN {$p}_acp.accompanyingPeriod {$p}_acpp ". "WHERE {$p}_acp.person = person ". - "AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE"), - $qb->expr()->exists( - 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ". - "WHERE {$p}_acpp.person = person ". - "AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE") - ) + "AND OVERLAPSI({$p}_acp.startDate, {$p}_acp.endDate), (:{$p}_date_after, :{$p}_date_before) = TRUE ". + "AND OVERLAPSI({$p}_acpp.openingDate, {$p}_acpp.closingDate), (:{$p}_date_after, :{$p}_date_before) = TRUE") + + ) ->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE) ->setParameter("{$p}_date_before", $this->rollingDateConverter->convert($data['date_before']), Types::DATE_IMMUTABLE); From 34cbd2605c0e8da0ab8bc887b0bc4d772c21f8c2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 15:32:04 +0100 Subject: [PATCH 04/82] Add a changie --- .changes/unreleased/Feature-20231218-153151.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Feature-20231218-153151.yaml diff --git a/.changes/unreleased/Feature-20231218-153151.yaml b/.changes/unreleased/Feature-20231218-153151.yaml new file mode 100644 index 000000000..8a842bfa2 --- /dev/null +++ b/.changes/unreleased/Feature-20231218-153151.yaml @@ -0,0 +1,6 @@ +kind: Feature +body: Create new filter for persons having a participation in an accompanying period + during a certain time span +time: 2023-12-18T15:31:51.489901829+01:00 +custom: + Issue: "231" From c06c861e175819c0ad294f97ffb117856e888462 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 15:38:20 +0100 Subject: [PATCH 05/82] Php cs fixes --- .../WithParticipationBetweenDatesFilter.php | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 121abb8d0..48c44463a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -11,27 +11,19 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter\PersonFilters; -use Chill\ActivityBundle\Entity\Activity; -use Chill\ActivityBundle\Entity\ActivityReason; -use Chill\ActivityBundle\Repository\ActivityReasonRepository; -use Chill\MainBundle\Export\ExportElementValidatedInterface; use Chill\MainBundle\Export\FilterInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; -use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Export\Declarations; use Doctrine\DBAL\Types\Types; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; -use Symfony\Component\Validator\Context\ExecutionContextInterface; final readonly class WithParticipationBetweenDatesFilter implements FilterInterface { public function __construct( - private TranslatableStringHelper $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter, ) {} @@ -48,13 +40,15 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf ->andWhere( $qb->expr()->andX( $qb->expr()->exists( - "SELECT 1 FROM ".AccompanyingPeriodParticipation::class." {$p}_acp ". + 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acp ". "WHERE {$p}_acp.person = person ". - "AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE"), + "AND OVERLAPSI ({$p}_acp.openingDate, {$p}_acp.closingDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE" + ), $qb->expr()->exists( 'SELECT 1 FROM '.AccompanyingPeriodParticipation::class." {$p}_acpp ". "WHERE {$p}_acpp.person = person ". - "AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE") + "AND OVERLAPSI ({$p}_acpp.startDate, {$p}_acpp.endDate), (:{$p}_date_after), :{$p}_date_before)) = TRUE" + ) ) ) ->setParameter("{$p}_date_after", $this->rollingDateConverter->convert($data['date_after']), Types::DATE_IMMUTABLE) @@ -97,5 +91,4 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf { return 'export.filter.person.with_participation_between_dates.title'; } - } From d2a31de1be42d1385b338c5b4ddf37699d404ccf Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 17:04:16 +0100 Subject: [PATCH 06/82] Add a missing translation for the filter description --- .../PersonFilters/WithParticipationBetweenDatesFilter.php | 2 +- src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 71b79ba54..289af5f07 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -75,7 +75,7 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf public function describeAction($data, $format = 'string') { - return ['Filtered by participations during period: between %dateafter% and %datebefore%', [ + 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'), '%datebefore%' => $this->rollingDateConverter->convert($data['date_before'])->format('d-m-Y'), ]]; diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 578bdb8d0..783bc6be0 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1146,6 +1146,7 @@ export: date_after: Concerné par un parcours après le date_before: Concerné par un parcours avant le title: Filtrer les usagers ayant été associés à un parcours ouverts un jour dans la période de temps indiquée + 'Filtered by participations during period: between %dateafter% and %datebefore%': 'Filtré par personne concerné par un parcours dans la periode entre: %dateafter% et %datebefore%' course: having_info_within_interval: From f103b228e42889c1dcda0c406287c65d16f4bac3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 17:04:42 +0100 Subject: [PATCH 07/82] Create test for the participationBetweenDatesFilter --- ...ithParticipationBetweenDatesFilterTest.php | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php new file mode 100644 index 000000000..bbca0e8bb --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php @@ -0,0 +1,58 @@ +filter = self::$container->get(WithParticipationBetweenDatesFilter::class); + } + + /** + * @inheritDoc + */ + public function getFilter() + { + return $this->filter; + } + + /** + * @inheritDoc + */ + public function getFormData() + { + return [ + [ + 'date_after' => new RollingDate(RollingDate::T_YEAR_CURRENT_START), + 'date_before' => new RollingDate(RollingDate::T_TODAY), + ], + ]; + } + + /** + * @inheritDoc + */ + public function getQueryBuilders() + { + self::bootKernel(); + + $em = self::$container->get(EntityManagerInterface::class); + + return [ + $em->createQueryBuilder() + ->select('person.id') + ->from(Person::class, 'person'), + ]; + } +} From 469e379166f587be917dcb66bb95c9e2e2f832b7 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 18 Dec 2023 17:05:18 +0100 Subject: [PATCH 08/82] php cs fixes --- ...ithParticipationBetweenDatesFilterTest.php | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php index bbca0e8bb..d9c58e743 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilterTest.php @@ -1,5 +1,14 @@ filter = self::$container->get(WithParticipationBetweenDatesFilter::class); } - /** - * @inheritDoc - */ public function getFilter() { return $this->filter; } - /** - * @inheritDoc - */ public function getFormData() { return [ @@ -40,9 +48,6 @@ final class WithParticipationBetweenDatesFilterTest extends AbstractFilterTest ]; } - /** - * @inheritDoc - */ public function getQueryBuilders() { self::bootKernel(); From 4d72933edb472aa964c54940814650cfd748f768 Mon Sep 17 00:00:00 2001 From: LenaertsJ Date: Wed, 20 Dec 2023 10:46:29 +0000 Subject: [PATCH 09/82] Add condition to household export queries to exclude accompanying periods that are in draft. --- .changes/unreleased/Fixed-20231218-162157.yaml | 6 ++++++ .../Export/Export/CountHouseholdInPeriod.php | 5 ++++- .../Export/Export/ListHouseholdInPeriod.php | 5 ++++- .../Tests/Controller/RelationshipApiControllerTest.php | 6 +++--- 4 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .changes/unreleased/Fixed-20231218-162157.yaml diff --git a/.changes/unreleased/Fixed-20231218-162157.yaml b/.changes/unreleased/Fixed-20231218-162157.yaml new file mode 100644 index 000000000..198134c3e --- /dev/null +++ b/.changes/unreleased/Fixed-20231218-162157.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix the household export query to exclude accompanying periods that are in draft + state. +time: 2023-12-18T16:21:57.827287397+01:00 +custom: + Issue: "" diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php index 8b56be371..a65dcb217 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHouseholdInPeriod.php @@ -17,6 +17,7 @@ use Chill\MainBundle\Export\GroupedExportInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Person\PersonCenterHistory; use Chill\PersonBundle\Export\Declarations; @@ -121,7 +122,9 @@ class CountHouseholdInPeriod implements ExportInterface, GroupedExportInterface ->join('acppart.accompanyingPeriod', 'acp') ->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL') ->andWhere('hmember.startDate <= :count_household_at_date AND (hmember.endDate IS NULL OR hmember.endDate > :count_household_at_date)') - ->setParameter('count_household_at_date', $this->rollingDateConverter->convert($data['calc_date'])); + ->andWhere('acp.step != :count_acp_step') + ->setParameter('count_household_at_date', $this->rollingDateConverter->convert($data['calc_date'])) + ->setParameter('count_acp_step', AccompanyingPeriod::STEP_DRAFT); $qb ->select('COUNT(DISTINCT household.id) AS household_export_result') diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php index 46770fab8..21f7a5923 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListHouseholdInPeriod.php @@ -20,6 +20,7 @@ use Chill\MainBundle\Export\ListInterface; use Chill\MainBundle\Form\Type\PickRollingDateType; use Chill\MainBundle\Service\RollingDate\RollingDate; use Chill\MainBundle\Service\RollingDate\RollingDateConverterInterface; +use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Entity\Household\Household; use Chill\PersonBundle\Entity\Household\HouseholdComposition; use Chill\PersonBundle\Entity\Household\HouseholdMember; @@ -144,7 +145,9 @@ class ListHouseholdInPeriod implements ListInterface, GroupedExportInterface ->join('acppart.accompanyingPeriod', 'acp') ->andWhere('acppart.startDate != acppart.endDate OR acppart.endDate IS NULL') ->andWhere('hmember.startDate <= :count_household_at_date AND (hmember.endDate IS NULL OR hmember.endDate > :count_household_at_date)') - ->setParameter('count_household_at_date', $this->rollingDateConverter->convert($data['calc_date'])); + ->andWhere('acp.step != :list_acp_step') + ->setParameter('count_household_at_date', $this->rollingDateConverter->convert($data['calc_date'])) + ->setParameter('list_acp_step', AccompanyingPeriod::STEP_DRAFT); if ($this->filterStatsByCenters) { $qb diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php index 171dedacb..626e1469b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/RelationshipApiControllerTest.php @@ -50,7 +50,7 @@ final class RelationshipApiControllerTest extends WebTestCase ->join('p.centerCurrent', 'center_current') ->join('center_current.center', 'c') ->where('c.name LIKE :name') - ->andWhere('EXISTS (SELECT 1 FROM ' . Relationship::class . ' r WHERE r.fromPerson = p OR r.toPerson = p)') + ->andWhere('EXISTS (SELECT 1 FROM '.Relationship::class.' r WHERE r.fromPerson = p OR r.toPerson = p)') ->setParameter('name', 'Center A') ->getQuery() ->setMaxResults(1) @@ -62,7 +62,7 @@ final class RelationshipApiControllerTest extends WebTestCase ->join('p.centerCurrent', 'center_current') ->join('center_current.center', 'c') ->where('c.name LIKE :name') - ->andWhere('NOT EXISTS (SELECT 1 FROM ' . Relationship::class . ' r WHERE r.fromPerson = p OR r.toPerson = p)') + ->andWhere('NOT EXISTS (SELECT 1 FROM '.Relationship::class.' r WHERE r.fromPerson = p OR r.toPerson = p)') ->setParameter('name', 'Center A') ->getQuery() ->setMaxResults(1) @@ -85,7 +85,7 @@ final class RelationshipApiControllerTest extends WebTestCase ->join('p.centerCurrent', 'center_current') ->join('center_current.center', 'c') ->where('c.name LIKE :name') - ->andWhere('NOT EXISTS (SELECT 1 FROM ' . Relationship::class . ' r WHERE r.fromPerson = p OR r.toPerson = p)') + ->andWhere('NOT EXISTS (SELECT 1 FROM '.Relationship::class.' r WHERE r.fromPerson = p OR r.toPerson = p)') ->setParameter('name', 'Center A') ->getQuery() ->setMaxResults(2) From 60ede58af019d1ed220be7957840f3fc5979c3bc Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 20 Dec 2023 11:49:38 +0100 Subject: [PATCH 10/82] Update chill-bundles version --- .changes/unreleased/DX-20231212-154458.yaml | 6 ------ .changes/unreleased/Fixed-20231218-162157.yaml | 6 ------ .changes/v2.15.1.md | 5 +++++ CHANGELOG.md | 6 ++++++ 4 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 .changes/unreleased/DX-20231212-154458.yaml delete mode 100644 .changes/unreleased/Fixed-20231218-162157.yaml create mode 100644 .changes/v2.15.1.md diff --git a/.changes/unreleased/DX-20231212-154458.yaml b/.changes/unreleased/DX-20231212-154458.yaml deleted file mode 100644 index ae534a693..000000000 --- a/.changes/unreleased/DX-20231212-154458.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: DX -body: Fixed readthedocs compilation by updating readthedocs config file and requirements - for Sphinx -time: 2023-12-12T15:44:58.282590276+01:00 -custom: - Issue: "167" diff --git a/.changes/unreleased/Fixed-20231218-162157.yaml b/.changes/unreleased/Fixed-20231218-162157.yaml deleted file mode 100644 index 198134c3e..000000000 --- a/.changes/unreleased/Fixed-20231218-162157.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Fix the household export query to exclude accompanying periods that are in draft - state. -time: 2023-12-18T16:21:57.827287397+01:00 -custom: - Issue: "" diff --git a/.changes/v2.15.1.md b/.changes/v2.15.1.md new file mode 100644 index 000000000..aa510541d --- /dev/null +++ b/.changes/v2.15.1.md @@ -0,0 +1,5 @@ +## v2.15.1 - 2023-12-20 +### Fixed +* Fix the household export query to exclude accompanying periods that are in draft state. +### DX +* ([#167](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/167)) Fixed readthedocs compilation by updating readthedocs config file and requirements for Sphinx diff --git a/CHANGELOG.md b/CHANGELOG.md index 9815a47ee..2d3b6e42c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v2.15.1 - 2023-12-20 +### Fixed +* Fix the household export query to exclude accompanying periods that are in draft state. +### DX +* ([#167](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/167)) Fixed readthedocs compilation by updating readthedocs config file and requirements for Sphinx + ## v2.15.0 - 2023-12-11 ### Feature * ([#191](https://gitlab.com/Chill-Projet/chill-bundles/-/issues/191)) Add export "number of household associate with an exchange" From 3c8e59e088fd0f7f7d060e398180cfa783c9fde2 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 10 Jan 2024 10:31:25 +0100 Subject: [PATCH 11/82] php cs fixes after updating php cs fixer --- .../ChillActivityBundle.php | 4 +- .../Controller/ActivityController.php | 7 ++- .../ActivityReasonCategoryController.php | 8 +-- .../Controller/ActivityReasonController.php | 10 ++-- .../EntityListener/ActivityEntityListener.php | 4 +- .../ByActivityTypeAggregator.php | 3 +- .../BySocialActionAggregator.php | 4 +- .../BySocialIssueAggregator.php | 4 +- .../Aggregator/ActivityPresenceAggregator.php | 8 ++- .../Aggregator/ActivityTypeAggregator.php | 4 +- .../Aggregator/ActivityUserAggregator.php | 4 +- .../Aggregator/ActivityUsersAggregator.php | 4 +- .../Aggregator/ActivityUsersJobAggregator.php | 7 ++- .../ActivityUsersScopeAggregator.php | 7 ++- .../Export/Aggregator/ByCreatorAggregator.php | 4 +- .../Aggregator/ByThirdpartyAggregator.php | 4 +- .../Aggregator/CreatorJobAggregator.php | 7 ++- .../Aggregator/CreatorScopeAggregator.php | 7 ++- .../Aggregator/LocationTypeAggregator.php | 4 +- .../ActivityReasonAggregator.php | 4 +- .../PersonAggregators/PersonAggregator.php | 4 +- .../Export/Aggregator/PersonsAggregator.php | 4 +- .../Aggregator/SentReceivedAggregator.php | 4 +- .../LinkedToACP/AvgActivityDuration.php | 4 +- .../Export/LinkedToACP/CountActivity.php | 4 +- .../LinkedToACP/CountHouseholdOnActivity.php | 4 +- .../LinkedToACP/CountPersonsOnActivity.php | 4 +- .../Export/LinkedToACP/ListActivity.php | 3 +- .../Export/LinkedToPerson/CountActivity.php | 4 +- .../CountHouseholdOnActivity.php | 4 +- .../LinkedToPerson/StatActivityDuration.php | 4 +- .../Export/Export/ListActivityHelper.php | 7 ++- .../Filter/ACPFilters/ActivityTypeFilter.php | 3 +- .../ACPFilters/BySocialActionFilter.php | 4 +- .../Filter/ACPFilters/BySocialIssueFilter.php | 4 +- ...PeriodHavingActivityBetweenDatesFilter.php | 3 +- .../Export/Filter/ActivityDateFilter.php | 4 +- .../Export/Filter/ActivityPresenceFilter.php | 3 +- .../Export/Filter/ActivityTypeFilter.php | 3 +- .../Export/Filter/ActivityUsersFilter.php | 4 +- .../Export/Filter/ByCreatorFilter.php | 4 +- .../Export/Filter/CreatorJobFilter.php | 3 +- .../Export/Filter/CreatorScopeFilter.php | 3 +- .../Export/Filter/EmergencyFilter.php | 4 +- .../Export/Filter/LocationTypeFilter.php | 4 +- .../PersonFilters/ActivityReasonFilter.php | 4 +- .../PersonHavingActivityBetweenDateFilter.php | 3 +- .../Export/Filter/PersonsFilter.php | 4 +- .../Export/Filter/SentReceivedFilter.php | 4 +- .../Export/Filter/UserFilter.php | 4 +- .../Export/Filter/UsersJobFilter.php | 3 +- .../Export/Filter/UsersScopeFilter.php | 3 +- .../ChillActivityBundle/Form/ActivityType.php | 2 +- .../Form/ActivityTypeType.php | 4 +- .../Form/Type/PickActivityReasonType.php | 3 +- ...TranslatableActivityReasonCategoryType.php | 4 +- .../Form/Type/TranslatableActivityType.php | 4 +- .../Menu/AccompanyingCourseMenuBuilder.php | 4 +- .../Menu/AdminMenuBuilder.php | 4 +- .../Menu/PersonMenuBuilder.php | 6 +- .../ActivityNotificationHandler.php | 4 +- .../Repository/ActivityACLAwareRepository.php | 3 +- .../ActivityDocumentACLAwareRepository.php | 3 +- .../Service/DocGenerator/ActivityContext.php | 3 +- ...tActivitiesByAccompanyingPeriodContext.php | 3 +- ...anyingPeriodActivityGenericDocProvider.php | 3 +- .../PersonActivityGenericDocProvider.php | 3 +- ...anyingPeriodActivityGenericDocRenderer.php | 4 +- .../Controller/ActivityControllerTest.php | 2 +- ...sonHavingActivityBetweenDateFilterTest.php | 2 +- .../Type/TranslatableActivityTypeTest.php | 4 +- .../src/ChillAsideActivityBundle.php | 4 +- .../Controller/AsideActivityController.php | 4 +- .../DataFixtures/ORM/LoadAsideActivity.php | 4 +- .../Aggregator/ByActivityTypeAggregator.php | 3 +- .../Aggregator/ByLocationAggregator.php | 4 +- .../Export/Aggregator/ByUserJobAggregator.php | 7 ++- .../Aggregator/ByUserScopeAggregator.php | 7 ++- .../Export/AvgAsideActivityDuration.php | 8 ++- .../src/Export/Export/CountAsideActivity.php | 8 ++- .../src/Export/Export/ListAsideActivity.php | 7 ++- .../Export/SumAsideActivityDuration.php | 8 ++- .../Export/Filter/ByActivityTypeFilter.php | 3 +- .../src/Export/Filter/ByDateFilter.php | 4 +- .../src/Export/Filter/ByLocationFilter.php | 3 +- .../src/Export/Filter/ByUserFilter.php | 4 +- .../src/Export/Filter/ByUserJobFilter.php | 3 +- .../src/Export/Filter/ByUserScopeFilter.php | 3 +- .../src/Form/AsideActivityCategoryType.php | 4 +- .../Type/PickAsideActivityCategoryType.php | 4 +- .../src/Menu/AdminMenuBuilder.php | 4 +- .../src/Menu/SectionMenuBuilder.php | 4 +- .../src/Templating/Entity/CategoryRender.php | 4 +- .../Controller/AbstractElementController.php | 4 +- .../Controller/ElementController.php | 4 +- .../ChillBudgetBundle/Form/ChargeType.php | 4 +- .../ChillBudgetBundle/Form/ResourceType.php | 4 +- .../Menu/AdminMenuBuilder.php | 4 +- .../Menu/HouseholdMenuBuilder.php | 4 +- .../Menu/PersonMenuBuilder.php | 4 +- .../Service/Summary/SummaryBudget.php | 4 +- .../Templating/BudgetElementTypeRender.php | 4 +- .../Controller/CalendarAPIController.php | 4 +- .../Controller/CalendarController.php | 5 +- .../Controller/CalendarDocController.php | 3 +- .../Controller/CalendarRangeAPIController.php | 4 +- .../Controller/InviteApiController.php | 4 +- .../RemoteCalendarConnectAzureController.php | 4 +- .../RemoteCalendarMSGraphSyncController.php | 4 +- .../RemoteCalendarProxyController.php | 4 +- .../DataFixtures/ORM/LoadCalendarRange.php | 4 +- .../Event/ListenToActivityCreate.php | 4 +- .../Export/Aggregator/AgentAggregator.php | 4 +- .../Aggregator/CancelReasonAggregator.php | 4 +- .../Export/Aggregator/JobAggregator.php | 7 ++- .../Export/Aggregator/LocationAggregator.php | 4 +- .../Aggregator/LocationTypeAggregator.php | 4 +- .../Export/Aggregator/ScopeAggregator.php | 7 ++- .../Export/Aggregator/UrgencyAggregator.php | 4 +- .../Export/Export/CountCalendars.php | 3 +- .../Export/Export/StatCalendarAvgDuration.php | 4 +- .../Export/Export/StatCalendarSumDuration.php | 4 +- .../Export/Filter/AgentFilter.php | 4 +- .../Export/Filter/BetweenDatesFilter.php | 4 +- .../Export/Filter/CalendarRangeFilter.php | 4 +- .../Export/Filter/JobFilter.php | 3 +- .../Export/Filter/ScopeFilter.php | 3 +- .../ChillCalendarBundle/Form/CalendarType.php | 3 +- .../Menu/AccompanyingCourseMenuBuilder.php | 4 +- .../Menu/PersonMenuBuilder.php | 4 +- .../Menu/UserMenuBuilder.php | 4 +- .../Doctrine/CalendarEntityListener.php | 4 +- .../Doctrine/CalendarRangeEntityListener.php | 4 +- .../CalendarRangeRemoveToRemoteHandler.php | 4 +- .../Handler/CalendarRangeToRemoteHandler.php | 4 +- .../Handler/CalendarRemoveHandler.php | 4 +- .../Handler/CalendarToRemoteHandler.php | 4 +- .../Messenger/Handler/InviteUpdateHandler.php | 4 +- .../MSGraphChangeNotificationHandler.php | 4 +- .../MSGraphChangeNotificationMessage.php | 4 +- .../Connector/MSGraph/AddressConverter.php | 4 +- .../EventsOnUserSubscriptionCreator.php | 4 +- .../Connector/MSGraph/LocationConverter.php | 4 +- .../Connector/MSGraph/MSUserAbsenceReader.php | 3 +- .../Connector/MSGraph/MSUserAbsenceSync.php | 3 +- .../Connector/MSGraph/MachineTokenStorage.php | 4 +- .../Connector/MSGraph/MapCalendarToUser.php | 4 +- .../MSGraph/OnBehalfOfUserTokenStorage.php | 4 +- .../RemoteToLocalSync/CalendarRangeSyncer.php | 4 +- .../RemoteToLocalSync/CalendarSyncer.php | 4 +- .../MSGraphRemoteCalendarConnector.php | 4 +- .../Connector/NullRemoteCalendarConnector.php | 20 +++++-- .../RemoteCalendar/Model/RemoteEvent.php | 3 +- .../Repository/CalendarACLAwareRepository.php | 4 +- .../Security/Voter/CalendarDocVoter.php | 4 +- .../Service/DocGenerator/CalendarContext.php | 3 +- .../DocGenerator/CalendarContextInterface.php | 4 +- ...anyingPeriodCalendarGenericDocProvider.php | 3 +- .../PersonCalendarGenericDocProvider.php | 3 +- ...anyingPeriodCalendarGenericDocRenderer.php | 4 +- .../BulkCalendarShortMessageSender.php | 4 +- .../CalendarForShortMessageProvider.php | 4 +- .../DefaultShortMessageForCalendarBuilder.php | 4 +- .../Command/CreateFieldsOnGroupCommand.php | 2 +- .../Controller/CustomFieldController.php | 6 +- .../CustomFieldsGroupController.php | 18 +++--- .../CustomFields/CustomFieldChoice.php | 3 +- .../CustomFields/CustomFieldDate.php | 3 +- .../CustomFields/CustomFieldLongChoice.php | 3 +- .../CustomFields/CustomFieldNumber.php | 3 +- .../CustomFields/CustomFieldText.php | 3 +- .../CustomFields/CustomFieldTitle.php | 3 +- .../Form/CustomFieldType.php | 4 +- .../Form/CustomFieldsGroupType.php | 3 +- .../CustomFieldDataTransformer.php | 4 +- .../CustomFieldsGroupToIdTransformer.php | 4 +- .../Form/Type/CustomFieldsTitleType.php | 4 +- .../Form/Type/LinkedCustomFieldsType.php | 4 +- .../Service/CustomFieldsHelper.php | 4 +- .../Twig/CustomFieldRenderingTwig.php | 4 +- .../CustomFields/CustomFieldsChoiceTest.php | 2 +- .../CustomFields/CustomFieldsTextTest.php | 2 +- .../Context/ContextManager.php | 4 +- .../AdminDocGeneratorTemplateController.php | 4 +- .../DocGeneratorTemplateController.php | 4 +- .../Form/DocGeneratorTemplateType.php | 4 +- .../Menu/AdminMenuBuilder.php | 4 +- .../Helper/NormalizeNullValueHelper.php | 4 +- .../Service/Context/BaseContextData.php | 4 +- .../Service/Generator/Generator.php | 4 +- .../Service/Messenger/OnGenerationFails.php | 6 +- .../Messenger/RequestGenerationHandler.php | 4 +- .../DocumentAccompanyingCourseController.php | 3 +- .../Controller/DocumentCategoryController.php | 6 +- .../Controller/DocumentPersonController.php | 3 +- ...ericDocForAccompanyingPeriodController.php | 3 +- .../Controller/GenericDocForPerson.php | 3 +- .../Controller/StoredObjectApiController.php | 4 +- .../Entity/DocumentCategory.php | 3 +- .../Entity/PersonDocument.php | 2 +- .../Form/PersonDocumentType.php | 4 +- .../GenericDoc/FetchQuery.php | 3 +- .../GenericDoc/GenericDocDTO.php | 3 +- ...anyingCourseDocumentGenericDocProvider.php | 3 +- .../PersonDocumentGenericDocProvider.php | 3 +- ...anyingCourseDocumentGenericDocRenderer.php | 3 +- .../Twig/GenericDocExtensionRuntime.php | 3 +- .../ChillDocStoreBundle/Menu/MenuBuilder.php | 4 +- .../PersonDocumentACLAwareRepository.php | 3 +- .../Normalizer/StoredObjectDenormalizer.php | 4 +- .../Service/StoredObjectManager.php | 4 +- .../WopiEditTwigExtensionRuntime.php | 4 +- .../ChillEventBundle/ChillEventBundle.php | 4 +- .../Controller/EventController.php | 12 ++-- .../Controller/EventTypeController.php | 10 ++-- .../Controller/ParticipationController.php | 18 +++--- .../Controller/RoleController.php | 10 ++-- .../Controller/StatusController.php | 10 ++-- .../DataFixtures/ORM/LoadParticipation.php | 2 +- .../Form/ParticipationType.php | 4 +- src/Bundle/ChillEventBundle/Form/RoleType.php | 4 +- .../Form/Type/PickEventType.php | 3 +- .../Form/Type/PickRoleType.php | 3 +- .../Form/Type/PickStatusType.php | 4 +- .../ChillEventBundle/Search/EventSearch.php | 3 +- .../Tests/Search/EventSearchTest.php | 2 +- .../Controller/AbstractCRUDController.php | 4 +- .../CRUD/Controller/CRUDController.php | 56 ++++++++++++++----- .../CRUD/Form/CRUDDeleteEntityForm.php | 4 +- .../Command/LoadAndUpdateLanguagesCommand.php | 4 +- .../Command/LoadCountriesCommand.php | 2 +- .../Command/LoadPostalCodesCommand.php | 12 +++- .../Command/SetPasswordCommand.php | 2 +- .../AddressReferenceAPIController.php | 4 +- .../AddressToReferenceMatcherController.php | 4 +- .../Controller/ExportController.php | 18 +++--- ...GeographicalUnitByAddressApiController.php | 4 +- .../Controller/LocationTypeController.php | 4 +- .../Controller/LoginController.php | 4 +- .../Controller/NotificationApiController.php | 4 +- .../Controller/NotificationController.php | 4 +- .../Controller/PermissionApiController.php | 4 +- .../Controller/PermissionsGroupController.php | 3 +- .../Controller/PostalCodeAPIController.php | 4 +- .../Controller/SavedExportController.php | 4 +- .../Controller/ScopeController.php | 8 +-- .../Controller/SearchController.php | 6 +- .../Controller/TimelineCenterController.php | 4 +- .../Controller/UserController.php | 12 ++-- .../Controller/UserExportController.php | 3 +- .../UserJobScopeHistoriesController.php | 3 +- .../Controller/UserProfileController.php | 3 +- .../Controller/WorkflowApiController.php | 4 +- .../Controller/WorkflowController.php | 4 +- .../ChillMainBundle/Cron/CronManager.php | 3 +- .../ChillMainExtension.php | 12 ++-- .../Event/TrackCreateUpdateSubscriber.php | 4 +- .../ChillMainBundle/Doctrine/Model/Point.php | 4 +- .../SimpleGeographicalUnitDTO.php | 3 +- .../Entity/PermissionsGroup.php | 4 +- src/Bundle/ChillMainBundle/Entity/User.php | 6 +- .../Export/ExportFormHelper.php | 3 +- .../Export/Formatter/CSVListFormatter.php | 2 +- .../Formatter/CSVPivotedListFormatter.php | 2 +- .../Formatter/SpreadsheetListFormatter.php | 2 +- .../Export/Helper/DateTimeHelper.php | 4 +- .../Export/Helper/ExportAddressHelper.php | 4 +- .../TranslatableStringExportLabelHelper.php | 4 +- .../Export/Helper/UserHelper.php | 4 +- .../ChillMainBundle/Export/ListInterface.php | 4 +- .../Export/SortExportElement.php | 3 +- .../DataMapper/PrivateCommentDataMapper.php | 4 +- .../Form/DataMapper/ScopePickerDataMapper.php | 4 +- .../Form/Event/CustomizeFormEvent.php | 4 +- .../ChillMainBundle/Form/LocationFormType.php | 4 +- .../Form/Type/AppendScopeChoiceTypeTrait.php | 2 +- .../Form/Type/ComposedGroupCenterType.php | 4 +- .../AddressToIdDataTransformer.php | 4 +- .../DataTransformer/CenterTransformer.php | 4 +- .../EntityToJsonTransformer.php | 4 +- .../MultipleObjectsToIdTransformer.php | 4 +- .../DataTransformer/ObjectToIdTransformer.php | 4 +- .../PostalCodeToIdTransformer.php | 4 +- .../Type/DataTransformer/ScopeTransformer.php | 4 +- .../Form/Type/Export/AggregatorType.php | 4 +- .../Form/Type/Export/ExportType.php | 4 +- .../Form/Type/Export/FilterType.php | 4 +- .../Form/Type/Export/PickCenterType.php | 3 +- .../Form/Type/PickAddressType.php | 4 +- .../Form/Type/PickCenterType.php | 4 +- .../Form/Type/PickCivilityType.php | 4 +- .../Form/Type/PickLocationTypeType.php | 4 +- .../Form/Type/PickPostalCodeType.php | 4 +- .../Form/Type/PickUserDynamicType.php | 4 +- .../Form/Type/PickUserLocationType.php | 4 +- .../Form/Type/PrivateCommentType.php | 4 +- .../Form/Type/ScopePickerType.php | 4 +- .../Form/Type/Select2CountryType.php | 6 +- .../Form/Type/Select2LanguageType.php | 6 +- src/Bundle/ChillMainBundle/Form/UserType.php | 4 +- .../ChillMainBundle/Form/WorkflowStepType.php | 6 +- .../Counter/NotificationByUserCounter.php | 4 +- .../Notification/Email/NotificationMailer.php | 4 +- ...NotificationOnTerminateEventSubscriber.php | 4 +- .../Exception/NotificationHandlerNotFound.php | 4 +- .../ChillMainBundle/Notification/Mailer.php | 4 +- .../NotificationHandlerManager.php | 4 +- .../Notification/NotificationPresence.php | 4 +- .../NotificationTwigExtensionRuntime.php | 4 +- .../Pagination/PageGenerator.php | 4 +- .../ChillMainBundle/Pagination/Paginator.php | 5 +- .../Pagination/PaginatorFactory.php | 3 +- .../Phonenumber/Templating.php | 4 +- .../ChillMainBundle/Redis/ChillRedis.php | 4 +- .../Repository/UserACLAwareRepository.php | 4 +- .../MenuBuilder/SectionMenuBuilder.php | 4 +- .../Routing/MenuBuilder/UserMenuBuilder.php | 4 +- .../ChillMainBundle/Routing/MenuComposer.php | 4 +- .../ChillMainBundle/Routing/MenuTwig.php | 4 +- .../Search/Entity/SearchUserApiProvider.php | 4 +- .../ChillMainBundle/Search/Model/Result.php | 3 +- .../Search/ParsingException.php | 4 +- .../ChillMainBundle/Search/SearchApi.php | 4 +- .../Search/SearchApiResult.php | 4 +- .../Search/Utils/SearchExtractionResult.php | 4 +- .../Authorization/AbstractChillVoter.php | 4 +- .../Authorization/AuthorizationHelper.php | 3 +- .../AuthorizationHelperForCurrentUser.php | 4 +- .../Authorization/ChillVoterInterface.php | 4 +- .../Authorization/DefaultVoterHelper.php | 3 +- .../DefaultVoterHelperFactory.php | 4 +- .../DefaultVoterHelperGenerator.php | 4 +- .../Authorization/EntityWorkflowVoter.php | 4 +- .../WorkflowEntityDeletionVoter.php | 4 +- .../PasswordRecover/PasswordRecoverEvent.php | 3 +- .../PasswordRecover/RecoverPasswordHelper.php | 4 +- .../Resolver/CenterResolverDispatcher.php | 4 +- .../Resolver/CenterResolverManager.php | 4 +- .../Resolver/ResolverTwigExtension.php | 4 +- .../Resolver/ScopeResolverDispatcher.php | 4 +- .../Security/UserProvider/UserProvider.php | 4 +- .../Serializer/Model/Collection.php | 4 +- .../Serializer/Model/Counter.php | 4 +- .../Normalizer/AddressNormalizer.php | 4 +- .../Normalizer/CenterNormalizer.php | 4 +- .../CommentEmbeddableDocGenNormalizer.php | 4 +- .../Serializer/Normalizer/DateNormalizer.php | 4 +- .../DoctrineExistingEntityNormalizer.php | 4 +- .../Normalizer/EntityWorkflowNormalizer.php | 4 +- .../EntityWorkflowStepNormalizer.php | 4 +- .../Normalizer/NotificationNormalizer.php | 4 +- .../PrivateCommentEmbeddableNormalizer.php | 4 +- .../Serializer/Normalizer/UserNormalizer.php | 4 +- ...ollateAddressWithReferenceOrPostalCode.php | 3 +- ...ddressWithReferenceOrPostalCodeCronJob.php | 3 +- ...eographicalUnitMaterializedViewCronJob.php | 3 +- .../EntityInfo/ViewEntityInfoManager.php | 3 +- .../AddressReferenceBEFromBestAddress.php | 4 +- .../Import/AddressReferenceBaseImporter.php | 4 +- .../Import/AddressReferenceFromBano.php | 4 +- .../Import/AddressToReferenceMatcher.php | 4 +- .../Import/GeographicalUnitBaseImporter.php | 4 +- .../Import/PostalCodeBEFromBestAddress.php | 4 +- .../Service/Import/PostalCodeBaseImporter.php | 4 +- .../Import/PostalCodeFRFromOpenData.php | 4 +- .../Service/Mailer/ChillMailer.php | 4 +- .../Service/RollingDate/RollingDate.php | 3 +- .../ShortMessage/NullShortMessageSender.php | 4 +- .../Service/ShortMessage/ShortMessage.php | 4 +- .../ShortMessage/ShortMessageHandler.php | 4 +- .../ShortMessage/ShortMessageTransporter.php | 4 +- .../ShortMessageOvh/OvhShortMessageSender.php | 3 +- .../Templating/Entity/AddressRender.php | 4 +- .../Templating/Entity/CommentRender.php | 4 +- .../Templating/Entity/UserRender.php | 4 +- .../FilterOrderGetActiveFilterHelper.php | 3 +- .../Templating/Listing/FilterOrderHelper.php | 3 +- .../Listing/FilterOrderHelperBuilder.php | 4 +- .../Listing/FilterOrderHelperFactory.php | 4 +- .../Templating/Listing/Templating.php | 3 +- .../Templating/TranslatableStringTwig.php | 4 +- ...raphicalUnitByAddressApiControllerTest.php | 2 +- .../Tests/Cron/CronManagerTest.php | 4 +- .../Tests/Export/ExportManagerTest.php | 26 ++++++--- .../Tests/Export/SortExportElementTest.php | 24 ++++++-- .../Authorization/AuthorizationHelperTest.php | 22 ++++---- .../PasswordRecover/TokenManagerTest.php | 4 +- .../Resolver/DefaultScopeResolverTest.php | 8 ++- .../Resolver/ScopeResolverDispatcherTest.php | 4 +- .../Timeline/TimelineBuilder.php | 4 +- .../Timeline/TimelineSingleQuery.php | 4 +- .../Validator/RoleScopeScopePresence.php | 4 +- .../Validation/Validator/ValidPhonenumber.php | 4 +- .../Counter/WorkflowByUserCounter.php | 4 +- .../Workflow/EntityWorkflowManager.php | 4 +- ...ntityWorkflowTransitionEventSubscriber.php | 4 +- .../NotificationOnTransition.php | 4 +- .../SendAccessKeyEventSubscriber.php | 4 +- .../Exception/HandlerNotFoundException.php | 4 +- .../Workflow/Helper/MetadataExtractor.php | 4 +- .../WorkflowNotificationHandler.php | 4 +- .../WorkflowTwigExtensionRuntime.php | 4 +- .../EntityWorkflowCreationValidator.php | 4 +- .../migrations/Version20100000000000.php | 4 +- .../migrations/Version20220513151853.php | 4 +- .../PersonAddressMoveEventSubscriber.php | 4 +- .../Events/UserRefEventSubscriber.php | 4 +- .../AccompanyingPeriodStepChangeCronjob.php | 3 +- ...mpanyingPeriodStepChangeMessageHandler.php | 3 +- .../AccompanyingPeriodStepChanger.php | 3 +- .../ChillPersonBundle/Actions/ActionEvent.php | 3 +- .../PersonMoveCenterHistoryHandler.php | 3 +- .../Actions/Remove/PersonMove.php | 3 +- .../Actions/Remove/PersonMoveManager.php | 3 +- .../Config/ConfigPersonAltNamesHelper.php | 3 +- .../AccompanyingCourseApiController.php | 4 +- .../AccompanyingCourseCommentController.php | 4 +- .../AccompanyingCourseController.php | 4 +- .../AccompanyingCourseWorkApiController.php | 4 +- .../AccompanyingCourseWorkController.php | 5 +- ...CourseWorkEvaluationDocumentController.php | 4 +- .../AccompanyingPeriodController.php | 5 +- ...mpanyingPeriodRegulationListController.php | 4 +- ...nyingPeriodWorkEvaluationApiController.php | 4 +- .../Controller/HouseholdApiController.php | 4 +- .../HouseholdCompositionController.php | 3 +- .../Controller/HouseholdController.php | 4 +- .../Controller/HouseholdMemberController.php | 4 +- .../Controller/PersonAddressController.php | 14 +++-- .../Controller/PersonController.php | 7 ++- .../Controller/PersonDuplicateController.php | 4 +- .../Controller/PersonResourceController.php | 4 +- .../ReassignAccompanyingPeriodController.php | 4 +- .../Controller/RelationshipApiController.php | 4 +- .../ResidentialAddressController.php | 4 +- .../SocialWorkEvaluationApiController.php | 4 +- .../SocialWorkGoalApiController.php | 4 +- .../SocialWorkResultApiController.php | 4 +- .../SocialWorkSocialActionApiController.php | 3 +- .../Controller/TimelinePersonController.php | 4 +- .../UserAccompanyingPeriodController.php | 4 +- .../ORM/LoadAccompanyingPeriodWork.php | 4 +- .../DataFixtures/ORM/LoadCustomFields.php | 3 +- .../DataFixtures/ORM/LoadRelationships.php | 4 +- .../ORM/LoadSocialWorkMetadata.php | 4 +- .../ChillPersonExtension.php | 48 ++++++++-------- .../AccompanyingPeriodInfo.php | 3 +- .../AccompanyingPeriodWorkReferrerHistory.php | 3 +- .../Entity/AccompanyingPeriod/UserHistory.php | 3 +- .../ChillPersonBundle/Entity/Person.php | 2 +- .../Entity/Person/PersonCenterHistory.php | 3 +- .../Event/Person/PersonAddressMoveEvent.php | 4 +- .../AccompanyingPeriodWorkEventListener.php | 4 +- .../AdministrativeLocationAggregator.php | 4 +- .../ClosingMotiveAggregator.php | 4 +- .../ConfidentialAggregator.php | 4 +- .../CreatorJobAggregator.php | 7 ++- .../DurationAggregator.php | 4 +- .../EmergencyAggregator.php | 4 +- .../EvaluationAggregator.php | 4 +- .../GeographicalUnitStatAggregator.php | 4 +- .../IntensityAggregator.php | 4 +- .../JobWorkingOnCourseAggregator.php | 7 ++- .../ReferrerAggregator.php | 4 +- .../ReferrerScopeAggregator.php | 7 ++- .../RequestorAggregator.php | 4 +- .../ScopeAggregator.php | 4 +- .../ScopeWorkingOnCourseAggregator.php | 7 ++- .../SocialActionAggregator.php | 4 +- .../SocialIssueAggregator.php | 4 +- .../StepAggregator.php | 4 +- .../UserJobAggregator.php | 7 ++- .../UserWorkingOnCourseAggregator.php | 3 +- .../EvaluationTypeAggregator.php | 4 +- .../HavingEndDateAggregator.php | 4 +- .../ChildrenNumberAggregator.php | 4 +- .../CompositionAggregator.php | 4 +- .../PersonAggregators/AgeAggregator.php | 3 +- .../ByHouseholdCompositionAggregator.php | 4 +- .../PersonAggregators/CenterAggregator.php | 3 +- .../CountryOfBirthAggregator.php | 4 +- .../PersonAggregators/GenderAggregator.php | 8 ++- .../GeographicalUnitAggregator.php | 4 +- .../HouseholdPositionAggregator.php | 4 +- .../MaritalStatusAggregator.php | 4 +- .../NationalityAggregator.php | 4 +- .../PostalCodeAggregator.php | 3 +- .../ActionTypeAggregator.php | 4 +- .../CreatorAggregator.php | 7 ++- .../CreatorJobAggregator.php | 7 ++- .../CreatorScopeAggregator.php | 7 ++- .../CurrentActionAggregator.php | 4 +- .../SocialWorkAggregators/GoalAggregator.php | 4 +- .../GoalResultAggregator.php | 4 +- .../HandlingThirdPartyAggregator.php | 4 +- .../SocialWorkAggregators/JobAggregator.php | 7 ++- .../ReferrerAggregator.php | 3 +- .../ResultAggregator.php | 4 +- .../SocialWorkAggregators/ScopeAggregator.php | 7 ++- ...rkPersonAssociatedOnAccompanyingPeriod.php | 4 +- ...vgDurationAPWorkPersonAssociatedOnWork.php | 4 +- .../Export/Export/CountEvaluation.php | 4 +- .../Export/Export/ListAccompanyingPeriod.php | 3 +- ...orkAssociatePersonOnAccompanyingPeriod.php | 3 +- ...panyingPeriodWorkAssociatePersonOnWork.php | 3 +- .../Export/Export/ListEvaluation.php | 3 +- .../Export/Export/ListPersonDuplicate.php | 4 +- ...istPersonWithAccompanyingPeriodDetails.php | 3 +- .../ActiveOnDateFilter.php | 4 +- .../ActiveOneDayBetweenDatesFilter.php | 4 +- .../AdministrativeLocationFilter.php | 4 +- .../ClosingMotiveFilter.php | 4 +- .../ConfidentialFilter.php | 4 +- .../CreatorJobFilter.php | 3 +- .../EmergencyFilter.php | 4 +- .../EvaluationFilter.php | 4 +- .../GeographicalUnitStatFilter.php | 4 +- .../HandlingThirdPartyFilter.php | 3 +- .../HasNoReferrerFilter.php | 4 +- .../HasTemporaryLocationFilter.php | 4 +- ...ccompanyingPeriodInfoWithinDatesFilter.php | 3 +- .../IntensityFilter.php | 4 +- .../JobWorkingOnCourseFilter.php | 3 +- .../OpenBetweenDatesFilter.php | 4 +- .../OriginFilter.php | 4 +- .../ReferrerFilter.php | 4 +- .../RequestorFilter.php | 4 +- .../ScopeWorkingOnCourseFilter.php | 3 +- .../SocialActionFilter.php | 3 +- .../StepFilterBetweenDates.php | 4 +- .../StepFilterOnDate.php | 4 +- .../UserJobFilter.php | 3 +- .../UserScopeFilter.php | 3 +- .../UserWorkingOnCourseFilter.php | 3 +- .../EvaluationFilters/ByEndDateFilter.php | 4 +- .../EvaluationFilters/ByStartDateFilter.php | 4 +- .../EvaluationTypeFilter.php | 4 +- .../EvaluationFilters/MaxDateFilter.php | 4 +- .../HouseholdFilters/CompositionFilter.php | 3 +- .../PersonFilters/AddressRefStatusFilter.php | 4 +- .../Export/Filter/PersonFilters/AgeFilter.php | 4 +- .../Filter/PersonFilters/BirthdateFilter.php | 4 +- .../ByHouseholdCompositionFilter.php | 4 +- .../PersonFilters/DeadOrAliveFilter.php | 4 +- .../Filter/PersonFilters/DeathdateFilter.php | 4 +- .../PersonFilters/GeographicalUnitFilter.php | 4 +- .../PersonFilters/MaritalStatusFilter.php | 4 +- .../PersonFilters/NationalityFilter.php | 4 +- .../ResidentialAddressAtThirdpartyFilter.php | 4 +- .../ResidentialAddressAtUserFilter.php | 4 +- .../WithoutHouseholdComposition.php | 4 +- ...yingPeriodWorkEndDateBetweenDateFilter.php | 3 +- ...ngPeriodWorkStartDateBetweenDateFilter.php | 3 +- .../SocialWorkFilters/CreatorJobFilter.php | 3 +- .../SocialWorkFilters/CreatorScopeFilter.php | 3 +- .../Filter/SocialWorkFilters/JobFilter.php | 3 +- .../SocialWorkFilters/ReferrerFilter.php | 4 +- .../Filter/SocialWorkFilters/ScopeFilter.php | 3 +- .../SocialWorkTypeFilter.php | 4 +- .../Export/Helper/LabelPersonHelper.php | 4 +- .../Helper/ListAccompanyingPeriodHelper.php | 3 +- .../Export/Helper/ListPersonHelper.php | 4 +- .../Form/ClosingMotiveType.php | 4 +- .../Form/HouseholdCompositionType.php | 4 +- .../Form/PersonResourceType.php | 4 +- .../Form/SocialWork/SocialIssueType.php | 4 +- .../Form/Type/PersonAltNameType.php | 4 +- .../Form/Type/PersonPhoneType.php | 4 +- .../Form/Type/PickPersonDynamicType.php | 4 +- .../Form/Type/PickSocialActionType.php | 4 +- .../Form/Type/PickSocialIssueType.php | 4 +- .../Form/Type/Select2MaritalStatusType.php | 8 ++- .../Household/MembersEditor.php | 3 +- .../Household/MembersEditorFactory.php | 4 +- .../Menu/SectionMenuBuilder.php | 4 +- .../AccompanyingPeriodNotificationHandler.php | 4 +- ...kEvaluationDocumentNotificationHandler.php | 4 +- ...ompanyingPeriodWorkNotificationHandler.php | 4 +- .../AccompanyingPeriodPrivacyEvent.php | 4 +- .../Privacy/PrivacyEvent.php | 4 +- .../AccompanyingPeriodACLAwareRepository.php | 3 +- .../Household/HouseholdACLAwareRepository.php | 4 +- .../Person/PersonCenterHistoryInterface.php | 4 +- .../Repository/PersonACLAwareRepository.php | 4 +- .../ChillPersonBundle/Search/PersonSearch.php | 4 +- .../Search/SearchHouseholdApiProvider.php | 4 +- .../Search/SearchPersonApiProvider.php | 4 +- .../AccompanyingPeriodCommentVoter.php | 4 +- .../AccompanyingPeriodResourceVoter.php | 4 +- ...nyingPeriodWorkEvaluationDocumentVoter.php | 4 +- .../AccompanyingPeriodWorkEvaluationVoter.php | 4 +- .../AccompanyingPeriodDocGenNormalizer.php | 4 +- .../AccompanyingPeriodResourceNormalizer.php | 4 +- .../AccompanyingPeriodWorkDenormalizer.php | 4 +- ...PeriodWorkEvaluationDocumentNormalizer.php | 4 +- ...mpanyingPeriodWorkEvaluationNormalizer.php | 4 +- .../AccompanyingPeriodWorkNormalizer.php | 4 +- .../Normalizer/MembersEditorNormalizer.php | 4 +- .../Normalizer/PersonDocGenNormalizer.php | 4 +- .../Normalizer/PersonJsonNormalizer.php | 3 +- .../PersonJsonNormalizerInterface.php | 4 +- .../RelationshipDocGenNormalizer.php | 4 +- .../Normalizer/SocialActionNormalizer.php | 4 +- .../Normalizer/SocialIssueNormalizer.php | 4 +- .../Normalizer/WorkflowNormalizer.php | 4 +- .../OldDraftAccompanyingPeriodRemover.php | 4 +- .../AccompanyingPeriodContext.php | 3 +- .../AccompanyingPeriodWorkContext.php | 4 +- ...ccompanyingPeriodWorkEvaluationContext.php | 4 +- .../PersonContextWithThirdParty.php | 3 +- ...companyingPeriodViewEntityInfoProvider.php | 3 +- ...PeriodWorkEvaluationGenericDocProvider.php | 3 +- ...PeriodWorkEvaluationGenericDocRenderer.php | 3 +- .../Service/Import/SocialWorkMetadata.php | 4 +- .../Import/SocialWorkMetadataInterface.php | 4 +- .../Templating/Entity/ClosingMotiveRender.php | 3 +- .../Templating/Entity/PersonRender.php | 4 +- .../Entity/PersonRenderInterface.php | 4 +- .../Templating/Entity/ResourceKindRender.php | 4 +- .../Templating/Entity/SocialActionRender.php | 4 +- .../Templating/Entity/SocialIssueRender.php | 4 +- ...cialIssueConsistencyEntityListenerTest.php | 4 +- .../PersonAddressControllerTest.php | 2 +- .../Controller/PersonControllerCreateTest.php | 2 +- .../Controller/PersonControllerUpdateTest.php | 4 +- ...onControllerUpdateWithHiddenFieldsTest.php | 2 +- ...rsonControllerViewWithHiddenFieldsTest.php | 2 +- .../AbstractTimelineAccompanyingPeriod.php | 4 +- .../AccompanyingPeriodValidityValidator.php | 4 +- .../LocationValidityValidator.php | 4 +- .../ParticipationOverlapValidator.php | 4 +- .../ResourceDuplicateCheckValidator.php | 4 +- ...HouseholdMembershipSequentialValidator.php | 4 +- .../RelationshipNoDuplicateValidator.php | 4 +- .../Widget/PersonListWidget.php | 4 +- ...dWorkEvaluationDocumentWorkflowHandler.php | 4 +- ...ingPeriodWorkEvaluationWorkflowHandler.php | 4 +- .../AccompanyingPeriodWorkWorkflowHandler.php | 4 +- .../migrations/Version20160422000000.php | 4 +- .../migrations/Version20210419112619.php | 4 +- .../migrations/Version20231121070151.php | 4 +- .../ChillReportBundle/ChillReportBundle.php | 4 +- .../Controller/ReportController.php | 19 ++++--- .../Export/Export/ReportList.php | 4 +- .../Export/Filter/ReportDateFilter.php | 4 +- .../ChillReportBundle/Form/ReportType.php | 2 +- .../ChillReportBundle/Search/ReportSearch.php | 2 +- .../Controller/ReportControllerNextTest.php | 4 +- .../Tests/Controller/ReportControllerTest.php | 12 ++-- .../Authorization/ReportVoterTest.php | 4 +- .../Tests/Timeline/TimelineProviderTest.php | 2 +- .../Timeline/TimelineReportProvider.php | 4 +- .../Controller/SingleTaskController.php | 5 +- .../ChillTaskBundle/Entity/SingleTask.php | 3 - .../ChillTaskBundle/Form/SingleTaskType.php | 4 +- .../Repository/AbstractTaskRepository.php | 4 +- .../Repository/RecurringTaskRepository.php | 4 +- .../SingleTaskAclAwareRepository.php | 4 +- .../Repository/SingleTaskStateRepository.php | 3 +- .../Authorization/AuthorizationEvent.php | 3 +- .../Tests/Controller/TaskControllerTest.php | 4 +- .../TaskLifeCycleEventTimelineProvider.php | 4 +- .../Workflow/TaskWorkflowDefinition.php | 4 +- .../ChillThirdPartyExtension.php | 12 ++-- .../Export/Helper/LabelThirdPartyHelper.php | 4 +- .../Form/ThirdPartyType.php | 2 +- .../Type/PickThirdPartyTypeCategoryType.php | 4 +- .../Form/Type/PickThirdpartyDynamicType.php | 4 +- .../ThirdPartyACLAwareRepository.php | 4 +- .../Search/ThirdPartyApiSearch.php | 8 ++- .../Normalizer/ThirdPartyNormalizer.php | 4 +- .../Templating/Entity/ThirdPartyRender.php | 4 +- .../ChillWopiBundle/src/ChillWopiBundle.php | 4 +- .../ChillWopiBundle/src/Controller/Editor.php | 4 +- .../src/Resources/config/routes/routes.php | 2 +- .../src/Service/Controller/Responder.php | 4 +- .../src/Service/Wopi/AuthorizationManager.php | 4 +- .../Service/Wopi/ChillDocumentLockManager.php | 3 +- .../src/Service/Wopi/ChillWopi.php | 4 +- .../src/Service/Wopi/UserManager.php | 4 +- ...aultDataOnExportFilterAggregatorRector.php | 3 +- .../config/config.php | 2 +- 682 files changed, 2097 insertions(+), 882 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index a85ddbb75..5f872a7dc 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -13,4 +13,6 @@ namespace Chill\ActivityBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillActivityBundle extends Bundle {} +class ChillActivityBundle extends Bundle +{ +} diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 06489010c..153b87f44 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -67,7 +67,8 @@ final class ActivityController extends AbstractController private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly PaginatorFactory $paginatorFactory, - ) {} + ) { + } /** * Deletes a Activity entity. @@ -673,8 +674,8 @@ final class ActivityController extends AbstractController throw $this->createNotFoundException('Accompanying Period not found'); } - // TODO Add permission - // $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); + // TODO Add permission + // $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); } else { throw $this->createNotFoundException('Person or Accompanying Period not found'); } diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php index 6d0b825cc..ce9dc64b3 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonCategoryController.php @@ -56,7 +56,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); + $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); @@ -79,7 +79,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->findAll(); + $entities = $em->getRepository(ActivityReasonCategory::class)->findAll(); return $this->render('@ChillActivity/ActivityReasonCategory/index.html.twig', [ 'entities' => $entities, @@ -111,7 +111,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); + $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); @@ -131,7 +131,7 @@ class ActivityReasonCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReasonCategory::class)->find($id); + $entity = $em->getRepository(ActivityReasonCategory::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReasonCategory entity.'); diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php index 141398cc4..323b27d25 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityReasonController.php @@ -24,7 +24,9 @@ use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; */ class ActivityReasonController extends AbstractController { - public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) {} + public function __construct(private readonly ActivityReasonRepository $activityReasonRepository) + { + } /** * Creates a new ActivityReason entity. @@ -60,7 +62,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); + $entity = $em->getRepository(ActivityReason::class)->find($id); if (null === $entity) { throw new NotFoundHttpException('Unable to find ActivityReason entity.'); @@ -115,7 +117,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); + $entity = $em->getRepository(ActivityReason::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReason entity.'); @@ -135,7 +137,7 @@ class ActivityReasonController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\ActivityBundle\Entity\ActivityReason::class)->find($id); + $entity = $em->getRepository(ActivityReason::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find ActivityReason entity.'); diff --git a/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php b/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php index 31fac3be8..fd9899c0b 100644 --- a/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php +++ b/src/Bundle/ChillActivityBundle/EntityListener/ActivityEntityListener.php @@ -19,7 +19,9 @@ use Doctrine\ORM\EntityManagerInterface; class ActivityEntityListener { - public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly AccompanyingPeriodWorkRepository $workRepository) + { + } public function persistActionToCourse(Activity $activity) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php index cdb66bb77..d8551c11d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php @@ -31,7 +31,8 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface private RollingDateConverterInterface $rollingDateConverter, private ActivityTypeRepositoryInterface $activityTypeRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php index 9282f92e4..157f4c023 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class BySocialActionAggregator implements AggregatorInterface { - public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {} + public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php index bbdadf4d6..94f6506d1 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class BySocialIssueAggregator implements AggregatorInterface { - public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) {} + public function __construct(private readonly SocialIssueRepository $issueRepository, private readonly SocialIssueRender $issueRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php index 17e16357a..a22a75189 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php @@ -20,9 +20,13 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class ActivityPresenceAggregator implements AggregatorInterface { - public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private ActivityPresenceRepositoryInterface $activityPresenceRepository, private TranslatableStringHelperInterface $translatableStringHelper) + { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index 2c7891dd6..0cb185857 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -22,7 +22,9 @@ class ActivityTypeAggregator implements AggregatorInterface { final public const KEY = 'activity_type_aggregator'; - public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(protected ActivityTypeRepositoryInterface $activityTypeRepository, protected TranslatableStringHelperInterface $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index 61452af22..46b931243 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -22,7 +22,9 @@ class ActivityUserAggregator implements AggregatorInterface { final public const KEY = 'activity_user_id'; - public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) {} + public function __construct(private readonly UserRepository $userRepository, private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php index cc4ab9d14..c8ef24332 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ActivityUsersAggregator implements AggregatorInterface { - public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {} + public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php index 3628206ec..591406d59 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php @@ -27,7 +27,8 @@ class ActivityUsersJobAggregator implements AggregatorInterface public function __construct( private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ class ActivityUsersJobAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php index bffce629f..c5d9175b4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php @@ -27,7 +27,8 @@ class ActivityUsersScopeAggregator implements AggregatorInterface public function __construct( private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ class ActivityUsersScopeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php index 09bdab89e..4e8ec44b0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByCreatorAggregator implements AggregatorInterface { - public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) {} + public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php index 13224bade..15762a4f0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByThirdpartyAggregator implements AggregatorInterface { - public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) {} + public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository, private readonly ThirdPartyRender $thirdPartyRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php index d57670e7f..98960aec6 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php @@ -27,7 +27,8 @@ class CreatorJobAggregator implements AggregatorInterface public function __construct( private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php index 6641f0807..f1fb4b2b6 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php @@ -27,7 +27,8 @@ class CreatorScopeAggregator implements AggregatorInterface public function __construct( private readonly ScopeRepository $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ class CreatorScopeAggregator implements AggregatorInterface return Declarations::ACTIVITY; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php index da2d74f64..69c8a646c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class LocationTypeAggregator implements AggregatorInterface { - public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly LocationTypeRepository $locationTypeRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php index f0364bf8e..569c4ca9a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php @@ -25,7 +25,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface { - public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) {} + public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php index c7a3bd6b5..96c330071 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php @@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class PersonAggregator implements AggregatorInterface { - public function __construct(private LabelPersonHelper $labelPersonHelper) {} + public function __construct(private LabelPersonHelper $labelPersonHelper) + { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php index 8459741c5..18ca489e4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php @@ -25,7 +25,9 @@ final readonly class PersonsAggregator implements AggregatorInterface { private const PREFIX = 'act_persons_agg'; - public function __construct(private LabelPersonHelper $labelPersonHelper) {} + public function __construct(private LabelPersonHelper $labelPersonHelper) + { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php index 774968544..ec436ef61 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/SentReceivedAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class SentReceivedAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index d8b204e8c..96fdfa095 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -36,7 +36,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index dfd5d966f..6497a232a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -41,7 +41,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php index 41c05494c..fc22c8edd 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountHouseholdOnActivity.php @@ -42,7 +42,9 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php index c49b9d4ad..26432fc0b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountPersonsOnActivity.php @@ -41,7 +41,9 @@ class CountPersonsOnActivity implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php index aab2d7db8..fc9a44889 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php @@ -31,7 +31,8 @@ final readonly class ListActivity implements ListInterface, GroupedExportInterfa private EntityManagerInterface $entityManager, private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index e0a95b1f5..7614039b0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -33,7 +33,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php index 31111a083..46466d883 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountHouseholdOnActivity.php @@ -34,7 +34,9 @@ final readonly class CountHouseholdOnActivity implements ExportInterface, Groupe $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index 3cdadac67..491d1c094 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -47,7 +47,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php b/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php index 75d2c3fd0..73b49e082 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php @@ -40,7 +40,8 @@ class ListActivityHelper private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatableStringExportLabelHelper $translatableStringLabelHelper, private readonly UserHelper $userHelper - ) {} + ) { + } public function addSelect(QueryBuilder $qb): void { @@ -74,7 +75,9 @@ class ListActivityHelper ->addGroupBy('location.id'); } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getAllowedFormattersTypes() { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php index 7c6eb0bb2..89fe2e618 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ActivityTypeFilter.php @@ -31,7 +31,8 @@ final readonly class ActivityTypeFilter implements FilterInterface private ActivityTypeRepositoryInterface $activityTypeRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index 13349baa5..3eb4e130e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class BySocialActionFilter implements FilterInterface { - public function __construct(private readonly SocialActionRender $actionRender) {} + public function __construct(private readonly SocialActionRender $actionRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index bef40290e..b482ac156 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class BySocialIssueFilter implements FilterInterface { - public function __construct(private readonly SocialIssueRender $issueRender) {} + public function __construct(private readonly SocialIssueRender $issueRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php index 2d3282ad1..77efa9a8b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php @@ -23,7 +23,8 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function getTitle() { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index e3d7796d3..93e70076d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ActivityDateFilter implements FilterInterface { - public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(protected TranslatorInterface $translator, private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php index 201b9f810..f1f1a668c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityPresenceFilter.php @@ -26,7 +26,8 @@ final readonly class ActivityPresenceFilter implements FilterInterface public function __construct( private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator - ) {} + ) { + } public function getTitle() { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php index ae47146df..b59dfa301 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php @@ -27,7 +27,8 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter public function __construct( protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php index 56285c026..313ee7cbc 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityUsersFilter.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ActivityUsersFilter implements FilterInterface { - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php index f75c5a817..8cb7db569 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ByCreatorFilter.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByCreatorFilter implements FilterInterface { - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php index 4288920e9..6ce340874 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorJobFilter.php @@ -32,7 +32,8 @@ final readonly class CreatorJobFilter implements FilterInterface private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator, private UserJobRepositoryInterface $userJobRepository, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php index e5da96554..a6ab07ade 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/CreatorScopeFilter.php @@ -27,7 +27,8 @@ class CreatorScopeFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php index b74be2552..eca62b79e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/EmergencyFilter.php @@ -28,7 +28,9 @@ class EmergencyFilter implements FilterInterface private const DEFAULT_CHOICE = 'false'; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php index 771dfca30..144e79913 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/LocationTypeFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class LocationTypeFilter implements FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index b8ce3259f..5e2ee5cbe 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -26,7 +26,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInterface { - public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) {} + public function __construct(protected TranslatableStringHelper $translatableStringHelper, protected ActivityReasonRepository $activityReasonRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php index eb2312c0e..c424bec31 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php @@ -32,7 +32,8 @@ final readonly class PersonHavingActivityBetweenDateFilter implements ExportElem private TranslatableStringHelper $translatableStringHelper, private ActivityReasonRepository $activityReasonRepository, private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php index 8bdefeb24..51dd60855 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonsFilter.php @@ -26,7 +26,9 @@ final readonly class PersonsFilter implements FilterInterface { private const PREFIX = 'act_persons_filter'; - public function __construct(private PersonRenderInterface $personRender) {} + public function __construct(private PersonRenderInterface $personRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php index 3011627e8..6eee28790 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/SentReceivedFilter.php @@ -29,7 +29,9 @@ class SentReceivedFilter implements FilterInterface private const DEFAULT_CHOICE = Activity::SENTRECEIVED_SENT; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php index 6e6b745b9..54fb87b81 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UserFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class UserFilter implements FilterInterface { - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php index 23bd4f84c..ae21482fc 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php @@ -28,7 +28,8 @@ class UsersJobFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php index 4ce9c845a..61a813dc0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersScopeFilter.php @@ -30,7 +30,8 @@ class UsersScopeFilter implements FilterInterface public function __construct( private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 03a21a5b7..4e3b1eb8a 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -404,7 +404,7 @@ class ActivityType extends AbstractType ->setAllowedTypes('center', ['null', Center::class, 'array']) ->setAllowedTypes('role', ['string']) ->setAllowedTypes('activityType', \Chill\ActivityBundle\Entity\ActivityType::class) - ->setAllowedTypes('accompanyingPeriod', [\Chill\PersonBundle\Entity\AccompanyingPeriod::class, 'null']); + ->setAllowedTypes('accompanyingPeriod', [AccompanyingPeriod::class, 'null']); } public function getBlockPrefix(): string diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php index 8e8ae51f7..b4baa2f54 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityTypeType.php @@ -25,7 +25,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class ActivityTypeType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php b/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php index be1e372f1..009d7b29f 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/PickActivityReasonType.php @@ -28,7 +28,8 @@ class PickActivityReasonType extends AbstractType private readonly ActivityReasonRepository $activityReasonRepository, private readonly ActivityReasonRender $reasonRender, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php index ee1417bfb..d94ac34e1 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityReasonCategoryType.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class TranslatableActivityReasonCategoryType extends AbstractType { - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php index 5c77e500d..e2233f3b1 100644 --- a/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/Type/TranslatableActivityType.php @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class TranslatableActivityType extends AbstractType { - public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) {} + public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected ActivityTypeRepositoryInterface $activityTypeRepository) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php index b4990c0e3..bae2b0577 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(protected Security $security, protected TranslatorInterface $translator) {} + public function __construct(protected Security $security, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php index 0afe11cfc..8337a3582 100644 --- a/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/AdminMenuBuilder.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; */ final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private Security $security) {} + public function __construct(private Security $security) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php index e76aaf5ee..180247808 100644 --- a/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillActivityBundle/Menu/PersonMenuBuilder.php @@ -23,11 +23,13 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ final readonly class PersonMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) {} + public function __construct(private AuthorizationCheckerInterface $authorizationChecker, private TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { - /** @var \Chill\PersonBundle\Entity\Person $person */ + /** @var Person $person */ $person = $parameters['person']; if ($this->authorizationChecker->isGranted(ActivityVoter::SEE, $person)) { diff --git a/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationHandler.php b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationHandler.php index 8eb219fd2..55b831d8b 100644 --- a/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationHandler.php +++ b/src/Bundle/ChillActivityBundle/Notification/ActivityNotificationHandler.php @@ -18,7 +18,9 @@ use Chill\MainBundle\Notification\NotificationHandlerInterface; final readonly class ActivityNotificationHandler implements NotificationHandlerInterface { - public function __construct(private ActivityRepository $activityRepository) {} + public function __construct(private ActivityRepository $activityRepository) + { + } public function getTemplate(Notification $notification, array $options = []): string { diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php index 231ad5432..1f50f7d62 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php @@ -44,7 +44,8 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos private EntityManagerInterface $em, private Security $security, private RequestStack $requestStack, - ) {} + ) { + } /** * @throws NonUniqueResultException diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php index 99e75f2da..38bb42e51 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php @@ -33,7 +33,8 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum private CenterResolverManagerInterface $centerResolverManager, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private Security $security - ) {} + ) { + } public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface { diff --git a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php index 46e466ae1..6c3675011 100644 --- a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php +++ b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ActivityContext.php @@ -51,7 +51,8 @@ class ActivityContext implements private readonly BaseContextData $baseContextData, private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository - ) {} + ) { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ListActivitiesByAccompanyingPeriodContext.php b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ListActivitiesByAccompanyingPeriodContext.php index 221d1f4b2..33675754a 100644 --- a/src/Bundle/ChillActivityBundle/Service/DocGenerator/ListActivitiesByAccompanyingPeriodContext.php +++ b/src/Bundle/ChillActivityBundle/Service/DocGenerator/ListActivitiesByAccompanyingPeriodContext.php @@ -56,7 +56,8 @@ class ListActivitiesByAccompanyingPeriodContext implements private readonly ThirdPartyRepository $thirdPartyRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly UserRepository $userRepository - ) {} + ) { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php index 2c6c9a691..ff198b345 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php @@ -34,7 +34,8 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen private EntityManagerInterface $em, private Security $security, private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository, - ) {} + ) { + } public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php index b84345375..1b0ed507b 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php @@ -25,7 +25,8 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository, - ) {} + ) { + } public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Renderers/AccompanyingPeriodActivityGenericDocRenderer.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Renderers/AccompanyingPeriodActivityGenericDocRenderer.php index 93649cea8..76f0fc00d 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Renderers/AccompanyingPeriodActivityGenericDocRenderer.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Renderers/AccompanyingPeriodActivityGenericDocRenderer.php @@ -20,7 +20,9 @@ use Chill\DocStoreBundle\Repository\StoredObjectRepository; final readonly class AccompanyingPeriodActivityGenericDocRenderer implements GenericDocRendererInterface { - public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) {} + public function __construct(private StoredObjectRepository $objectRepository, private ActivityRepository $activityRepository) + { + } public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php index 38aa49cdf..31012569a 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Controller/ActivityControllerTest.php @@ -310,7 +310,7 @@ final class ActivityControllerTest extends WebTestCase } /** - * @return \Chill\ActivityBundle\Entity\ActivityType + * @return ActivityType */ private function getRandomActivityType() { diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php index a2ea7c158..a9935eea4 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Filter/PersonHavingActivityBetweenDateFilterTest.php @@ -35,7 +35,7 @@ final class PersonHavingActivityBetweenDateFilterTest extends AbstractFilterTest $this->filter = self::$container->get('chill.activity.export.person_having_an_activity_between_date_filter'); $request = $this->prophesize() - ->willExtend(\Symfony\Component\HttpFoundation\Request::class); + ->willExtend(Request::class); $request->getLocale()->willReturn('fr'); diff --git a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php index 80779d909..f3163f664 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Form/Type/TranslatableActivityTypeTest.php @@ -58,7 +58,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase $this->assertTrue($form->isSynchronized()); $this->assertInstanceOf( - \Chill\ActivityBundle\Entity\ActivityType::class, + ActivityType::class, $form->getData()['type'], 'The data is an instance of Chill\\ActivityBundle\\Entity\\ActivityType' ); @@ -83,7 +83,7 @@ final class TranslatableActivityTypeTest extends KernelTestCase } /** - * @return \Chill\ActivityBundle\Entity\ActivityType + * @return ActivityType */ protected function getRandomType(mixed $active = true) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php index b0951e502..6917517b7 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php +++ b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php @@ -13,4 +13,6 @@ namespace Chill\AsideActivityBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillAsideActivityBundle extends Bundle {} +class ChillAsideActivityBundle extends Bundle +{ +} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php index c29a5a6dc..0a7891a07 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php @@ -20,7 +20,9 @@ use Symfony\Component\HttpFoundation\Request; final class AsideActivityController extends CRUDController { - public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository) {} + public function __construct(private readonly AsideActivityCategoryRepository $categoryRepository) + { + } public function createEntity(string $action, Request $request): object { diff --git a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php index 12c82be00..7bc6b774f 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/DataFixtures/ORM/LoadAsideActivity.php @@ -20,7 +20,9 @@ use Doctrine\Persistence\ObjectManager; class LoadAsideActivity extends Fixture implements DependentFixtureInterface { - public function __construct(private readonly UserRepository $userRepository) {} + public function __construct(private readonly UserRepository $userRepository) + { + } public function getDependencies(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php index 4271ae118..43b702f5c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php @@ -23,7 +23,8 @@ class ByActivityTypeAggregator implements AggregatorInterface public function __construct( private readonly AsideActivityCategoryRepository $asideActivityCategoryRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php index b5ca1022b..095d20acb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php @@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByLocationAggregator implements AggregatorInterface { - public function __construct(private readonly LocationRepository $locationRepository) {} + public function __construct(private readonly LocationRepository $locationRepository) + { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php index c3883b18a..94d946907 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php @@ -27,7 +27,8 @@ class ByUserJobAggregator implements AggregatorInterface public function __construct( private readonly UserJobRepositoryInterface $userJobRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ class ByUserJobAggregator implements AggregatorInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php index a99d2b75f..90e4ee615 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php @@ -27,7 +27,8 @@ class ByUserScopeAggregator implements AggregatorInterface public function __construct( private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -64,7 +65,9 @@ class ByUserScopeAggregator implements AggregatorInterface return Declarations::ASIDE_ACTIVITY_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php index 70922b6ae..f4afd9181 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterface { - public function __construct(private readonly AsideActivityRepository $repository) {} + public function __construct(private readonly AsideActivityRepository $repository) + { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php index 6d1eed5fe..b8f3101b7 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; class CountAsideActivity implements ExportInterface, GroupedExportInterface { - public function __construct(private readonly AsideActivityRepository $repository) {} + public function __construct(private readonly AsideActivityRepository $repository) + { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php index 33155c62f..37519b559 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php @@ -42,9 +42,12 @@ final readonly class ListAsideActivity implements ListInterface, GroupedExportIn private CategoryRender $categoryRender, private LocationRepository $locationRepository, private TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php index 0fd318902..872d7305c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php @@ -22,9 +22,13 @@ use Symfony\Component\Form\FormBuilderInterface; class SumAsideActivityDuration implements ExportInterface, GroupedExportInterface { - public function __construct(private readonly AsideActivityRepository $repository) {} + public function __construct(private readonly AsideActivityRepository $repository) + { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php index 708b12ef1..7c1f4348c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByActivityTypeFilter.php @@ -28,7 +28,8 @@ class ByActivityTypeFilter implements FilterInterface private readonly CategoryRender $categoryRender, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly AsideActivityCategoryRepository $asideActivityTypeRepository - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php index b8d77d942..703190f74 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByDateFilter.php @@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ByDateFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, protected TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php index 6de002606..20e8c46f8 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php @@ -25,7 +25,8 @@ final readonly class ByLocationFilter implements FilterInterface { public function __construct( private Security $security - ) {} + ) { + } public function getTitle(): string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php index 8dd1a8eac..e39633914 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserFilter.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByUserFilter implements FilterInterface { - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php index d7255d9fa..2418f5428 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserJobFilter.php @@ -28,7 +28,8 @@ class ByUserJobFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php index 8f8d50462..fd0511e33 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByUserScopeFilter.php @@ -30,7 +30,8 @@ class ByUserScopeFilter implements FilterInterface public function __construct( private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php index 3a69be137..c285f0f9b 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/AsideActivityCategoryType.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; final class AsideActivityCategoryType extends AbstractType { - public function __construct(private readonly CategoryRender $categoryRender) {} + public function __construct(private readonly CategoryRender $categoryRender) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php index 23923fb6c..8341d8595 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Form/Type/PickAsideActivityCategoryType.php @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class PickAsideActivityCategoryType extends AbstractType { - public function __construct(private readonly CategoryRender $categoryRender) {} + public function __construct(private readonly CategoryRender $categoryRender) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php index 43a37e068..d0a593dab 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/AdminMenuBuilder.php @@ -16,7 +16,9 @@ use Symfony\Component\Security\Core\Security; final readonly class AdminMenuBuilder implements \Chill\MainBundle\Routing\LocalMenuBuilderInterface { - public function __construct(private Security $security) {} + public function __construct(private Security $security) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php index a32d52303..0646a8613 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Menu/SectionMenuBuilder.php @@ -21,7 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class SectionMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) {} + public function __construct(protected TranslatorInterface $translator, public AuthorizationCheckerInterface $authorizationChecker) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php b/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php index 2598c4e01..db8995087 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Templating/Entity/CategoryRender.php @@ -26,7 +26,9 @@ final readonly class CategoryRender implements ChillEntityRenderInterface public const SEPERATOR_KEY = 'default.separator'; - public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine) {} + public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine) + { + } public function buildParents(AsideActivityCategory $asideActivityCategory) { diff --git a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php index 38d4d82f5..5282d6bce 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/AbstractElementController.php @@ -25,7 +25,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; abstract class AbstractElementController extends AbstractController { - public function __construct(protected EntityManagerInterface $em, protected TranslatorInterface $translator, protected LoggerInterface $chillMainLogger) {} + public function __construct(protected EntityManagerInterface $em, protected TranslatorInterface $translator, protected LoggerInterface $chillMainLogger) + { + } /** * Route( diff --git a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php index 26acbf8a5..468576673 100644 --- a/src/Bundle/ChillBudgetBundle/Controller/ElementController.php +++ b/src/Bundle/ChillBudgetBundle/Controller/ElementController.php @@ -21,7 +21,9 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; class ElementController extends AbstractController { - public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) {} + public function __construct(private readonly CalculatorManager $calculator, private readonly ResourceRepository $resourceRepository, private readonly ChargeRepository $chargeRepository) + { + } /** * @\Symfony\Component\Routing\Annotation\Route("{_locale}/budget/elements/by-person/{id}", name="chill_budget_elements_index") diff --git a/src/Bundle/ChillBudgetBundle/Form/ChargeType.php b/src/Bundle/ChillBudgetBundle/Form/ChargeType.php index 2d219b62a..c2f2e4b67 100644 --- a/src/Bundle/ChillBudgetBundle/Form/ChargeType.php +++ b/src/Bundle/ChillBudgetBundle/Form/ChargeType.php @@ -27,7 +27,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ChargeType extends AbstractType { - public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ChargeKindRepository $repository, private readonly TranslatorInterface $translator) {} + public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ChargeKindRepository $repository, private readonly TranslatorInterface $translator) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillBudgetBundle/Form/ResourceType.php b/src/Bundle/ChillBudgetBundle/Form/ResourceType.php index ba93f1080..3896b0dd8 100644 --- a/src/Bundle/ChillBudgetBundle/Form/ResourceType.php +++ b/src/Bundle/ChillBudgetBundle/Form/ResourceType.php @@ -26,7 +26,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ResourceType extends AbstractType { - public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ResourceKindRepository $repository, private readonly TranslatorInterface $translator) {} + public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, private readonly ResourceKindRepository $repository, private readonly TranslatorInterface $translator) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php index b8b4b617c..805ad865d 100644 --- a/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillBudgetBundle/Menu/AdminMenuBuilder.php @@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security; final readonly class AdminMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private Security $security) {} + public function __construct(private Security $security) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php index 94583b439..c5d19262d 100644 --- a/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php +++ b/src/Bundle/ChillBudgetBundle/Menu/HouseholdMenuBuilder.php @@ -20,7 +20,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class HouseholdMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) {} + public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php index 25bd6a218..97b10c72b 100644 --- a/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillBudgetBundle/Menu/PersonMenuBuilder.php @@ -20,7 +20,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class PersonMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) {} + public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php b/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php index a57f7fb29..acac8a504 100644 --- a/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php +++ b/src/Bundle/ChillBudgetBundle/Service/Summary/SummaryBudget.php @@ -34,7 +34,9 @@ final readonly class SummaryBudget implements SummaryBudgetInterface private const QUERY_RESOURCE_BY_PERSON = 'select SUM(amount) AS sum, string_agg(comment, \'|\') AS comment, resource_id AS kind_id FROM chill_budget.resource WHERE person_id = ? AND NOW() BETWEEN startdate AND COALESCE(enddate, \'infinity\'::timestamp) GROUP BY resource_id'; - public function __construct(private EntityManagerInterface $em, private TranslatableStringHelperInterface $translatableStringHelper, private ResourceKindRepositoryInterface $resourceKindRepository, private ChargeKindRepositoryInterface $chargeKindRepository) {} + public function __construct(private EntityManagerInterface $em, private TranslatableStringHelperInterface $translatableStringHelper, private ResourceKindRepositoryInterface $resourceKindRepository, private ChargeKindRepositoryInterface $chargeKindRepository) + { + } public function getSummaryForHousehold(?Household $household): array { diff --git a/src/Bundle/ChillBudgetBundle/Templating/BudgetElementTypeRender.php b/src/Bundle/ChillBudgetBundle/Templating/BudgetElementTypeRender.php index 26871b0f4..c8fa90475 100644 --- a/src/Bundle/ChillBudgetBundle/Templating/BudgetElementTypeRender.php +++ b/src/Bundle/ChillBudgetBundle/Templating/BudgetElementTypeRender.php @@ -21,7 +21,9 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface; */ final readonly class BudgetElementTypeRender implements ChillEntityRenderInterface { - public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private \Twig\Environment $engine) {} + public function __construct(private TranslatableStringHelperInterface $translatableStringHelper, private \Twig\Environment $engine) + { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php index 1729c215b..96344103f 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarAPIController.php @@ -23,7 +23,9 @@ use Symfony\Component\Routing\Annotation\Route; class CalendarAPIController extends ApiController { - public function __construct(private readonly CalendarRepository $calendarRepository) {} + public function __construct(private readonly CalendarRepository $calendarRepository) + { + } /** * @Route("/api/1.0/calendar/calendar/by-user/{id}.{_format}", diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php index f4694614f..b6eaaf377 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarController.php @@ -59,7 +59,8 @@ class CalendarController extends AbstractController private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly UserRepositoryInterface $userRepository, private readonly TranslatorInterface $translator - ) {} + ) { + } /** * Delete a calendar item. @@ -406,7 +407,7 @@ class CalendarController extends AbstractController } /** @var Calendar $entity */ - $entity = $em->getRepository(\Chill\CalendarBundle\Entity\Calendar::class)->find($id); + $entity = $em->getRepository(Calendar::class)->find($id); if (null === $entity) { throw $this->createNotFoundException('Unable to find Calendar entity.'); diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarDocController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarDocController.php index d0f5e623d..6bc3245e3 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarDocController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarDocController.php @@ -35,7 +35,8 @@ final readonly class CalendarDocController private FormFactoryInterface $formFactory, private Security $security, private UrlGeneratorInterface $urlGenerator, - ) {} + ) { + } /** * @Route("/{_locale}/calendar/calendar-doc/{id}/new", name="chill_calendar_calendardoc_new") diff --git a/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php b/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php index 459d8f6aa..2bdf393f8 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/CalendarRangeAPIController.php @@ -23,7 +23,9 @@ use Symfony\Component\Routing\Annotation\Route; class CalendarRangeAPIController extends ApiController { - public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository) {} + public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository) + { + } /** * @Route("/api/1.0/calendar/calendar-range-available/{id}.{_format}", diff --git a/src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php b/src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php index 784a6f6ce..16950b29e 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/InviteApiController.php @@ -34,7 +34,9 @@ use Symfony\Component\Security\Core\Security; class InviteApiController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly MessageBusInterface $messageBus, private readonly Security $security) {} + public function __construct(private readonly EntityManagerInterface $entityManager, private readonly MessageBusInterface $messageBus, private readonly Security $security) + { + } /** * Give an answer to a calendar invite. diff --git a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarConnectAzureController.php b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarConnectAzureController.php index 75b417e93..a8339137a 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarConnectAzureController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarConnectAzureController.php @@ -30,7 +30,9 @@ use TheNetworg\OAuth2\Client\Token\AccessToken; class RemoteCalendarConnectAzureController { - public function __construct(private readonly ClientRegistry $clientRegistry, private readonly OnBehalfOfUserTokenStorage $MSGraphTokenStorage) {} + public function __construct(private readonly ClientRegistry $clientRegistry, private readonly OnBehalfOfUserTokenStorage $MSGraphTokenStorage) + { + } /** * @Route("/{_locale}/connect/azure", name="chill_calendar_remote_connect_azure") diff --git a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarMSGraphSyncController.php b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarMSGraphSyncController.php index e7d423abd..1582a8a2d 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarMSGraphSyncController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarMSGraphSyncController.php @@ -27,7 +27,9 @@ use Symfony\Component\Routing\Annotation\Route; class RemoteCalendarMSGraphSyncController { - public function __construct(private readonly MessageBusInterface $messageBus) {} + public function __construct(private readonly MessageBusInterface $messageBus) + { + } /** * @Route("/public/incoming-hook/calendar/msgraph/events/{userId}", name="chill_calendar_remote_msgraph_incoming_webhook_events", diff --git a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarProxyController.php b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarProxyController.php index 673912c0a..eee828884 100644 --- a/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarProxyController.php +++ b/src/Bundle/ChillCalendarBundle/Controller/RemoteCalendarProxyController.php @@ -34,7 +34,9 @@ use Symfony\Component\Serializer\SerializerInterface; */ class RemoteCalendarProxyController { - public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly SerializerInterface $serializer) {} + public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly SerializerInterface $serializer) + { + } /** * @Route("api/1.0/calendar/proxy/calendar/by-user/{id}/events") diff --git a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php index f222823bf..71277cd8a 100644 --- a/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php +++ b/src/Bundle/ChillCalendarBundle/DataFixtures/ORM/LoadCalendarRange.php @@ -28,7 +28,9 @@ class LoadCalendarRange extends Fixture implements FixtureGroupInterface, Ordere { public static array $references = []; - public function __construct(private readonly UserRepository $userRepository) {} + public function __construct(private readonly UserRepository $userRepository) + { + } public static function getGroups(): array { diff --git a/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php b/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php index 82c76eea4..2f263d66a 100644 --- a/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php +++ b/src/Bundle/ChillCalendarBundle/Event/ListenToActivityCreate.php @@ -17,7 +17,9 @@ use Symfony\Component\HttpFoundation\RequestStack; class ListenToActivityCreate { - public function __construct(private readonly RequestStack $requestStack) {} + public function __construct(private readonly RequestStack $requestStack) + { + } public function postPersist(Activity $activity, LifecycleEventArgs $event): void { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index 5e2091fac..43354207c 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class AgentAggregator implements AggregatorInterface { - public function __construct(private UserRepository $userRepository, private UserRender $userRender) {} + public function __construct(private UserRepository $userRepository, private UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index 7c84653d2..7fe83726c 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class CancelReasonAggregator implements AggregatorInterface { - public function __construct(private readonly CancelReasonRepository $cancelReasonRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly CancelReasonRepository $cancelReasonRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index 76cbe5cd8..1d1c4dca9 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -27,7 +27,8 @@ final readonly class JobAggregator implements AggregatorInterface public function __construct( private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ final readonly class JobAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index 6481f95b4..aca3e654b 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -19,7 +19,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class LocationAggregator implements AggregatorInterface { - public function __construct(private LocationRepository $locationRepository) {} + public function __construct(private LocationRepository $locationRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index be9406cfa..1f49ff723 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class LocationTypeAggregator implements AggregatorInterface { - public function __construct(private LocationTypeRepository $locationTypeRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private LocationTypeRepository $locationTypeRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php index 4998f6d1f..d298e63a4 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -27,7 +27,8 @@ final readonly class ScopeAggregator implements AggregatorInterface public function __construct( private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -65,7 +66,9 @@ final readonly class ScopeAggregator implements AggregatorInterface return Declarations::CALENDAR_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php index e9213d3cb..47801add3 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php @@ -26,7 +26,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class UrgencyAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php index f643eaa68..9e7c5e367 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php @@ -27,7 +27,8 @@ class CountCalendars implements ExportInterface, GroupedExportInterface { public function __construct( private readonly CalendarRepository $calendarRepository, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php index b69185a17..f7f19d1e4 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php @@ -24,7 +24,9 @@ use Symfony\Component\Form\FormBuilderInterface; class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface { - public function __construct(private readonly CalendarRepository $calendarRepository) {} + public function __construct(private readonly CalendarRepository $calendarRepository) + { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php index 8ea23014c..e9920444a 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php @@ -24,7 +24,9 @@ use Symfony\Component\Form\FormBuilderInterface; class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface { - public function __construct(private readonly CalendarRepository $calendarRepository) {} + public function __construct(private readonly CalendarRepository $calendarRepository) + { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php index c16c148fc..888ee4363 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class AgentFilter implements FilterInterface { - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php index 90a004388..1fe9eadc5 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class BetweenDatesFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php index 63149509f..e493ce0bf 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/CalendarRangeFilter.php @@ -34,7 +34,9 @@ class CalendarRangeFilter implements FilterInterface private const DEFAULT_CHOICE = 'false'; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index c122a298d..6b81a709f 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -27,7 +27,8 @@ final readonly class JobFilter implements FilterInterface public function __construct( private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index 93edc1b3a..ef7c14199 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -29,7 +29,8 @@ class ScopeFilter implements FilterInterface public function __construct( protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php index eec0b3f9f..b83bb992d 100644 --- a/src/Bundle/ChillCalendarBundle/Form/CalendarType.php +++ b/src/Bundle/ChillCalendarBundle/Form/CalendarType.php @@ -38,7 +38,8 @@ class CalendarType extends AbstractType private readonly IdToLocationDataTransformer $idToLocationDataTransformer, private readonly ThirdPartiesToIdDataTransformer $partiesToIdDataTransformer, private readonly IdToCalendarRangeDataTransformer $calendarRangeDataTransformer - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php index 6dd5bfa52..3997c4dad 100644 --- a/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Menu/AccompanyingCourseMenuBuilder.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AccompanyingCourseMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {} + public function __construct(private readonly Security $security, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php index e92a72bb7..c7bbc756c 100644 --- a/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Menu/PersonMenuBuilder.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class PersonMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly Security $security, protected TranslatorInterface $translator) {} + public function __construct(private readonly Security $security, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php index 3a062f7b8..90b94b08e 100644 --- a/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Menu/UserMenuBuilder.php @@ -18,7 +18,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class UserMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly Security $security, public TranslatorInterface $translator) {} + public function __construct(private readonly Security $security, public TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php b/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php index 8f62fdcdb..d0feca3d8 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarEntityListener.php @@ -29,7 +29,9 @@ use Symfony\Component\Security\Core\Security; class CalendarEntityListener { - public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) {} + public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) + { + } public function postPersist(Calendar $calendar, PostPersistEventArgs $args): void { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php b/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php index 8b875bdcb..cc3bf649e 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Doctrine/CalendarRangeEntityListener.php @@ -29,7 +29,9 @@ use Symfony\Component\Security\Core\Security; class CalendarRangeEntityListener { - public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) {} + public function __construct(private readonly MessageBusInterface $messageBus, private readonly Security $security) + { + } public function postPersist(CalendarRange $calendarRange, PostPersistEventArgs $eventArgs): void { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php index 7749d503c..c55bd8144 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeRemoveToRemoteHandler.php @@ -31,7 +31,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class CalendarRangeRemoveToRemoteHandler implements MessageHandlerInterface { - public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) {} + public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly UserRepository $userRepository) + { + } public function __invoke(CalendarRangeRemovedMessage $calendarRangeRemovedMessage) { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeToRemoteHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeToRemoteHandler.php index c9fd1b939..950ca526d 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeToRemoteHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRangeToRemoteHandler.php @@ -32,7 +32,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class CalendarRangeToRemoteHandler implements MessageHandlerInterface { - public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) {} + public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly EntityManagerInterface $entityManager) + { + } public function __invoke(CalendarRangeMessage $calendarRangeMessage): void { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php index 73e8a0c37..6838d3147 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarRemoveHandler.php @@ -31,7 +31,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class CalendarRemoveHandler implements MessageHandlerInterface { - public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) {} + public function __construct(private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly UserRepositoryInterface $userRepository) + { + } public function __invoke(CalendarRemovedMessage $message) { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php index 6a1388d2e..310e8734b 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/CalendarToRemoteHandler.php @@ -37,7 +37,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class CalendarToRemoteHandler implements MessageHandlerInterface { - public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) {} + public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $entityManager, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $calendarConnector, private readonly UserRepository $userRepository) + { + } public function __invoke(CalendarMessage $calendarMessage) { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/InviteUpdateHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/InviteUpdateHandler.php index 7ca5f2c12..1d987c19e 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/InviteUpdateHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/InviteUpdateHandler.php @@ -31,7 +31,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class InviteUpdateHandler implements MessageHandlerInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly InviteRepository $inviteRepository, private readonly RemoteCalendarConnectorInterface $remoteCalendarConnector) + { + } public function __invoke(InviteUpdateMessage $inviteUpdateMessage): void { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Handler/MSGraphChangeNotificationHandler.php b/src/Bundle/ChillCalendarBundle/Messenger/Handler/MSGraphChangeNotificationHandler.php index 7a67bee61..26908a6e4 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Handler/MSGraphChangeNotificationHandler.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Handler/MSGraphChangeNotificationHandler.php @@ -36,7 +36,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class MSGraphChangeNotificationHandler implements MessageHandlerInterface { - public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) {} + public function __construct(private readonly CalendarRangeRepository $calendarRangeRepository, private readonly CalendarRangeSyncer $calendarRangeSyncer, private readonly CalendarRepository $calendarRepository, private readonly CalendarSyncer $calendarSyncer, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UserRepository $userRepository) + { + } public function __invoke(MSGraphChangeNotificationMessage $changeNotificationMessage): void { diff --git a/src/Bundle/ChillCalendarBundle/Messenger/Message/MSGraphChangeNotificationMessage.php b/src/Bundle/ChillCalendarBundle/Messenger/Message/MSGraphChangeNotificationMessage.php index 15b8c6733..682369e03 100644 --- a/src/Bundle/ChillCalendarBundle/Messenger/Message/MSGraphChangeNotificationMessage.php +++ b/src/Bundle/ChillCalendarBundle/Messenger/Message/MSGraphChangeNotificationMessage.php @@ -20,7 +20,9 @@ namespace Chill\CalendarBundle\Messenger\Message; class MSGraphChangeNotificationMessage { - public function __construct(private readonly array $content, private readonly int $userId) {} + public function __construct(private readonly array $content, private readonly int $userId) + { + } public function getContent(): array { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/AddressConverter.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/AddressConverter.php index 2535e23ca..2764a46e3 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/AddressConverter.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/AddressConverter.php @@ -24,7 +24,9 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface; class AddressConverter { - public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function addressToRemote(Address $address): array { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/EventsOnUserSubscriptionCreator.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/EventsOnUserSubscriptionCreator.php index 080140d86..f3d764acc 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/EventsOnUserSubscriptionCreator.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/EventsOnUserSubscriptionCreator.php @@ -28,7 +28,9 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface; */ class EventsOnUserSubscriptionCreator { - public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator) {} + public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator) + { + } /** * @return array{secret: string, id: string, expiration: int} diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/LocationConverter.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/LocationConverter.php index f14683b9e..cbf97806e 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/LocationConverter.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/LocationConverter.php @@ -22,7 +22,9 @@ use Chill\MainBundle\Entity\Location; class LocationConverter { - public function __construct(private readonly AddressConverter $addressConverter) {} + public function __construct(private readonly AddressConverter $addressConverter) + { + } public function locationToRemote(Location $location): array { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php index 37e3e1996..2d1006cca 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php @@ -27,7 +27,8 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface private HttpClientInterface $machineHttpClient, private MapCalendarToUser $mapCalendarToUser, private ClockInterface $clock, - ) {} + ) { + } /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php index 318580ffc..1d7b181f3 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php @@ -21,7 +21,8 @@ readonly class MSUserAbsenceSync private MSUserAbsenceReaderInterface $absenceReader, private ClockInterface $clock, private LoggerInterface $logger, - ) {} + ) { + } public function syncUserAbsence(User $user): void { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineTokenStorage.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineTokenStorage.php index f2a0fc096..f5d25caaf 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineTokenStorage.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineTokenStorage.php @@ -29,7 +29,9 @@ class MachineTokenStorage private ?AccessTokenInterface $accessToken = null; - public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis) {} + public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis) + { + } public function getToken(): AccessTokenInterface { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php index 4b214e6d0..70a0fae55 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php @@ -36,7 +36,9 @@ class MapCalendarToUser final public const SECRET_SUBSCRIPTION_EVENT = 'subscription_events_secret'; - public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger) {} + public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger) + { + } public function getActiveSubscriptionId(User $user): string { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php index d8fff109b..cc5b72b42 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserTokenStorage.php @@ -29,7 +29,9 @@ class OnBehalfOfUserTokenStorage { final public const MS_GRAPH_ACCESS_TOKEN = 'msgraph_access_token'; - public function __construct(private readonly Azure $azure, private readonly SessionInterface $session) {} + public function __construct(private readonly Azure $azure, private readonly SessionInterface $session) + { + } public function getToken(): AccessToken { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarRangeSyncer.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarRangeSyncer.php index 1dffe198c..0c9621aeb 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarRangeSyncer.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarRangeSyncer.php @@ -32,7 +32,9 @@ class CalendarRangeSyncer /** * @param MachineHttpClient $machineHttpClient */ - public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient) + { + } public function handleCalendarRangeSync(CalendarRange $calendarRange, array $notification, User $user): void { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarSyncer.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarSyncer.php index 9b4daf626..06e0f2b39 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarSyncer.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/RemoteToLocalSync/CalendarSyncer.php @@ -29,7 +29,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface; class CalendarSyncer { - public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository) {} + public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository) + { + } public function handleCalendarSync(Calendar $calendar, array $notification, User $user): void { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php index 768ad2a44..23f83688a 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php @@ -41,7 +41,9 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface { private array $cacheScheduleTimeForUser = []; - public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security) {} + public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security) + { + } public function countEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate): int { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php index b4e2a5d3a..4acb40554 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php @@ -46,13 +46,23 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface return []; } - public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void {} + public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void + { + } - public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {} + public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void + { + } - public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {} + public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void + { + } - public function syncCalendarRange(CalendarRange $calendarRange): void {} + public function syncCalendarRange(CalendarRange $calendarRange): void + { + } - public function syncInvite(Invite $invite): void {} + public function syncInvite(Invite $invite): void + { + } } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Model/RemoteEvent.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Model/RemoteEvent.php index 40d1d1435..0c87ae4eb 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Model/RemoteEvent.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Model/RemoteEvent.php @@ -44,5 +44,6 @@ class RemoteEvent * @Serializer\Groups({"read"}) */ public bool $isAllDay = false - ) {} + ) { + } } diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php index 8f490f376..c91794c6b 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php @@ -28,7 +28,9 @@ use Doctrine\ORM\QueryBuilder; class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface { - public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly EntityManagerInterface $em) + { + } public function buildQueryByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate): QueryBuilder { diff --git a/src/Bundle/ChillCalendarBundle/Security/Voter/CalendarDocVoter.php b/src/Bundle/ChillCalendarBundle/Security/Voter/CalendarDocVoter.php index a0e653cb1..5eaa85871 100644 --- a/src/Bundle/ChillCalendarBundle/Security/Voter/CalendarDocVoter.php +++ b/src/Bundle/ChillCalendarBundle/Security/Voter/CalendarDocVoter.php @@ -27,7 +27,9 @@ class CalendarDocVoter extends Voter 'CHILL_CALENDAR_DOC_SEE', ]; - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } protected function supports($attribute, $subject): bool { diff --git a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContext.php b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContext.php index 087f5ea86..27cfb05e6 100644 --- a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContext.php +++ b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContext.php @@ -41,7 +41,8 @@ final readonly class CalendarContext implements CalendarContextInterface private ThirdPartyRender $thirdPartyRender, private ThirdPartyRepository $thirdPartyRepository, private TranslatableStringHelperInterface $translatableStringHelper - ) {} + ) { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php index 09a333f3f..917a0b5fa 100644 --- a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php +++ b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php @@ -19,4 +19,6 @@ use Chill\DocGeneratorBundle\Context\DocGeneratorContextWithPublicFormInterface; * @extends DocGeneratorContextWithPublicFormInterface * @extends DocGeneratorContextWithAdminFormInterface */ -interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface {} +interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface +{ +} diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php index 5e4e7de83..7b566a2f1 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php @@ -38,7 +38,8 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen public function __construct( private Security $security, private EntityManagerInterface $em - ) {} + ) { + } /** * @throws MappingException diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php index 49e890ca0..7b7a8f96d 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php @@ -37,7 +37,8 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private EntityManagerInterface $em - ) {} + ) { + } private function addWhereClausesToQuery(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery { diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Renderers/AccompanyingPeriodCalendarGenericDocRenderer.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Renderers/AccompanyingPeriodCalendarGenericDocRenderer.php index 123afc164..1f4c3a45f 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Renderers/AccompanyingPeriodCalendarGenericDocRenderer.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Renderers/AccompanyingPeriodCalendarGenericDocRenderer.php @@ -19,7 +19,9 @@ use Chill\DocStoreBundle\GenericDoc\Twig\GenericDocRendererInterface; final readonly class AccompanyingPeriodCalendarGenericDocRenderer implements GenericDocRendererInterface { - public function __construct(private CalendarDocRepository $repository) {} + public function __construct(private CalendarDocRepository $repository) + { + } public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php index 9a4a92a94..b03a023d8 100644 --- a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php +++ b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/BulkCalendarShortMessageSender.php @@ -25,7 +25,9 @@ use Symfony\Component\Messenger\MessageBusInterface; class BulkCalendarShortMessageSender { - public function __construct(private readonly CalendarForShortMessageProvider $provider, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MessageBusInterface $messageBus, private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder) {} + public function __construct(private readonly CalendarForShortMessageProvider $provider, private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly MessageBusInterface $messageBus, private readonly ShortMessageForCalendarBuilderInterface $messageForCalendarBuilder) + { + } public function sendBulkMessageToEligibleCalendars() { diff --git a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/CalendarForShortMessageProvider.php b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/CalendarForShortMessageProvider.php index 31b870ed4..85bc74efc 100644 --- a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/CalendarForShortMessageProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/CalendarForShortMessageProvider.php @@ -24,7 +24,9 @@ use Doctrine\ORM\EntityManagerInterface; class CalendarForShortMessageProvider { - public function __construct(private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $em, private readonly RangeGeneratorInterface $rangeGenerator) {} + public function __construct(private readonly CalendarRepository $calendarRepository, private readonly EntityManagerInterface $em, private readonly RangeGeneratorInterface $rangeGenerator) + { + } /** * Generate calendars instance. diff --git a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilder.php b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilder.php index 880c9950f..6c402ffe3 100644 --- a/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilder.php +++ b/src/Bundle/ChillCalendarBundle/Service/ShortMessageNotification/DefaultShortMessageForCalendarBuilder.php @@ -23,7 +23,9 @@ use Chill\MainBundle\Service\ShortMessage\ShortMessage; class DefaultShortMessageForCalendarBuilder implements ShortMessageForCalendarBuilderInterface { - public function __construct(private readonly \Twig\Environment $engine) {} + public function __construct(private readonly \Twig\Environment $engine) + { + } public function buildMessageForCalendar(Calendar $calendar): array { diff --git a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php index 08425bcf0..de3f0cf5b 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php +++ b/src/Bundle/ChillCustomFieldsBundle/Command/CreateFieldsOnGroupCommand.php @@ -86,7 +86,7 @@ class CreateFieldsOnGroupCommand extends Command $em = $this->entityManager; $customFieldsGroups = $em - ->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) + ->getRepository(CustomFieldsGroup::class) ->findAll(); if (0 === \count($customFieldsGroups)) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php index 00e377bde..0e0c23ab4 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldController.php @@ -25,7 +25,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class CustomFieldController extends AbstractController { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } /** * Creates a new CustomField entity. @@ -121,7 +123,7 @@ class CustomFieldController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomField::class)->find($id); + $entity = $em->getRepository(CustomField::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find CustomField entity.'); diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php index a8e77d059..b88a005dc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php @@ -36,7 +36,9 @@ class CustomFieldsGroupController extends AbstractController /** * CustomFieldsGroupController constructor. */ - public function __construct(private readonly CustomFieldProvider $customFieldProvider, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly CustomFieldProvider $customFieldProvider, private readonly TranslatorInterface $translator) + { + } /** * Creates a new CustomFieldsGroup entity. @@ -78,7 +80,7 @@ class CustomFieldsGroupController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id); + $entity = $em->getRepository(CustomFieldsGroup::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); @@ -101,7 +103,7 @@ class CustomFieldsGroupController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $cfGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findAll(); + $cfGroups = $em->getRepository(CustomFieldsGroup::class)->findAll(); $defaultGroups = $this->getDefaultGroupsId(); $makeDefaultFormViews = []; @@ -133,13 +135,13 @@ class CustomFieldsGroupController extends AbstractController $em = $this->getDoctrine()->getManager(); - $cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->findOneById($cFGroupId); + $cFGroup = $em->getRepository(CustomFieldsGroup::class)->findOneById($cFGroupId); if (!$cFGroup) { throw $this->createNotFoundException('customFieldsGroup not found with '."id {$cFGroupId}"); } - $cFDefaultGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class) + $cFDefaultGroup = $em->getRepository(CustomFieldsDefaultGroup::class) ->findOneByEntity($cFGroup->getEntity()); if ($cFDefaultGroup) { @@ -194,7 +196,7 @@ class CustomFieldsGroupController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id); + $entity = $em->getRepository(CustomFieldsGroup::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find CustomFieldsGroups entity.'); @@ -238,7 +240,7 @@ class CustomFieldsGroupController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id); + $entity = $em->getRepository(CustomFieldsGroup::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); @@ -262,7 +264,7 @@ class CustomFieldsGroupController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class)->find($id); + $entity = $em->getRepository(CustomFieldsGroup::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find CustomFieldsGroup entity.'); diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php index b69f0d37e..3daee9ecb 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php @@ -43,7 +43,8 @@ class CustomFieldChoice extends AbstractCustomField * @var TranslatableStringHelper Helper that find the string in current locale from an array of translation */ private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function allowOtherChoice(CustomField $cf) { diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php index dac447930..ecc97fbcc 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldDate.php @@ -45,7 +45,8 @@ class CustomFieldDate extends AbstractCustomField public function __construct( private readonly Environment $templating, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, CustomField $customField) { diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php index 54d63b978..b524eca5d 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldLongChoice.php @@ -28,7 +28,8 @@ class CustomFieldLongChoice extends AbstractCustomField private readonly OptionRepository $optionRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $templating, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, CustomField $customField) { diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php index e083b9b80..27dfce42c 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldNumber.php @@ -42,7 +42,8 @@ class CustomFieldNumber extends AbstractCustomField public function __construct( private readonly Environment $templating, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, CustomField $customField) { diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php index 17d8e95e7..6e9a3df0e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldText.php @@ -29,7 +29,8 @@ class CustomFieldText extends AbstractCustomField public function __construct( private readonly Environment $templating, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } /** * Create a form according to the maxLength option. diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php index 302e04350..07a0a0121 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldTitle.php @@ -32,7 +32,8 @@ class CustomFieldTitle extends AbstractCustomField * @var TranslatableStringHelper Helper that find the string in current locale from an array of translation */ private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, CustomField $customField) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php index 23a7ed975..f7ffdc465 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldType.php @@ -30,7 +30,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class CustomFieldType extends AbstractType { - public function __construct(private readonly CustomFieldProvider $customFieldProvider, private readonly ObjectManager $om, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly CustomFieldProvider $customFieldProvider, private readonly ObjectManager $om, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php index 8cf3ea182..5bb16c80d 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/CustomFieldsGroupType.php @@ -27,7 +27,8 @@ class CustomFieldsGroupType extends AbstractType private readonly array $customizableEntities, // TODO : add comment about this variable private readonly TranslatorInterface $translator - ) {} + ) { + } // TODO : details about the function public function buildForm(FormBuilderInterface $builder, array $options) diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php index ee5f8b386..3091ea66f 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldDataTransformer.php @@ -17,7 +17,9 @@ use Symfony\Component\Form\DataTransformerInterface; class CustomFieldDataTransformer implements DataTransformerInterface { - public function __construct(private readonly CustomFieldInterface $customFieldDefinition, private readonly CustomField $customField) {} + public function __construct(private readonly CustomFieldInterface $customFieldDefinition, private readonly CustomField $customField) + { + } public function reverseTransform($value) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php index 180ac0a8a..cd33068a9 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/DataTransformer/CustomFieldsGroupToIdTransformer.php @@ -18,7 +18,9 @@ use Symfony\Component\Form\Exception\TransformationFailedException; class CustomFieldsGroupToIdTransformer implements DataTransformerInterface { - public function __construct(private readonly ObjectManager $om) {} + public function __construct(private readonly ObjectManager $om) + { + } /** * Transforms a string (id) to an object (CustomFieldsGroup). diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php index 5d5377a15..fa462737e 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php @@ -16,7 +16,9 @@ use Symfony\Component\Form\FormBuilderInterface; class CustomFieldsTitleType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options) {} + public function buildForm(FormBuilderInterface $builder, array $options) + { + } public function getBlockPrefix() { diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php index 8f6e896bf..25418e5c4 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/LinkedCustomFieldsType.php @@ -42,7 +42,9 @@ class LinkedCustomFieldsType extends AbstractType */ private array $options = []; - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } /** * append Choice on POST_SET_DATA event. diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php index 320f36544..e684899b4 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php +++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldsHelper.php @@ -29,7 +29,9 @@ class CustomFieldsHelper * @param CustomFieldProvider $provider The customfield provider that * contains all the declared custom fields */ - public function __construct(private readonly EntityManagerInterface $em, private readonly CustomFieldProvider $provider) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly CustomFieldProvider $provider) + { + } public function isEmptyValue(array $fields, CustomField $customField) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php index 6d3d889a8..62181de74 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php +++ b/src/Bundle/ChillCustomFieldsBundle/Templating/Twig/CustomFieldRenderingTwig.php @@ -31,7 +31,9 @@ class CustomFieldRenderingTwig extends AbstractExtension 'label_layout' => '@ChillCustomFields/CustomField/render_label.html.twig', ]; - public function __construct(private readonly CustomFieldsHelper $customFieldsHelper) {} + public function __construct(private readonly CustomFieldsHelper $customFieldsHelper) + { + } /** * (non-PHPdoc). diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php index 35d9ca3a3..48d4847d6 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsChoiceTest.php @@ -29,7 +29,7 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; final class CustomFieldsChoiceTest extends KernelTestCase { /** - * @var \Chill\CustomFieldsBundle\CustomFields\CustomFieldChoice + * @var CustomFieldChoice */ private $cfChoice; diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php index 87722c1bd..2d1268e71 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/CustomFields/CustomFieldsTextTest.php @@ -43,7 +43,7 @@ final class CustomFieldsTextTest extends WebTestCase $customField ); $this->assertInstanceOf( - \Chill\CustomFieldsBundle\CustomFields\CustomFieldText::class, + CustomFieldText::class, $customField ); } diff --git a/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php b/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php index afcf6fab1..95419e001 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php +++ b/src/Bundle/ChillDocGeneratorBundle/Context/ContextManager.php @@ -19,7 +19,9 @@ final readonly class ContextManager implements ContextManagerInterface /** * @param \Chill\DocGeneratorBundle\Context\DocGeneratorContextInterface[] $contexts */ - public function __construct(private iterable $contexts) {} + public function __construct(private iterable $contexts) + { + } public function getContextByDocGeneratorTemplate(DocGeneratorTemplate $docGeneratorTemplate): DocGeneratorContextInterface { diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php index ecb896080..ebce55957 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/AdminDocGeneratorTemplateController.php @@ -22,7 +22,9 @@ use Symfony\Component\Routing\Annotation\Route; class AdminDocGeneratorTemplateController extends CRUDController { - public function __construct(private readonly ContextManager $contextManager) {} + public function __construct(private readonly ContextManager $contextManager) + { + } public function generateTemplateParameter(string $action, $entity, Request $request, array $defaultTemplateParameters = []) { diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php index c9e1873b2..788ccb59c 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php @@ -37,7 +37,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; final class DocGeneratorTemplateController extends AbstractController { - public function __construct(private readonly ContextManager $contextManager, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly GeneratorInterface $generator, private readonly MessageBusInterface $messageBus, private readonly PaginatorFactory $paginatorFactory, private readonly EntityManagerInterface $entityManager) {} + public function __construct(private readonly ContextManager $contextManager, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly GeneratorInterface $generator, private readonly MessageBusInterface $messageBus, private readonly PaginatorFactory $paginatorFactory, private readonly EntityManagerInterface $entityManager) + { + } /** * @Route( diff --git a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php index 1b87ef926..8f698cb97 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php +++ b/src/Bundle/ChillDocGeneratorBundle/Form/DocGeneratorTemplateType.php @@ -24,7 +24,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class DocGeneratorTemplateType extends AbstractType { - public function __construct(private readonly ContextManager $contextManager) {} + public function __construct(private readonly ContextManager $contextManager) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php index 8796b8e39..a021e1495 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php +++ b/src/Bundle/ChillDocGeneratorBundle/Menu/AdminMenuBuilder.php @@ -18,7 +18,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AdminMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly TranslatorInterface $translator, private readonly Security $security) {} + public function __construct(private readonly TranslatorInterface $translator, private readonly Security $security) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php index b429bca87..c7167670d 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php +++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php @@ -16,7 +16,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class NormalizeNullValueHelper { - public function __construct(private readonly NormalizerInterface $normalizer, private readonly ?string $discriminatorType = null, private readonly ?string $discriminatorValue = null) {} + public function __construct(private readonly NormalizerInterface $normalizer, private readonly ?string $discriminatorType = null, private readonly ?string $discriminatorValue = null) + { + } public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ClassMetadataInterface $classMetadata = null) { diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php b/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php index 1eada4e52..28092331f 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php @@ -17,7 +17,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class BaseContextData { - public function __construct(private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly NormalizerInterface $normalizer) + { + } public function getData(User $user = null): array { diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php index 4918223f5..25b5f9f03 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php @@ -27,7 +27,9 @@ class Generator implements GeneratorInterface { private const LOG_PREFIX = '[docgen generator] '; - public function __construct(private readonly ContextManagerInterface $contextManager, private readonly DriverInterface $driver, private readonly EntityManagerInterface $entityManager, private readonly LoggerInterface $logger, private readonly StoredObjectManagerInterface $storedObjectManager) {} + public function __construct(private readonly ContextManagerInterface $contextManager, private readonly DriverInterface $driver, private readonly EntityManagerInterface $entityManager, private readonly LoggerInterface $logger, private readonly StoredObjectManagerInterface $storedObjectManager) + { + } /** * @template T of File|null diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php index 54889f518..57006cb9d 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php @@ -28,7 +28,9 @@ final readonly class OnGenerationFails implements EventSubscriberInterface { public const LOG_PREFIX = '[docgen failed] '; - public function __construct(private DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private EntityManagerInterface $entityManager, private LoggerInterface $logger, private MailerInterface $mailer, private StoredObjectRepository $storedObjectRepository, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository) {} + public function __construct(private DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private EntityManagerInterface $entityManager, private LoggerInterface $logger, private MailerInterface $mailer, private StoredObjectRepository $storedObjectRepository, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository) + { + } public static function getSubscribedEvents() { @@ -47,7 +49,7 @@ final readonly class OnGenerationFails implements EventSubscriberInterface return; } - /** @var \Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage $message */ + /** @var RequestGenerationMessage $message */ $message = $event->getEnvelope()->getMessage(); $this->logger->error(self::LOG_PREFIX.'Docgen failed', [ diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php index f6723c617..4ec59d9d4 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php @@ -30,7 +30,9 @@ class RequestGenerationHandler implements MessageHandlerInterface private const LOG_PREFIX = '[docgen message handler] '; - public function __construct(private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly EntityManagerInterface $entityManager, private readonly Generator $generator, private readonly LoggerInterface $logger, private readonly StoredObjectRepository $storedObjectRepository, private readonly UserRepositoryInterface $userRepository) {} + public function __construct(private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly EntityManagerInterface $entityManager, private readonly Generator $generator, private readonly LoggerInterface $logger, private readonly StoredObjectRepository $storedObjectRepository, private readonly UserRepositoryInterface $userRepository) + { + } public function __invoke(RequestGenerationMessage $message) { diff --git a/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php b/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php index 44feb5a47..7fe5eca85 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/DocumentAccompanyingCourseController.php @@ -37,7 +37,8 @@ class DocumentAccompanyingCourseController extends AbstractController protected TranslatorInterface $translator, protected EventDispatcherInterface $eventDispatcher, protected AuthorizationHelper $authorizationHelper - ) {} + ) { + } /** * @Route("/{id}/delete", name="chill_docstore_accompanying_course_document_delete") diff --git a/src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php b/src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php index fc58dff18..14b38f5d4 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/DocumentCategoryController.php @@ -32,7 +32,7 @@ class DocumentCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); $documentCategory = $em - ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class) + ->getRepository(DocumentCategory::class) ->findOneBy( ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ); @@ -52,7 +52,7 @@ class DocumentCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); $documentCategory = $em - ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class) + ->getRepository(DocumentCategory::class) ->findOneBy( ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ); @@ -135,7 +135,7 @@ class DocumentCategoryController extends AbstractController { $em = $this->getDoctrine()->getManager(); $documentCategory = $em - ->getRepository(\Chill\DocStoreBundle\Entity\DocumentCategory::class) + ->getRepository(DocumentCategory::class) ->findOneBy( ['bundleId' => $bundleId, 'idInsideBundle' => $idInsideBundle] ); diff --git a/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php b/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php index 73fffa1c4..0f2e9caee 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/DocumentPersonController.php @@ -43,7 +43,8 @@ class DocumentPersonController extends AbstractController protected TranslatorInterface $translator, protected EventDispatcherInterface $eventDispatcher, protected AuthorizationHelper $authorizationHelper - ) {} + ) { + } /** * @Route("/{id}/delete", name="chill_docstore_person_document_delete") diff --git a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php index e615c3b00..43a3eca2c 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php @@ -29,7 +29,8 @@ final readonly class GenericDocForAccompanyingPeriodController private PaginatorFactory $paginator, private Security $security, private \Twig\Environment $twig, - ) {} + ) { + } /** * @throws \Doctrine\DBAL\Exception diff --git a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php index f6fecae04..d0d034c7e 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php @@ -29,7 +29,8 @@ final readonly class GenericDocForPerson private PaginatorFactory $paginator, private Security $security, private \Twig\Environment $twig, - ) {} + ) { + } /** * @throws \Doctrine\DBAL\Exception diff --git a/src/Bundle/ChillDocStoreBundle/Controller/StoredObjectApiController.php b/src/Bundle/ChillDocStoreBundle/Controller/StoredObjectApiController.php index 5a4b90474..6bfb05bfc 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/StoredObjectApiController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/StoredObjectApiController.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; class StoredObjectApiController { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } /** * @Route("/api/1.0/doc-store/stored-object/{uuid}/is-ready") diff --git a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php index a6c19584d..b7e056cac 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/DocumentCategory.php @@ -53,7 +53,8 @@ class DocumentCategory * @var int The id which is unique inside the bundle */ private $idInsideBundle - ) {} + ) { + } public function getBundleId() // ::class BundleClass (FQDN) { diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index 659395034..40b1a73b8 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -41,7 +41,7 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") * - * @var \Chill\MainBundle\Entity\Scope The document's center + * @var Scope The document's center */ private ?\Chill\MainBundle\Entity\Scope $scope = null; diff --git a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php index 0addd53cc..5c0b7d501 100644 --- a/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php +++ b/src/Bundle/ChillDocStoreBundle/Form/PersonDocumentType.php @@ -30,7 +30,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PersonDocumentType extends AbstractType { - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcher $centerResolverDispatcher) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcher $centerResolverDispatcher) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php index 80eeaf372..8adf13b42 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php @@ -54,7 +54,8 @@ class FetchQuery implements FetchQueryInterface private array $selectIdentifierTypes = [], private array $selectDateParams = [], private array $selectDateTypes = [], - ) {} + ) { + } public function addJoinClause(string $sql, array $params = [], array $types = []): int { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php index 7307f0d6a..fe9bf7e4f 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php @@ -21,7 +21,8 @@ final readonly class GenericDocDTO public array $identifiers, public \DateTimeImmutable $docDate, public AccompanyingPeriod|Person $linked, - ) {} + ) { + } public function getContext(): string { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php index 40130e3cc..3ef5d5482 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php @@ -31,7 +31,8 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen public function __construct( private Security $security, private EntityManagerInterface $entityManager, - ) {} + ) { + } public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php index 5f4728297..3345b1c7e 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php @@ -27,7 +27,8 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository, - ) {} + ) { + } public function buildFetchQueryForPerson( Person $person, diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php index 70175ee1b..195b621c9 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php @@ -23,7 +23,8 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen public function __construct( private AccompanyingCourseDocumentRepository $accompanyingCourseDocumentRepository, private PersonDocumentRepository $personDocumentRepository, - ) {} + ) { + } public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php index e64838b41..abbaceffb 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php @@ -25,7 +25,8 @@ final readonly class GenericDocExtensionRuntime implements RuntimeExtensionInter * @var list */ private iterable $renderers, - ) {} + ) { + } /** * @throws RuntimeError diff --git a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php index 485c95078..4848d0a5d 100644 --- a/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php +++ b/src/Bundle/ChillDocStoreBundle/Menu/MenuBuilder.php @@ -20,7 +20,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class MenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private Security $security, private TranslatorInterface $translator) {} + public function __construct(private Security $security, private TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php index 385e8f398..dacd141f3 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php @@ -34,7 +34,8 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA private CenterResolverManagerInterface $centerResolverManager, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private Security $security, - ) {} + ) { + } public function buildQueryByPerson(Person $person): QueryBuilder { diff --git a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php index 2c96f7faa..d149e4e9b 100644 --- a/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php +++ b/src/Bundle/ChillDocStoreBundle/Serializer/Normalizer/StoredObjectDenormalizer.php @@ -20,7 +20,9 @@ class StoredObjectDenormalizer implements DenormalizerInterface { use ObjectToPopulateTrait; - public function __construct(private readonly StoredObjectRepository $storedObjectRepository) {} + public function __construct(private readonly StoredObjectRepository $storedObjectRepository) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php b/src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php index 34df98fa2..b55074627 100644 --- a/src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php +++ b/src/Bundle/ChillDocStoreBundle/Service/StoredObjectManager.php @@ -27,7 +27,9 @@ final class StoredObjectManager implements StoredObjectManagerInterface private array $inMemory = []; - public function __construct(private readonly HttpClientInterface $client, private readonly TempUrlGeneratorInterface $tempUrlGenerator) {} + public function __construct(private readonly HttpClientInterface $client, private readonly TempUrlGeneratorInterface $tempUrlGenerator) + { + } public function getLastModified(StoredObject $document): \DateTimeInterface { diff --git a/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php b/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php index 5f7a3c7df..969e4f95e 100644 --- a/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php +++ b/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php @@ -120,7 +120,9 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt private const TEMPLATE_BUTTON_GROUP = '@ChillDocStore/Button/button_group.html.twig'; - public function __construct(private DiscoveryInterface $discovery, private NormalizerInterface $normalizer) {} + public function __construct(private DiscoveryInterface $discovery, private NormalizerInterface $normalizer) + { + } /** * return true if the document is editable. diff --git a/src/Bundle/ChillEventBundle/ChillEventBundle.php b/src/Bundle/ChillEventBundle/ChillEventBundle.php index 9754f397f..d5a1b43cf 100644 --- a/src/Bundle/ChillEventBundle/ChillEventBundle.php +++ b/src/Bundle/ChillEventBundle/ChillEventBundle.php @@ -13,4 +13,6 @@ namespace Chill\EventBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillEventBundle extends Bundle {} +class ChillEventBundle extends Bundle +{ +} diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index e6ea264e4..e383c5432 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -92,7 +92,7 @@ class EventController extends AbstractController public function deleteAction($event_id, Request $request): \Symfony\Component\HttpFoundation\RedirectResponse|\Symfony\Component\HttpFoundation\Response { $em = $this->getDoctrine()->getManager(); - $event = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->findOneBy([ + $event = $em->getRepository(Event::class)->findOneBy([ 'id' => $event_id, ]); @@ -146,7 +146,7 @@ class EventController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id); + $entity = $em->getRepository(Event::class)->find($event_id); if (!$entity) { throw $this->createNotFoundException('Unable to find Event entity.'); @@ -173,7 +173,7 @@ class EventController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); + $person = $em->getRepository(Person::class)->find($person_id); if (null === $person) { throw $this->createNotFoundException('Person not found'); @@ -187,11 +187,11 @@ class EventController extends AbstractController $person->getCenter() ); - $total = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->countByPerson($person_id); + $total = $em->getRepository(Participation::class)->countByPerson($person_id); $paginator = $this->paginator->create($total); - $participations = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findByPersonInCircle( + $participations = $em->getRepository(Participation::class)->findByPersonInCircle( $person_id, $reachablesCircles, $paginator->getCurrentPage()->getFirstItemNumber(), @@ -352,7 +352,7 @@ class EventController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Event::class)->find($event_id); + $entity = $em->getRepository(Event::class)->find($event_id); if (!$entity) { throw $this->createNotFoundException('Unable to find Event entity.'); diff --git a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php index b96fb9cb9..3d9570abb 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventTypeController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventTypeController.php @@ -59,7 +59,7 @@ class EventTypeController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id); + $entity = $em->getRepository(EventType::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find EventType entity.'); @@ -81,7 +81,7 @@ class EventTypeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id); + $entity = $em->getRepository(EventType::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find EventType entity.'); @@ -106,7 +106,7 @@ class EventTypeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->findAll(); + $entities = $em->getRepository(EventType::class)->findAll(); return $this->render('@ChillEvent/EventType/index.html.twig', [ 'entities' => $entities, @@ -138,7 +138,7 @@ class EventTypeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id); + $entity = $em->getRepository(EventType::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find EventType entity.'); @@ -161,7 +161,7 @@ class EventTypeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\EventType::class)->find($id); + $entity = $em->getRepository(EventType::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find EventType entity.'); diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php index b80e33d2b..b0ce372ff 100644 --- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php +++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php @@ -33,7 +33,9 @@ class ParticipationController extends AbstractController /** * ParticipationController constructor. */ - public function __construct(private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/event/participation/create", name="chill_event_participation_create") @@ -239,7 +241,7 @@ class ParticipationController extends AbstractController public function deleteAction($participation_id, Request $request): Response|\Symfony\Component\HttpFoundation\RedirectResponse { $em = $this->getDoctrine()->getManager(); - $participation = $em->getRepository(\Chill\EventBundle\Entity\Participation::class)->findOneBy([ + $participation = $em->getRepository(Participation::class)->findOneBy([ 'id' => $participation_id, ]); @@ -319,7 +321,7 @@ class ParticipationController extends AbstractController */ public function editMultipleAction($event_id): Response|\Symfony\Component\HttpFoundation\RedirectResponse { - $event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class) + $event = $this->getDoctrine()->getRepository(Event::class) ->find($event_id); if (null === $event) { @@ -455,8 +457,8 @@ class ParticipationController extends AbstractController */ public function updateMultipleAction(mixed $event_id, Request $request) { - /** @var \Chill\EventBundle\Entity\Event $event */ - $event = $this->getDoctrine()->getRepository(\Chill\EventBundle\Entity\Event::class) + /** @var Event $event */ + $event = $this->getDoctrine()->getRepository(Event::class) ->find($event_id); if (null === $event) { @@ -498,7 +500,7 @@ class ParticipationController extends AbstractController } /** - * @return \Symfony\Component\Form\FormInterface + * @return FormInterface */ protected function createEditFormMultiple(Collection $participations, Event $event) { @@ -557,7 +559,7 @@ class ParticipationController extends AbstractController // prevent error: `Argument 2 passed to ::getInt() must be of the type int, null given` if (null !== $event_id) { - $event = $em->getRepository(\Chill\EventBundle\Entity\Event::class) + $event = $em->getRepository(Event::class) ->find($event_id); if (null === $event) { @@ -751,7 +753,7 @@ class ParticipationController extends AbstractController } /** - * @return \Symfony\Component\Form\FormInterface + * @return FormInterface */ private function createDeleteForm($participation_id) { diff --git a/src/Bundle/ChillEventBundle/Controller/RoleController.php b/src/Bundle/ChillEventBundle/Controller/RoleController.php index 1b2ad2b25..8c0b63bc8 100644 --- a/src/Bundle/ChillEventBundle/Controller/RoleController.php +++ b/src/Bundle/ChillEventBundle/Controller/RoleController.php @@ -59,7 +59,7 @@ class RoleController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id); + $entity = $em->getRepository(Role::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Role entity.'); @@ -81,7 +81,7 @@ class RoleController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id); + $entity = $em->getRepository(Role::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Role entity.'); @@ -106,7 +106,7 @@ class RoleController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->findAll(); + $entities = $em->getRepository(Role::class)->findAll(); return $this->render('@ChillEvent/Role/index.html.twig', [ 'entities' => $entities, @@ -138,7 +138,7 @@ class RoleController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id); + $entity = $em->getRepository(Role::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Role entity.'); @@ -161,7 +161,7 @@ class RoleController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Role::class)->find($id); + $entity = $em->getRepository(Role::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Role entity.'); diff --git a/src/Bundle/ChillEventBundle/Controller/StatusController.php b/src/Bundle/ChillEventBundle/Controller/StatusController.php index 90bb7c1f2..c1b1018cd 100644 --- a/src/Bundle/ChillEventBundle/Controller/StatusController.php +++ b/src/Bundle/ChillEventBundle/Controller/StatusController.php @@ -59,7 +59,7 @@ class StatusController extends AbstractController if ($form->isSubmitted() && $form->isValid()) { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id); + $entity = $em->getRepository(Status::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Status entity.'); @@ -81,7 +81,7 @@ class StatusController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id); + $entity = $em->getRepository(Status::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Status entity.'); @@ -106,7 +106,7 @@ class StatusController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->findAll(); + $entities = $em->getRepository(Status::class)->findAll(); return $this->render('@ChillEvent/Status/index.html.twig', [ 'entities' => $entities, @@ -138,7 +138,7 @@ class StatusController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id); + $entity = $em->getRepository(Status::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Status entity.'); @@ -161,7 +161,7 @@ class StatusController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entity = $em->getRepository(\Chill\EventBundle\Entity\Status::class)->find($id); + $entity = $em->getRepository(Status::class)->find($id); if (!$entity) { throw $this->createNotFoundException('Unable to find Status entity.'); diff --git a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php index 71b07a123..db431c858 100644 --- a/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php +++ b/src/Bundle/ChillEventBundle/DataFixtures/ORM/LoadParticipation.php @@ -73,7 +73,7 @@ class LoadParticipation extends AbstractFixture implements OrderedFixtureInterfa ->findBy(['center' => $center]); $events = $this->createEvents($center, $manager); - /** @var \Chill\PersonBundle\Entity\Person $person */ + /** @var Person $person */ foreach ($people as $person) { $nb = random_int(0, 3); diff --git a/src/Bundle/ChillEventBundle/Form/ParticipationType.php b/src/Bundle/ChillEventBundle/Form/ParticipationType.php index af1854954..078f2ab9d 100644 --- a/src/Bundle/ChillEventBundle/Form/ParticipationType.php +++ b/src/Bundle/ChillEventBundle/Form/ParticipationType.php @@ -27,7 +27,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ final class ParticipationType extends AbstractType { - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillEventBundle/Form/RoleType.php b/src/Bundle/ChillEventBundle/Form/RoleType.php index 8b9f27be2..c8d0f5b33 100644 --- a/src/Bundle/ChillEventBundle/Form/RoleType.php +++ b/src/Bundle/ChillEventBundle/Form/RoleType.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final class RoleType extends AbstractType { - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php index 2b85a60c8..487c0c3b2 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickEventType.php @@ -43,7 +43,8 @@ final class PickEventType extends AbstractType private readonly UrlGeneratorInterface $urlGenerator, private readonly TranslatorInterface $translator, private readonly Security $security - ) {} + ) { + } public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options) { diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php index c8d69c119..8d66963e0 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickRoleType.php @@ -32,7 +32,8 @@ final class PickRoleType extends AbstractType private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator, private readonly RoleRepository $roleRepository - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php index 3f4ab3624..be016d6ca 100644 --- a/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php +++ b/src/Bundle/ChillEventBundle/Form/Type/PickStatusType.php @@ -33,7 +33,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ final class PickStatusType extends AbstractType { - public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository) {} + public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper, protected TranslatorInterface $translator, protected StatusRepository $statusRepository) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillEventBundle/Search/EventSearch.php b/src/Bundle/ChillEventBundle/Search/EventSearch.php index 57cb9e9c5..7b77942cd 100644 --- a/src/Bundle/ChillEventBundle/Search/EventSearch.php +++ b/src/Bundle/ChillEventBundle/Search/EventSearch.php @@ -43,7 +43,8 @@ class EventSearch extends AbstractSearch private readonly AuthorizationHelper $authorizationHelper, private readonly \Twig\Environment $templating, private readonly PaginatorFactory $paginatorFactory - ) {} + ) { + } public function getOrder() { diff --git a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php index c37566fe7..90c38743b 100644 --- a/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Search/EventSearchTest.php @@ -52,7 +52,7 @@ final class EventSearchTest extends WebTestCase /** * The eventSearch service, which is used to search events. * - * @var \Chill\EventBundle\Search\EventSearch + * @var EventSearch */ protected $eventSearch; diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php index cfbe52218..f3982d0d5 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php @@ -141,7 +141,9 @@ abstract class AbstractCRUDController extends AbstractController return new $class(); } - protected function customizeQuery(string $action, Request $request, $query): void {} + protected function customizeQuery(string $action, Request $request, $query): void + { + } protected function getActionConfig(string $action) { diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index 39cef87b7..78e559ad8 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -224,9 +224,13 @@ class CRUDController extends AbstractController /** * Customize the form created by createFormFor. */ - protected function customizeForm(string $action, FormInterface $form) {} + protected function customizeForm(string $action, FormInterface $form) + { + } - protected function customizeQuery(string $action, Request $request, $query): void {} + protected function customizeQuery(string $action, Request $request, $query): void + { + } /** * @param null $formClass @@ -840,7 +844,9 @@ class CRUDController extends AbstractController }; } - protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) {} + protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) + { + } protected function onPostCheckACL($action, Request $request, $entity): ?Response { @@ -852,36 +858,58 @@ class CRUDController extends AbstractController return null; } - protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) + { + } /** * method used by indexAction. */ - protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $query) {} + protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $query) + { + } /** * method used by indexAction. */ - protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $entities) {} + protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, mixed $entities) + { + } - protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) + { + } - protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) + { + } - protected function onPreDelete(string $action, Request $request) {} + protected function onPreDelete(string $action, Request $request) + { + } - protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) + { + } - protected function onPreIndex(string $action, Request $request) {} + protected function onPreIndex(string $action, Request $request) + { + } /** * method used by indexAction. */ - protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) {} + protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) + { + } - protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) + { + } - protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) {} + protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) + { + } /** * Add ordering fields in the query build by self::queryEntities. diff --git a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php index 95f81ae05..3ff3cf134 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php +++ b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php @@ -16,4 +16,6 @@ use Symfony\Component\Form\AbstractType; /** * Class CRUDDeleteEntityForm. */ -class CRUDDeleteEntityForm extends AbstractType {} +class CRUDDeleteEntityForm extends AbstractType +{ +} diff --git a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php index e5833e580..860f8c82e 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadAndUpdateLanguagesCommand.php @@ -83,7 +83,7 @@ class LoadAndUpdateLanguagesCommand extends Command $languages = []; foreach ($chillAvailableLanguages as $avLang) { - $languages[$avLang] = \Symfony\Component\Intl\Languages::getNames(); + $languages[$avLang] = Languages::getNames(); } foreach (Languages::getNames() as $code => $lang) { @@ -105,7 +105,7 @@ class LoadAndUpdateLanguagesCommand extends Command $languageDB = $em->getRepository(Language::class)->find($code); if (null === $languageDB) { - $languageDB = new \Chill\MainBundle\Entity\Language(); + $languageDB = new Language(); $languageDB->setId($code); $em->persist($languageDB); } diff --git a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php index 92106d200..b6a9be75c 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadCountriesCommand.php @@ -40,7 +40,7 @@ class LoadCountriesCommand extends Command $names[$language] = Countries::getName($code, $language); } - $country = new \Chill\MainBundle\Entity\Country(); + $country = new Country(); $country->setName($names)->setCountryCode($code); $countryEntities[] = $country; } diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php index b22027499..fe11f8b9f 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php @@ -194,8 +194,14 @@ class LoadPostalCodesCommand extends Command } } -class ExistingPostalCodeException extends \Exception {} +class ExistingPostalCodeException extends \Exception +{ +} -class CountryCodeNotFoundException extends \Exception {} +class CountryCodeNotFoundException extends \Exception +{ +} -class PostalCodeNotValidException extends \Exception {} +class PostalCodeNotValidException extends \Exception +{ +} diff --git a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php index c38272d06..a83663ed0 100644 --- a/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php +++ b/src/Bundle/ChillMainBundle/Command/SetPasswordCommand.php @@ -36,7 +36,7 @@ class SetPasswordCommand extends Command public function _getUser($username) { return $this->entityManager - ->getRepository(\Chill\MainBundle\Entity\User::class) + ->getRepository(User::class) ->findOneBy(['username' => $username]); } diff --git a/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php b/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php index b3cf68849..edc58bed5 100644 --- a/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/AddressReferenceAPIController.php @@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; final class AddressReferenceAPIController extends ApiController { - public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) {} + public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) + { + } /** * @Route("/api/1.0/main/address-reference/by-postal-code/{id}/search.json") diff --git a/src/Bundle/ChillMainBundle/Controller/AddressToReferenceMatcherController.php b/src/Bundle/ChillMainBundle/Controller/AddressToReferenceMatcherController.php index 967ee7b5b..079f4783b 100644 --- a/src/Bundle/ChillMainBundle/Controller/AddressToReferenceMatcherController.php +++ b/src/Bundle/ChillMainBundle/Controller/AddressToReferenceMatcherController.php @@ -23,7 +23,9 @@ use Symfony\Component\Serializer\SerializerInterface; class AddressToReferenceMatcherController { - public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {} + public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) + { + } /** * @Route("/api/1.0/main/address/reference-match/{id}/set/reviewed", methods={"POST"}) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index d318fcc58..963e03322 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -70,7 +70,7 @@ class ExportController extends AbstractController */ public function downloadResultAction(Request $request, mixed $alias) { - /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ + /** @var ExportManager $exportManager */ $exportManager = $this->exportManager; $export = $exportManager->getExport($alias); $key = $request->query->get('key', null); @@ -108,13 +108,13 @@ class ExportController extends AbstractController * * @param string $alias * - * @return \Symfony\Component\HttpFoundation\Response + * @return Response * * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/generate/{alias}", name="chill_main_export_generate", methods={"GET"}) */ public function generateAction(Request $request, $alias) { - /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ + /** @var ExportManager $exportManager */ $exportManager = $this->exportManager; $key = $request->query->get('key', null); $savedExport = $this->getSavedExportFromRequest($request); @@ -274,7 +274,7 @@ class ExportController extends AbstractController */ protected function createCreateFormExport(string $alias, string $step, array $data, ?SavedExport $savedExport): FormInterface { - /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ + /** @var ExportManager $exportManager */ $exportManager = $this->exportManager; $isGenerate = str_starts_with($step, 'generate_'); @@ -444,7 +444,7 @@ class ExportController extends AbstractController * * @param string $alias * - * @return \Symfony\Component\HttpFoundation\RedirectResponse + * @return RedirectResponse */ private function forwardToGenerate(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport) { @@ -452,7 +452,7 @@ class ExportController extends AbstractController $dataFormatter = $this->session->get('formatter_step_raw', null); $dataExport = $this->session->get('export_step_raw', null); - if (null === $dataFormatter && $export instanceof \Chill\MainBundle\Export\ExportInterface) { + if (null === $dataFormatter && $export instanceof ExportInterface) { return $this->redirectToRoute('chill_main_export_new', [ 'alias' => $alias, 'step' => $this->getNextStep('generate', $export, true), @@ -531,7 +531,7 @@ class ExportController extends AbstractController ]); } - /** @var \Chill\MainBundle\Export\ExportManager $exportManager */ + /** @var ExportManager $exportManager */ $exportManager = $this->exportManager; $form = $this->createCreateFormExport($alias, 'centers', [], $savedExport); @@ -620,11 +620,11 @@ class ExportController extends AbstractController return 'export'; case 'export': - if ($export instanceof \Chill\MainBundle\Export\ExportInterface) { + if ($export instanceof ExportInterface) { return $reverse ? 'centers' : 'formatter'; } - if ($export instanceof \Chill\MainBundle\Export\DirectExportInterface) { + if ($export instanceof DirectExportInterface) { return $reverse ? 'centers' : 'generate'; } diff --git a/src/Bundle/ChillMainBundle/Controller/GeographicalUnitByAddressApiController.php b/src/Bundle/ChillMainBundle/Controller/GeographicalUnitByAddressApiController.php index 24253de36..a8a9c0610 100644 --- a/src/Bundle/ChillMainBundle/Controller/GeographicalUnitByAddressApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/GeographicalUnitByAddressApiController.php @@ -24,7 +24,9 @@ use Symfony\Component\Serializer\SerializerInterface; class GeographicalUnitByAddressApiController { - public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) {} + public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) + { + } /** * @Route("/api/1.0/main/geographical-unit/by-address/{id}.{_format}", requirements={"_format": "json"}) diff --git a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php index 418f49578..bc28f9d12 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php @@ -13,4 +13,6 @@ namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; -class LocationTypeController extends CRUDController {} +class LocationTypeController extends CRUDController +{ +} diff --git a/src/Bundle/ChillMainBundle/Controller/LoginController.php b/src/Bundle/ChillMainBundle/Controller/LoginController.php index df295d0b2..e04f478a8 100644 --- a/src/Bundle/ChillMainBundle/Controller/LoginController.php +++ b/src/Bundle/ChillMainBundle/Controller/LoginController.php @@ -46,5 +46,7 @@ class LoginController extends AbstractController ]); } - public function LoginCheckAction(Request $request) {} + public function LoginCheckAction(Request $request) + { + } } diff --git a/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php b/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php index 16599b9a2..42f0e5469 100644 --- a/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/NotificationApiController.php @@ -31,7 +31,9 @@ use Symfony\Component\Serializer\SerializerInterface; */ class NotificationApiController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {} + public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) + { + } /** * @Route("/{id}/mark/read", name="chill_api_main_notification_mark_read", methods={"POST"}) diff --git a/src/Bundle/ChillMainBundle/Controller/NotificationController.php b/src/Bundle/ChillMainBundle/Controller/NotificationController.php index 4131ba714..4d962248c 100644 --- a/src/Bundle/ChillMainBundle/Controller/NotificationController.php +++ b/src/Bundle/ChillMainBundle/Controller/NotificationController.php @@ -41,7 +41,9 @@ use function in_array; */ class NotificationController extends AbstractController { - public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository) + { + } /** * @Route("/create", name="chill_main_notification_create") diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php b/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php index 8b0561635..97b255a85 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionApiController.php @@ -21,7 +21,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class PermissionApiController extends AbstractController { - public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security) {} + public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security) + { + } /** * @Route("/api/1.0/main/permissions/info.json", methods={"POST"}) diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php index 681046ca1..b5fdeca7e 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php @@ -47,7 +47,8 @@ final class PermissionsGroupController extends AbstractController private readonly EntityManagerInterface $em, private readonly PermissionsGroupRepository $permissionsGroupRepository, private readonly RoleScopeRepository $roleScopeRepository, - ) {} + ) { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope", name="admin_permissionsgroup_add_role_scope", methods={"PUT"}) diff --git a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php index 2b897130d..e51f74e40 100644 --- a/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php +++ b/src/Bundle/ChillMainBundle/Controller/PostalCodeAPIController.php @@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; final class PostalCodeAPIController extends ApiController { - public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) {} + public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) + { + } /** * @Route("/api/1.0/main/postal-code/search.json") diff --git a/src/Bundle/ChillMainBundle/Controller/SavedExportController.php b/src/Bundle/ChillMainBundle/Controller/SavedExportController.php index 15bfcb9bb..0269ff0f5 100644 --- a/src/Bundle/ChillMainBundle/Controller/SavedExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/SavedExportController.php @@ -34,7 +34,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class SavedExportController { - public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) {} + public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) + { + } /** * @Route("/{_locale}/exports/saved/{id}/delete", name="chill_main_export_saved_delete") diff --git a/src/Bundle/ChillMainBundle/Controller/ScopeController.php b/src/Bundle/ChillMainBundle/Controller/ScopeController.php index 727796256..3ccf13c07 100644 --- a/src/Bundle/ChillMainBundle/Controller/ScopeController.php +++ b/src/Bundle/ChillMainBundle/Controller/ScopeController.php @@ -56,7 +56,7 @@ class ScopeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id); + $scope = $em->getRepository(Scope::class)->find($id); if (!$scope) { throw $this->createNotFoundException('Unable to find Scope entity.'); @@ -79,7 +79,7 @@ class ScopeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $entities = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->findAll(); + $entities = $em->getRepository(Scope::class)->findAll(); return $this->render('@ChillMain/Scope/index.html.twig', [ 'entities' => $entities, @@ -109,7 +109,7 @@ class ScopeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id); + $scope = $em->getRepository(Scope::class)->find($id); if (!$scope) { throw $this->createNotFoundException('Unable to find Scope entity.'); @@ -129,7 +129,7 @@ class ScopeController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id); + $scope = $em->getRepository(Scope::class)->find($id); if (!$scope) { throw $this->createNotFoundException('Unable to find Scope entity.'); diff --git a/src/Bundle/ChillMainBundle/Controller/SearchController.php b/src/Bundle/ChillMainBundle/Controller/SearchController.php index 6324561cc..b5d359a53 100644 --- a/src/Bundle/ChillMainBundle/Controller/SearchController.php +++ b/src/Bundle/ChillMainBundle/Controller/SearchController.php @@ -32,7 +32,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class SearchController extends AbstractController { - public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {} + public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search") @@ -45,7 +47,7 @@ class SearchController extends AbstractController /** @var Chill\MainBundle\Search\HasAdvancedSearchFormInterface $variable */ $search = $this->searchProvider ->getHasAdvancedFormByName($name); - } catch (\Chill\MainBundle\Search\UnknowSearchNameException) { + } catch (UnknowSearchNameException) { throw $this->createNotFoundException('no advanced search for '."{$name}"); } diff --git a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php index ebbd7a360..7999cb697 100644 --- a/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php +++ b/src/Bundle/ChillMainBundle/Controller/TimelineCenterController.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; class TimelineCenterController extends AbstractController { - public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {} + public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) + { + } /** * @Route("/{_locale}/center/timeline", diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php index 1a25c4ad4..69e9a5d80 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserController.php @@ -38,7 +38,9 @@ class UserController extends CRUDController { final public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter'; - public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag, private readonly TranslatorInterface $translator) + { + } /** * @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter", @@ -48,7 +50,7 @@ class UserController extends CRUDController { $em = $this->getDoctrine()->getManager(); - $user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid); + $user = $em->getRepository(User::class)->find($uid); if (!$user) { throw $this->createNotFoundException('Unable to find User entity.'); @@ -100,13 +102,13 @@ class UserController extends CRUDController { $em = $this->getDoctrine()->getManager(); - $user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid); + $user = $em->getRepository(User::class)->find($uid); if (!$user) { throw $this->createNotFoundException('Unable to find User entity.'); } - $groupCenter = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class) + $groupCenter = $em->getRepository(GroupCenter::class) ->find($gcid); if (!$groupCenter) { @@ -424,7 +426,7 @@ class UserController extends CRUDController { $em = $this->getDoctrine()->getManager(); - $groupCenterManaged = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class) + $groupCenterManaged = $em->getRepository(GroupCenter::class) ->findOneBy([ 'center' => $groupCenter->getCenter(), 'permissionsGroup' => $groupCenter->getPermissionsGroup(), diff --git a/src/Bundle/ChillMainBundle/Controller/UserExportController.php b/src/Bundle/ChillMainBundle/Controller/UserExportController.php index 7f14b5e64..41c2d1a85 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserExportController.php @@ -27,7 +27,8 @@ final readonly class UserExportController private UserRepositoryInterface $userRepository, private Security $security, private TranslatorInterface $translator, - ) {} + ) { + } /** * @throws \League\Csv\CannotInsertRecord diff --git a/src/Bundle/ChillMainBundle/Controller/UserJobScopeHistoriesController.php b/src/Bundle/ChillMainBundle/Controller/UserJobScopeHistoriesController.php index 55d7aceb7..144c27688 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserJobScopeHistoriesController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserJobScopeHistoriesController.php @@ -21,7 +21,8 @@ class UserJobScopeHistoriesController extends AbstractController { public function __construct( private readonly Environment $engine, - ) {} + ) { + } /** * @Route("/{_locale}/admin/main/user/{id}/job-scope-history", name="admin_user_job_scope_history") diff --git a/src/Bundle/ChillMainBundle/Controller/UserProfileController.php b/src/Bundle/ChillMainBundle/Controller/UserProfileController.php index 52aba1a48..3b83069bb 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserProfileController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserProfileController.php @@ -24,7 +24,8 @@ class UserProfileController extends AbstractController { public function __construct( private readonly TranslatorInterface $translator, - ) {} + ) { + } /** * User profile that allows editing of phonenumber and visualization of certain data. diff --git a/src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php b/src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php index 4c4d8218c..dd7d642c9 100644 --- a/src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/WorkflowApiController.php @@ -29,7 +29,9 @@ use Symfony\Component\Serializer\SerializerInterface; class WorkflowApiController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {} + public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) + { + } /** * Return a list of workflow which are waiting an action for the user. diff --git a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php index b641ed46a..a88248c1a 100644 --- a/src/Bundle/ChillMainBundle/Controller/WorkflowController.php +++ b/src/Bundle/ChillMainBundle/Controller/WorkflowController.php @@ -38,7 +38,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class WorkflowController extends AbstractController { - public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security) {} + public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security) + { + } /** * @Route("/{_locale}/main/workflow/create", name="chill_main_workflow_create") diff --git a/src/Bundle/ChillMainBundle/Cron/CronManager.php b/src/Bundle/ChillMainBundle/Cron/CronManager.php index 3db7d5dc3..147d035cd 100644 --- a/src/Bundle/ChillMainBundle/Cron/CronManager.php +++ b/src/Bundle/ChillMainBundle/Cron/CronManager.php @@ -55,7 +55,8 @@ final readonly class CronManager implements CronManagerInterface private EntityManagerInterface $entityManager, private iterable $jobs, private LoggerInterface $logger - ) {} + ) { + } public function run(string $forceJob = null): void { diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 2590b549b..5c33ef1b3 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -570,7 +570,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\UserJob::class, + 'class' => UserJob::class, 'name' => 'user_job', 'base_path' => '/api/1.0/main/user-job', 'base_role' => 'ROLE_USER', @@ -634,7 +634,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\Country::class, + 'class' => Country::class, 'name' => 'country', 'base_path' => '/api/1.0/main/country', 'base_role' => 'ROLE_USER', @@ -654,7 +654,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\User::class, + 'class' => User::class, 'controller' => \Chill\MainBundle\Controller\UserApiController::class, 'name' => 'user', 'base_path' => '/api/1.0/main/user', @@ -696,7 +696,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\Location::class, + 'class' => Location::class, 'controller' => \Chill\MainBundle\Controller\LocationApiController::class, 'name' => 'location', 'base_path' => '/api/1.0/main/location', @@ -718,7 +718,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\LocationType::class, + 'class' => LocationType::class, 'controller' => \Chill\MainBundle\Controller\LocationTypeApiController::class, 'name' => 'location_type', 'base_path' => '/api/1.0/main/location-type', @@ -739,7 +739,7 @@ class ChillMainExtension extends Extension implements ], ], [ - 'class' => \Chill\MainBundle\Entity\Civility::class, + 'class' => Civility::class, 'name' => 'civility', 'base_path' => '/api/1.0/main/civility', 'base_role' => 'ROLE_USER', diff --git a/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php b/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php index e6ac2308a..907997258 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Event/TrackCreateUpdateSubscriber.php @@ -21,7 +21,9 @@ use Symfony\Component\Security\Core\Security; class TrackCreateUpdateSubscriber implements EventSubscriber { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } public function getSubscribedEvents() { diff --git a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php index de6af9625..beed15f31 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php +++ b/src/Bundle/ChillMainBundle/Doctrine/Model/Point.php @@ -15,7 +15,9 @@ class Point implements \JsonSerializable { public static string $SRID = '4326'; - private function __construct(private readonly ?float $lon, private readonly ?float $lat) {} + private function __construct(private readonly ?float $lon, private readonly ?float $lat) + { + } public static function fromArrayGeoJson(array $array): self { diff --git a/src/Bundle/ChillMainBundle/Entity/GeographicalUnit/SimpleGeographicalUnitDTO.php b/src/Bundle/ChillMainBundle/Entity/GeographicalUnit/SimpleGeographicalUnitDTO.php index 79e28e6f3..a36e798a4 100644 --- a/src/Bundle/ChillMainBundle/Entity/GeographicalUnit/SimpleGeographicalUnitDTO.php +++ b/src/Bundle/ChillMainBundle/Entity/GeographicalUnit/SimpleGeographicalUnitDTO.php @@ -53,5 +53,6 @@ class SimpleGeographicalUnitDTO * @Serializer\Groups({"read"}) */ public int $layerId - ) {} + ) { + } } diff --git a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php index 501e28a9a..4a28267cd 100644 --- a/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php +++ b/src/Bundle/ChillMainBundle/Entity/PermissionsGroup.php @@ -73,8 +73,8 @@ class PermissionsGroup */ public function __construct() { - $this->roleScopes = new \Doctrine\Common\Collections\ArrayCollection(); - $this->groupCenters = new \Doctrine\Common\Collections\ArrayCollection(); + $this->roleScopes = new ArrayCollection(); + $this->groupCenters = new ArrayCollection(); } public function addRoleScope(RoleScope $roleScope) diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 23dfe6926..423d0f3ba 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -188,7 +188,7 @@ class User implements UserInterface, \Stringable } /** - * @return \Chill\MainBundle\Entity\User + * @return User */ public function addGroupCenter(GroupCenter $groupCenter) { @@ -197,7 +197,9 @@ class User implements UserInterface, \Stringable return $this; } - public function eraseCredentials() {} + public function eraseCredentials() + { + } public function getAbsenceStart(): ?\DateTimeImmutable { diff --git a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php index 4746b6129..c448077e3 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php +++ b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php @@ -26,7 +26,8 @@ final readonly class ExportFormHelper private AuthorizationHelperForCurrentUserInterface $authorizationHelper, private ExportManager $exportManager, private FormFactoryInterface $formFactory, - ) {} + ) { + } public function getDefaultData(string $step, DirectExportInterface|ExportInterface $export, array $options = []): array { diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php index 97a37d455..853c177b7 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVListFormatter.php @@ -100,7 +100,7 @@ class CSVListFormatter implements FormatterInterface * @param array $filtersData an array containing the filters data. The key are the filters id, and the value are the data * @param array $aggregatorsData an array containing the aggregators data. The key are the filters id, and the value are the data * - * @return \Symfony\Component\HttpFoundation\Response The response to be shown + * @return Response The response to be shown */ public function getResponse( $result, diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php index 02b7409bc..8b32714cc 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/CSVPivotedListFormatter.php @@ -99,7 +99,7 @@ class CSVPivotedListFormatter implements FormatterInterface * @param array $filtersData an array containing the filters data. The key are the filters id, and the value are the data * @param array $aggregatorsData an array containing the aggregators data. The key are the filters id, and the value are the data * - * @return \Symfony\Component\HttpFoundation\Response The response to be shown + * @return Response The response to be shown */ public function getResponse( $result, diff --git a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php index e91095afd..7284ff70a 100644 --- a/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php +++ b/src/Bundle/ChillMainBundle/Export/Formatter/SpreadsheetListFormatter.php @@ -112,7 +112,7 @@ class SpreadsheetListFormatter implements FormatterInterface * @param array $filtersData an array containing the filters data. The key are the filters id, and the value are the data * @param array $aggregatorsData an array containing the aggregators data. The key are the filters id, and the value are the data * - * @return \Symfony\Component\HttpFoundation\Response The response to be shown + * @return Response The response to be shown */ public function getResponse( $result, diff --git a/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php index 0fad30b4f..3be1af08a 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/DateTimeHelper.php @@ -15,7 +15,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class DateTimeHelper { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function getLabel($header): callable { diff --git a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php index 9161316e7..07a4f9f88 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/ExportAddressHelper.php @@ -79,7 +79,9 @@ class ExportAddressHelper */ private ?array $unitRefsKeysCache = []; - public function __construct(private readonly AddressRender $addressRender, private readonly AddressRepository $addressRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly AddressRender $addressRender, private readonly AddressRepository $addressRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function addSelectClauses(int $params, QueryBuilder $queryBuilder, $entityName = 'address', $prefix = 'add') { diff --git a/src/Bundle/ChillMainBundle/Export/Helper/TranslatableStringExportLabelHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/TranslatableStringExportLabelHelper.php index 1b561390a..fc19f7466 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/TranslatableStringExportLabelHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/TranslatableStringExportLabelHelper.php @@ -21,7 +21,9 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface; */ class TranslatableStringExportLabelHelper { - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function getLabel(string $key, array $values, string $header) { diff --git a/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php index 39fb83c57..693bb0376 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php @@ -16,7 +16,9 @@ use Chill\MainBundle\Templating\Entity\UserRender; class UserHelper { - public function __construct(private readonly UserRender $userRender, private readonly UserRepositoryInterface $userRepository) {} + public function __construct(private readonly UserRender $userRender, private readonly UserRepositoryInterface $userRepository) + { + } /** * Return a callable that will transform a value into a string representing a user. diff --git a/src/Bundle/ChillMainBundle/Export/ListInterface.php b/src/Bundle/ChillMainBundle/Export/ListInterface.php index 9b88525ca..53442f0e7 100644 --- a/src/Bundle/ChillMainBundle/Export/ListInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ListInterface.php @@ -20,4 +20,6 @@ namespace Chill\MainBundle\Export; * * When used, the `ExportManager` will not handle aggregator for this class. */ -interface ListInterface extends ExportInterface {} +interface ListInterface extends ExportInterface +{ +} diff --git a/src/Bundle/ChillMainBundle/Export/SortExportElement.php b/src/Bundle/ChillMainBundle/Export/SortExportElement.php index 6228109ed..0536f6569 100644 --- a/src/Bundle/ChillMainBundle/Export/SortExportElement.php +++ b/src/Bundle/ChillMainBundle/Export/SortExportElement.php @@ -17,7 +17,8 @@ final readonly class SortExportElement { public function __construct( private TranslatorInterface $translator, - ) {} + ) { + } /** * @param array $elements diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php index 68fad0a99..10f9c26e3 100644 --- a/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php +++ b/src/Bundle/ChillMainBundle/Form/DataMapper/PrivateCommentDataMapper.php @@ -19,7 +19,9 @@ use Symfony\Component\Security\Core\Security; final class PrivateCommentDataMapper extends AbstractType implements DataMapperInterface { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } public function mapDataToForms($viewData, $forms) { diff --git a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php index cf96292af..267927ff1 100644 --- a/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php +++ b/src/Bundle/ChillMainBundle/Form/DataMapper/ScopePickerDataMapper.php @@ -16,7 +16,9 @@ use Symfony\Component\Form\DataMapperInterface; class ScopePickerDataMapper implements DataMapperInterface { - public function __construct(private readonly ?Scope $scope = null) {} + public function __construct(private readonly ?Scope $scope = null) + { + } public function mapDataToForms($data, $forms) { diff --git a/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php b/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php index 42606ebd7..aba5e2bc4 100644 --- a/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php +++ b/src/Bundle/ChillMainBundle/Form/Event/CustomizeFormEvent.php @@ -17,7 +17,9 @@ class CustomizeFormEvent extends \Symfony\Contracts\EventDispatcher\Event { final public const NAME = 'chill_main.customize_form'; - public function __construct(protected string $type, protected FormBuilderInterface $builder) {} + public function __construct(protected string $type, protected FormBuilderInterface $builder) + { + } public function getBuilder(): FormBuilderInterface { diff --git a/src/Bundle/ChillMainBundle/Form/LocationFormType.php b/src/Bundle/ChillMainBundle/Form/LocationFormType.php index 7f61cccce..e4748d850 100644 --- a/src/Bundle/ChillMainBundle/Form/LocationFormType.php +++ b/src/Bundle/ChillMainBundle/Form/LocationFormType.php @@ -24,7 +24,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class LocationFormType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php index fcc4b4ec5..469b9c18e 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php +++ b/src/Bundle/ChillMainBundle/Form/Type/AppendScopeChoiceTypeTrait.php @@ -83,7 +83,7 @@ trait AppendScopeChoiceTypeTrait { $resolver ->setRequired(['center', 'role']) - ->setAllowedTypes('center', \Chill\MainBundle\Entity\Center::class) + ->setAllowedTypes('center', Center::class) ->setAllowedTypes('role', 'string'); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php index 48bd37dcc..1f6e08571 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php @@ -23,10 +23,10 @@ class ComposedGroupCenterType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('permissionsgroup', EntityType::class, [ - 'class' => \Chill\MainBundle\Entity\PermissionsGroup::class, + 'class' => PermissionsGroup::class, 'choice_label' => static fn (PermissionsGroup $group) => $group->getName(), ])->add('center', EntityType::class, [ - 'class' => \Chill\MainBundle\Entity\Center::class, + 'class' => Center::class, 'choice_label' => static fn (Center $center) => $center->getName(), ]); } diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php index 04094537b..c04a4b158 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/AddressToIdDataTransformer.php @@ -17,7 +17,9 @@ use Symfony\Component\Form\Exception\TransformationFailedException; final readonly class AddressToIdDataTransformer implements DataTransformerInterface { - public function __construct(private AddressRepository $addressRepository) {} + public function __construct(private AddressRepository $addressRepository) + { + } public function reverseTransform($value) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php index d328d38f0..9a8b0a6d7 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/CenterTransformer.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\Exception\UnexpectedTypeException; class CenterTransformer implements DataTransformerInterface { - public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false) {} + public function __construct(private readonly CenterRepository $centerRepository, private readonly bool $multiple = false) + { + } public function reverseTransform($id) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php index d193ea2ef..bd54b0c09 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/EntityToJsonTransformer.php @@ -22,7 +22,9 @@ use Symfony\Component\Serializer\SerializerInterface; class EntityToJsonTransformer implements DataTransformerInterface { - public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type) {} + public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly bool $multiple, private readonly string $type) + { + } public function reverseTransform($value) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php index 808093278..436b72ce3 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/MultipleObjectsToIdTransformer.php @@ -17,7 +17,9 @@ use Symfony\Component\Form\DataTransformerInterface; class MultipleObjectsToIdTransformer implements DataTransformerInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) + { + } /** * Transforms a string (id) to an object (item). diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php index e56778bf2..ffdee60bd 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ObjectToIdTransformer.php @@ -17,7 +17,9 @@ use Symfony\Component\Form\Exception\TransformationFailedException; class ObjectToIdTransformer implements DataTransformerInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly ?string $class = null) + { + } /** * Transforms a string (id) to an object. diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php index dde8b7b9e..5f9117577 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/PostalCodeToIdTransformer.php @@ -18,7 +18,9 @@ use Symfony\Component\Form\Exception\TransformationFailedException; class PostalCodeToIdTransformer implements DataTransformerInterface { - public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository) {} + public function __construct(private readonly PostalCodeRepositoryInterface $postalCodeRepository) + { + } public function reverseTransform($value) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php index 2779f2cdd..cb5adec47 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/Type/DataTransformer/ScopeTransformer.php @@ -18,7 +18,9 @@ use Symfony\Component\Form\Exception\TransformationFailedException; class ScopeTransformer implements DataTransformerInterface { - public function __construct(private readonly EntityManagerInterface $em) {} + public function __construct(private readonly EntityManagerInterface $em) + { + } public function reverseTransform($id) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php index cfcf4a471..1ea01d5f8 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php @@ -19,7 +19,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class AggregatorType extends AbstractType { - public function __construct() {} + public function __construct() + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php index e5d0887f3..930712084 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/ExportType.php @@ -29,7 +29,9 @@ class ExportType extends AbstractType final public const PICK_FORMATTER_KEY = 'pick_formatter'; - public function __construct(private readonly ExportManager $exportManager, private readonly SortExportElement $sortExportElement) {} + public function __construct(private readonly ExportManager $exportManager, private readonly SortExportElement $sortExportElement) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php index bcf842e73..8491d8f6a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php @@ -22,7 +22,9 @@ class FilterType extends AbstractType { final public const ENABLED_FIELD = 'enabled'; - public function __construct() {} + public function __construct() + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php index a093dda44..01e3ba60a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/PickCenterType.php @@ -33,7 +33,8 @@ final class PickCenterType extends AbstractType private readonly ExportManager $exportManager, private readonly RegroupmentRepository $regroupmentRepository, private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php index 190e09f30..8750ee006 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickAddressType.php @@ -41,7 +41,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ final class PickAddressType extends AbstractType { - public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly AddressToIdDataTransformer $addressToIdDataTransformer, private readonly TranslatorInterface $translator) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php index ba6cc874d..12b170a73 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php @@ -34,7 +34,9 @@ use function count; */ class PickCenterType extends AbstractType { - public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository) {} + public function __construct(protected AuthorizationHelperInterface $authorizationHelper, protected Security $security, protected CenterRepository $centerRepository) + { + } /** * add a data transformer if user can reach only one center. diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php index f9aa09ce8..abe190de5 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickCivilityType.php @@ -21,7 +21,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickCivilityType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php b/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php index 8aa216da1..7fb50fd4a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickLocationTypeType.php @@ -19,7 +19,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickLocationTypeType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php index 1a1ed4354..041176905 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickPostalCodeType.php @@ -21,7 +21,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickPostalCodeType extends AbstractType { - public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer) {} + public function __construct(private readonly PostalCodeToIdTransformer $postalCodeToIdTransformer) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php index 9a4fbdd75..a12042dab 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php @@ -27,7 +27,9 @@ use Symfony\Component\Serializer\SerializerInterface; */ class PickUserDynamicType extends AbstractType { - public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php index 9d1cdb626..bea96b79b 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserLocationType.php @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickUserLocationType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly LocationRepository $locationRepository) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php index 0d26b5a95..44354922f 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PrivateCommentType.php @@ -21,7 +21,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PrivateCommentType extends AbstractType { - public function __construct(protected PrivateCommentDataMapper $dataMapper) {} + public function __construct(protected PrivateCommentDataMapper $dataMapper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php index 68ae84549..fd27a9bcb 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ScopePickerType.php @@ -39,7 +39,9 @@ use Symfony\Component\Security\Core\Security; */ class ScopePickerType extends AbstractType { - public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php index 39648c11a..370de1137 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2CountryType.php @@ -26,7 +26,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class Select2CountryType extends AbstractType { - public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {} + public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { @@ -56,7 +58,7 @@ class Select2CountryType extends AbstractType asort($choices, \SORT_STRING | \SORT_FLAG_CASE); $resolver->setDefaults([ - 'class' => \Chill\MainBundle\Entity\Country::class, + 'class' => Country::class, 'choices' => array_combine(array_values($choices), array_keys($choices)), 'preferred_choices' => array_combine(array_values($preferredChoices), array_keys($preferredChoices)), ]); diff --git a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php index bc25ac638..9d634857a 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Select2LanguageType.php @@ -26,7 +26,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class Select2LanguageType extends AbstractType { - public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {} + public function __construct(private readonly RequestStack $requestStack, private readonly ObjectManager $em, protected TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { @@ -52,7 +54,7 @@ class Select2LanguageType extends AbstractType asort($choices, \SORT_STRING | \SORT_FLAG_CASE); $resolver->setDefaults([ - 'class' => \Chill\MainBundle\Entity\Language::class, + 'class' => Language::class, 'choices' => array_combine(array_values($choices), array_keys($choices)), 'preferred_choices' => array_combine(array_values($preferredChoices), array_keys($preferredChoices)), ]); diff --git a/src/Bundle/ChillMainBundle/Form/UserType.php b/src/Bundle/ChillMainBundle/Form/UserType.php index 9d62fbc6a..4a6bb8f9a 100644 --- a/src/Bundle/ChillMainBundle/Form/UserType.php +++ b/src/Bundle/ChillMainBundle/Form/UserType.php @@ -36,7 +36,9 @@ use Symfony\Component\Validator\Constraints\Regex; class UserType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, protected ParameterBagInterface $parameterBag) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php index 208af8522..f0360d4bb 100644 --- a/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php +++ b/src/Bundle/ChillMainBundle/Form/WorkflowStepType.php @@ -34,11 +34,13 @@ use Symfony\Component\Workflow\Transition; class WorkflowStepType extends AbstractType { - public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { - /** @var \Chill\MainBundle\Entity\Workflow\EntityWorkflow $entityWorkflow */ + /** @var EntityWorkflow $entityWorkflow */ $entityWorkflow = $options['entity_workflow']; $handler = $this->entityWorkflowManager->getHandler($entityWorkflow); $workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName()); diff --git a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php index 1b4c2d7df..81a8bb3bb 100644 --- a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php +++ b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php @@ -23,7 +23,9 @@ use Symfony\Component\Security\Core\User\UserInterface; final readonly class NotificationByUserCounter implements NotificationCounterInterface { - public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository) {} + public function __construct(private CacheItemPoolInterface $cacheItemPool, private NotificationRepository $notificationRepository) + { + } public function addNotification(UserInterface $u): int { diff --git a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php index 7b535f1a7..7eba06242 100644 --- a/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Email/NotificationMailer.php @@ -24,7 +24,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class NotificationMailer { - public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) + { + } public function postPersistComment(NotificationComment $comment, PostPersistEventArgs $eventArgs): void { diff --git a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php index 74c784b4b..fc2cd35ea 100644 --- a/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Notification/EventListener/PersistNotificationOnTerminateEventSubscriber.php @@ -18,7 +18,9 @@ use Symfony\Component\HttpKernel\Event\TerminateEvent; class PersistNotificationOnTerminateEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly NotificationPersisterInterface $persister) + { + } public static function getSubscribedEvents() { diff --git a/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php b/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php index b1acff57b..a55104d23 100644 --- a/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php +++ b/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php @@ -11,4 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Notification\Exception; -class NotificationHandlerNotFound extends \RuntimeException {} +class NotificationHandlerNotFound extends \RuntimeException +{ +} diff --git a/src/Bundle/ChillMainBundle/Notification/Mailer.php b/src/Bundle/ChillMainBundle/Notification/Mailer.php index 5dacbc6fa..246480361 100644 --- a/src/Bundle/ChillMainBundle/Notification/Mailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Mailer.php @@ -34,7 +34,9 @@ class Mailer * * @param mixed[] $routeParameters */ - public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly Environment $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters) {} + public function __construct(private readonly MailerInterface $mailer, private readonly LoggerInterface $logger, private readonly Environment $twig, private readonly RouterInterface $router, private readonly TranslatorInterface $translator, protected $routeParameters) + { + } /** * @return string diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationHandlerManager.php b/src/Bundle/ChillMainBundle/Notification/NotificationHandlerManager.php index aa6e700bc..04116a434 100644 --- a/src/Bundle/ChillMainBundle/Notification/NotificationHandlerManager.php +++ b/src/Bundle/ChillMainBundle/Notification/NotificationHandlerManager.php @@ -17,7 +17,9 @@ use Doctrine\ORM\EntityManagerInterface; final readonly class NotificationHandlerManager { - public function __construct(private iterable $handlers, private EntityManagerInterface $em) {} + public function __construct(private iterable $handlers, private EntityManagerInterface $em) + { + } /** * @throw NotificationHandlerNotFound if handler is not found diff --git a/src/Bundle/ChillMainBundle/Notification/NotificationPresence.php b/src/Bundle/ChillMainBundle/Notification/NotificationPresence.php index 5c5cb3dcf..9b606d18d 100644 --- a/src/Bundle/ChillMainBundle/Notification/NotificationPresence.php +++ b/src/Bundle/ChillMainBundle/Notification/NotificationPresence.php @@ -23,7 +23,9 @@ class NotificationPresence { private array $cache = []; - public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository) {} + public function __construct(private readonly Security $security, private readonly NotificationRepository $notificationRepository) + { + } /** * @param list $more diff --git a/src/Bundle/ChillMainBundle/Notification/Templating/NotificationTwigExtensionRuntime.php b/src/Bundle/ChillMainBundle/Notification/Templating/NotificationTwigExtensionRuntime.php index a65758f5f..8dd2935dd 100644 --- a/src/Bundle/ChillMainBundle/Notification/Templating/NotificationTwigExtensionRuntime.php +++ b/src/Bundle/ChillMainBundle/Notification/Templating/NotificationTwigExtensionRuntime.php @@ -21,7 +21,9 @@ use Twig\Extension\RuntimeExtensionInterface; class NotificationTwigExtensionRuntime implements RuntimeExtensionInterface { - public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator) {} + public function __construct(private readonly FormFactoryInterface $formFactory, private readonly NotificationPresence $notificationPresence, private readonly UrlGeneratorInterface $urlGenerator) + { + } public function counterNotificationFor(Environment $environment, string $relatedEntityClass, int $relatedEntityId, array $more = [], array $options = []): string { diff --git a/src/Bundle/ChillMainBundle/Pagination/PageGenerator.php b/src/Bundle/ChillMainBundle/Pagination/PageGenerator.php index 4c9cb68fe..b887accaa 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PageGenerator.php +++ b/src/Bundle/ChillMainBundle/Pagination/PageGenerator.php @@ -18,7 +18,9 @@ class PageGenerator implements \Iterator { protected int $current = 1; - public function __construct(protected Paginator $paginator) {} + public function __construct(protected Paginator $paginator) + { + } public function current(): Page { diff --git a/src/Bundle/ChillMainBundle/Pagination/Paginator.php b/src/Bundle/ChillMainBundle/Pagination/Paginator.php index a809bc9f4..072437f09 100644 --- a/src/Bundle/ChillMainBundle/Pagination/Paginator.php +++ b/src/Bundle/ChillMainBundle/Pagination/Paginator.php @@ -57,7 +57,8 @@ class Paginator implements PaginatorInterface * the key in the GET parameter to indicate the number of item per page. */ protected string $itemPerPageKey - ) {} + ) { + } public function count(): int { @@ -137,7 +138,7 @@ class Paginator implements PaginatorInterface } /** - * @return \Chill\MainBundle\Pagination\Page + * @return Page * * @throws \RuntimeException if the next page does not exists */ diff --git a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php index 4bf651280..166dcdb68 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php +++ b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php @@ -42,7 +42,8 @@ class PaginatorFactory * the request or inside the paginator. */ private $itemPerPage = 20 - ) {} + ) { + } /** * create a paginator instance. diff --git a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php b/src/Bundle/ChillMainBundle/Phonenumber/Templating.php index 51d57c9e9..69da56eca 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/Templating.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/Templating.php @@ -16,7 +16,9 @@ use Twig\TwigFilter; class Templating extends AbstractExtension { - public function __construct(protected PhonenumberHelper $phonenumberHelper) {} + public function __construct(protected PhonenumberHelper $phonenumberHelper) + { + } public function formatPhonenumber($phonenumber) { diff --git a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php index b9e454b46..439bb3558 100644 --- a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php +++ b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php @@ -16,4 +16,6 @@ use Redis; /** * Redis client configured by chill main. */ -class ChillRedis extends \Redis {} +class ChillRedis extends \Redis +{ +} diff --git a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php index f14424f6f..5b830ce27 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserACLAwareRepository.php @@ -19,7 +19,9 @@ use Doctrine\ORM\EntityManagerInterface; class UserACLAwareRepository implements UserACLAwareRepositoryInterface { - public function __construct(private readonly ParentRoleHelper $parentRoleHelper, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly ParentRoleHelper $parentRoleHelper, private readonly EntityManagerInterface $em) + { + } public function findUsersByReachedACL(string $role, $center, $scope = null, bool $onlyEnabled = true): array { diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php index 37c47e1bd..6247cf769 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/SectionMenuBuilder.php @@ -26,7 +26,9 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface /** * SectionMenuBuilder constructor. */ - public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator, protected ParameterBagInterface $parameterBag) {} + public function __construct(protected AuthorizationCheckerInterface $authorizationChecker, protected TranslatorInterface $translator, protected ParameterBagInterface $parameterBag) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php index 3427face3..9775fe474 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/UserMenuBuilder.php @@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class UserMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack) {} + public function __construct(private readonly NotificationByUserCounter $notificationByUserCounter, private readonly WorkflowByUserCounter $workflowByUserCounter, private readonly Security $security, private readonly TranslatorInterface $translator, protected ParameterBagInterface $parameterBag, private readonly RequestStack $requestStack) + { + } public function buildMenu($menuId, \Knp\Menu\MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillMainBundle/Routing/MenuComposer.php b/src/Bundle/ChillMainBundle/Routing/MenuComposer.php index e16b10e8f..a1bd1d52f 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuComposer.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuComposer.php @@ -29,7 +29,9 @@ class MenuComposer private RouteCollection $routeCollection; - public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly RouterInterface $router, private readonly FactoryInterface $menuFactory, private readonly TranslatorInterface $translator) + { + } public function addLocalMenuBuilder(LocalMenuBuilderInterface $menuBuilder, $menuId) { diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index 65608ba4d..39e35c040 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -35,7 +35,9 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface 'activeRouteKey' => null, ]; - public function __construct(private readonly MenuComposer $menuComposer) {} + public function __construct(private readonly MenuComposer $menuComposer) + { + } /** * Render a Menu corresponding to $menuId. diff --git a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php index 12568287d..84d7d3786 100644 --- a/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php +++ b/src/Bundle/ChillMainBundle/Search/Entity/SearchUserApiProvider.php @@ -17,7 +17,9 @@ use Chill\MainBundle\Search\SearchApiQuery; class SearchUserApiProvider implements SearchApiInterface { - public function __construct(private readonly UserRepository $userRepository) {} + public function __construct(private readonly UserRepository $userRepository) + { + } public function getResult(string $key, array $metadata, float $pertinence) { diff --git a/src/Bundle/ChillMainBundle/Search/Model/Result.php b/src/Bundle/ChillMainBundle/Search/Model/Result.php index 1866da2f2..8646819d7 100644 --- a/src/Bundle/ChillMainBundle/Search/Model/Result.php +++ b/src/Bundle/ChillMainBundle/Search/Model/Result.php @@ -19,7 +19,8 @@ class Result * mixed an arbitrary result. */ private $result - ) {} + ) { + } public function getRelevance(): float { diff --git a/src/Bundle/ChillMainBundle/Search/ParsingException.php b/src/Bundle/ChillMainBundle/Search/ParsingException.php index 241079925..b70dd81eb 100644 --- a/src/Bundle/ChillMainBundle/Search/ParsingException.php +++ b/src/Bundle/ChillMainBundle/Search/ParsingException.php @@ -11,4 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Search; -class ParsingException extends \Exception {} +class ParsingException extends \Exception +{ +} diff --git a/src/Bundle/ChillMainBundle/Search/SearchApi.php b/src/Bundle/ChillMainBundle/Search/SearchApi.php index 267b90313..b7307c140 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApi.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApi.php @@ -20,7 +20,9 @@ use Doctrine\ORM\Query\ResultSetMappingBuilder; class SearchApi { - public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly iterable $providers, private readonly PaginatorFactory $paginator) + { + } public function getResults(string $pattern, array $types, array $parameters): Collection { diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiResult.php b/src/Bundle/ChillMainBundle/Search/SearchApiResult.php index 14f448746..4fc1cf928 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApiResult.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApiResult.php @@ -17,7 +17,9 @@ class SearchApiResult { private mixed $result; - public function __construct(private readonly float $relevance) {} + public function __construct(private readonly float $relevance) + { + } /** * @Serializer\Groups({"read"}) diff --git a/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php b/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php index b992b00c1..c753013cb 100644 --- a/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php +++ b/src/Bundle/ChillMainBundle/Search/Utils/SearchExtractionResult.php @@ -13,7 +13,9 @@ namespace Chill\MainBundle\Search\Utils; class SearchExtractionResult { - public function __construct(private readonly string $filteredSubject, private readonly array $found) {} + public function __construct(private readonly string $filteredSubject, private readonly array $found) + { + } public function getFilteredSubject(): string { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php index d80020285..352c28be2 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php @@ -18,4 +18,6 @@ use Symfony\Component\Security\Core\Authorization\Voter\Voter; * * This abstract Voter provide generic methods to handle object specific to Chill */ -abstract class AbstractChillVoter extends Voter implements ChillVoterInterface {} +abstract class AbstractChillVoter extends Voter implements ChillVoterInterface +{ +} diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index e37c3171e..6d9454fe0 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -34,7 +34,8 @@ class AuthorizationHelper implements AuthorizationHelperInterface private readonly ScopeResolverDispatcher $scopeResolverDispatcher, private readonly UserACLAwareRepositoryInterface $userACLAwareRepository, private readonly ParentRoleHelper $parentRoleHelper - ) {} + ) { + } /** * Filter an array of centers, return only center which are reachable. diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php index e9bb709a8..4bc07f915 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php @@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security; class AuthorizationHelperForCurrentUser implements AuthorizationHelperForCurrentUserInterface { - public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security) {} + public function __construct(private readonly AuthorizationHelperInterface $authorizationHelper, private readonly Security $security) + { + } public function getReachableCenters(string $role, Scope $scope = null): array { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php index f8b0102c7..2ed1856d2 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php @@ -14,4 +14,6 @@ namespace Chill\MainBundle\Security\Authorization; /** * Provides methods for compiling voter and build admin role fields. */ -interface ChillVoterInterface {} +interface ChillVoterInterface +{ +} diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelper.php index 071388fcf..edfe83256 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelper.php @@ -18,7 +18,8 @@ final readonly class DefaultVoterHelper implements VoterHelperInterface public function __construct( private AuthorizationHelper $authorizationHelper, private array $configuration - ) {} + ) { + } public function supports($attribute, $subject): bool { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperFactory.php b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperFactory.php index 805ba03e5..1f16004b2 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperFactory.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperFactory.php @@ -13,7 +13,9 @@ namespace Chill\MainBundle\Security\Authorization; class DefaultVoterHelperFactory implements VoterHelperFactoryInterface { - public function __construct(protected AuthorizationHelper $authorizationHelper) {} + public function __construct(protected AuthorizationHelper $authorizationHelper) + { + } public function generate($context): VoterGeneratorInterface { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php index 6a1fe5356..e0183cb7f 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/DefaultVoterHelperGenerator.php @@ -15,7 +15,9 @@ final class DefaultVoterHelperGenerator implements VoterGeneratorInterface { private array $configuration = []; - public function __construct(private readonly AuthorizationHelper $authorizationHelper) {} + public function __construct(private readonly AuthorizationHelper $authorizationHelper) + { + } public function addCheckFor(?string $class, array $attributes): self { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php index 44766a583..1da50e22e 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/EntityWorkflowVoter.php @@ -27,7 +27,9 @@ class EntityWorkflowVoter extends Voter final public const SHOW_ENTITY_LINK = 'CHILL_MAIN_WORKFLOW_LINK_SHOW'; - public function __construct(private readonly EntityWorkflowManager $manager, private readonly Security $security) {} + public function __construct(private readonly EntityWorkflowManager $manager, private readonly Security $security) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php index 9718cf013..637516ab9 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/WorkflowEntityDeletionVoter.php @@ -20,7 +20,9 @@ class WorkflowEntityDeletionVoter extends Voter /** * @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers */ - public function __construct(private $handlers, private readonly EntityWorkflowRepository $entityWorkflowRepository) {} + public function __construct(private $handlers, private readonly EntityWorkflowRepository $entityWorkflowRepository) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php index 264b77056..5985d8567 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/PasswordRecoverEvent.php @@ -30,7 +30,8 @@ class PasswordRecoverEvent extends \Symfony\Contracts\EventDispatcher\Event private readonly ?User $user = null, private $ip = null, private readonly bool $safelyGenerated = false, - ) {} + ) { + } public function getIp() { diff --git a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php index e868262e2..46712c6a6 100644 --- a/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php +++ b/src/Bundle/ChillMainBundle/Security/PasswordRecover/RecoverPasswordHelper.php @@ -20,7 +20,9 @@ class RecoverPasswordHelper { final public const RECOVER_PASSWORD_ROUTE = 'password_recover'; - public function __construct(private readonly TokenManager $tokenManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly MailerInterface $mailer) {} + public function __construct(private readonly TokenManager $tokenManager, private readonly UrlGeneratorInterface $urlGenerator, private readonly MailerInterface $mailer) + { + } /** * @param bool $absolute diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php index 903b8c5c5..9855477fd 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverDispatcher.php @@ -16,7 +16,9 @@ final readonly class CenterResolverDispatcher implements CenterResolverDispatche /** * @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers */ - public function __construct(private iterable $resolvers = []) {} + public function __construct(private iterable $resolvers = []) + { + } public function resolveCenter($entity, ?array $options = []) { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php index f629459b4..2ded14071 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/CenterResolverManager.php @@ -18,7 +18,9 @@ final readonly class CenterResolverManager implements CenterResolverManagerInter /** * @param \Chill\MainBundle\Security\Resolver\CenterResolverInterface[] $resolvers */ - public function __construct(private iterable $resolvers = []) {} + public function __construct(private iterable $resolvers = []) + { + } public function resolveCenters($entity, ?array $options = []): array { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php index 032c28a9b..3959cc5a3 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ResolverTwigExtension.php @@ -15,7 +15,9 @@ use Twig\TwigFilter; final class ResolverTwigExtension extends \Twig\Extension\AbstractExtension { - public function __construct(private readonly CenterResolverManagerInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {} + public function __construct(private readonly CenterResolverManagerInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) + { + } public function getFilters() { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index bafadf1a6..a3298eab5 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -19,7 +19,9 @@ final readonly class ScopeResolverDispatcher /** * @param \Chill\MainBundle\Security\Resolver\ScopeResolverInterface[] $resolvers */ - public function __construct(private iterable $resolvers) {} + public function __construct(private iterable $resolvers) + { + } public function isConcerned($entity, ?array $options = []): bool { diff --git a/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php b/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php index c624c6a99..408128c6f 100644 --- a/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php +++ b/src/Bundle/ChillMainBundle/Security/UserProvider/UserProvider.php @@ -21,7 +21,9 @@ use Symfony\Component\Security\Core\User\UserProviderInterface; class UserProvider implements UserProviderInterface { - public function __construct(protected EntityManagerInterface $em) {} + public function __construct(protected EntityManagerInterface $em) + { + } public function loadUserByUsername($username): UserInterface { diff --git a/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php b/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php index 6349f5d85..9d80eabe9 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php +++ b/src/Bundle/ChillMainBundle/Serializer/Model/Collection.php @@ -15,7 +15,9 @@ use Chill\MainBundle\Pagination\PaginatorInterface; class Collection { - public function __construct(private $items, private readonly PaginatorInterface $paginator) {} + public function __construct(private $items, private readonly PaginatorInterface $paginator) + { + } public function getItems() { diff --git a/src/Bundle/ChillMainBundle/Serializer/Model/Counter.php b/src/Bundle/ChillMainBundle/Serializer/Model/Counter.php index 476d68568..4ef3fe849 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Model/Counter.php +++ b/src/Bundle/ChillMainBundle/Serializer/Model/Counter.php @@ -13,7 +13,9 @@ namespace Chill\MainBundle\Serializer\Model; class Counter implements \JsonSerializable { - public function __construct(private ?int $counter) {} + public function __construct(private ?int $counter) + { + } public function getCounter(): ?int { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php index bbae6bd40..1a5ebe86b 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/AddressNormalizer.php @@ -47,7 +47,9 @@ class AddressNormalizer implements ContextAwareNormalizerInterface, NormalizerAw 'confidential', ]; - public function __construct(private readonly AddressRender $addressRender) {} + public function __construct(private readonly AddressRender $addressRender) + { + } /** * @param Address $address diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php index 7c41bcb8a..8e937ee66 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php @@ -20,7 +20,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class CenterNormalizer implements DenormalizerInterface, NormalizerInterface { - public function __construct(private readonly CenterRepository $repository) {} + public function __construct(private readonly CenterRepository $repository) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php index 41cf94e1b..e1d692a19 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php @@ -23,7 +23,9 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa { use NormalizerAwareTrait; - public function __construct(private readonly UserRepository $userRepository) {} + public function __construct(private readonly UserRepository $userRepository) + { + } /** * @param CommentEmbeddable $object diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php index 9ee8bf158..69e7744e4 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DateNormalizer.php @@ -20,7 +20,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class DateNormalizer implements ContextAwareNormalizerInterface, DenormalizerInterface { - public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag) {} + public function __construct(private readonly RequestStack $requestStack, private readonly ParameterBagInterface $parameterBag) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php index ed34a45be..b90f587bb 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/DoctrineExistingEntityNormalizer.php @@ -19,7 +19,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface; class DoctrineExistingEntityNormalizer implements DenormalizerInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly ClassMetadataFactoryInterface $serializerMetadataFactory) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly ClassMetadataFactoryInterface $serializerMetadataFactory) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php index c4284a526..df125994d 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php @@ -23,7 +23,9 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn { use NormalizerAwareTrait; - public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry) {} + public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry) + { + } /** * @param EntityWorkflow $object diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php index 1edc6e74c..47ec0427e 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php @@ -21,7 +21,9 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz { use NormalizerAwareTrait; - public function __construct(private readonly MetadataExtractor $metadataExtractor) {} + public function __construct(private readonly MetadataExtractor $metadataExtractor) + { + } /** * @param EntityWorkflowStep $object diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php index 3195f9aab..50b3e33f6 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php @@ -23,7 +23,9 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte { use NormalizerAwareTrait; - public function __construct(private readonly NotificationHandlerManager $notificationHandlerManager, private readonly EntityManagerInterface $entityManager, private readonly Security $security) {} + public function __construct(private readonly NotificationHandlerManager $notificationHandlerManager, private readonly EntityManagerInterface $entityManager, private readonly Security $security) + { + } /** * @param Notification $object diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php index 565fa34fc..80407a6b1 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php @@ -18,7 +18,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, DenormalizerInterface { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } public function denormalize($data, string $type, string $format = null, array $context = []): PrivateCommentEmbeddable { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php index 55a887001..9843c5dd5 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/UserNormalizer.php @@ -38,7 +38,9 @@ class UserNormalizer implements ContextAwareNormalizerInterface, NormalizerAware 'isAbsent' => false, ]; - public function __construct(private readonly UserRender $userRender) {} + public function __construct(private readonly UserRender $userRender) + { + } public function normalize($object, $format = null, array $context = []) { diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php index a4589b836..80174053a 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php @@ -100,7 +100,8 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA public function __construct( private Connection $connection, private LoggerInterface $logger, - ) {} + ) { + } /** * @throws \Throwable diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php index ed055a3c3..d2c9fc960 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php @@ -22,7 +22,8 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C public function __construct( private ClockInterface $clock, private CollateAddressWithReferenceOrPostalCodeInterface $collateAddressWithReferenceOrPostalCode, - ) {} + ) { + } public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php index 06eb2104d..31982d6eb 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php @@ -21,7 +21,8 @@ final readonly class RefreshAddressToGeographicalUnitMaterializedViewCronJob imp public function __construct( private Connection $connection, private ClockInterface $clock, - ) {} + ) { + } public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php b/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php index b545d3979..3484fe288 100644 --- a/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php +++ b/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php @@ -23,7 +23,8 @@ class ViewEntityInfoManager private readonly iterable $vienEntityInfoProviders, private readonly Connection $connection, private readonly LoggerInterface $logger, - ) {} + ) { + } public function synchronizeOnDB(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php index 25749aa89..681d49747 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBEFromBestAddress.php @@ -20,7 +20,9 @@ class AddressReferenceBEFromBestAddress { private const RELEASE = 'https://gitea.champs-libres.be/api/v1/repos/Chill-project/belgian-bestaddresses-transform/releases/tags/v1.0.0'; - public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $baseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher) {} + public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $baseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher) + { + } public function import(string $lang, array $lists): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php index bc656ebc5..1eaf42e76 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php @@ -45,7 +45,9 @@ final class AddressReferenceBaseImporter private array $waitingForInsert = []; - public function __construct(private readonly Connection $defaultConnection, private readonly LoggerInterface $logger) {} + public function __construct(private readonly Connection $defaultConnection, private readonly LoggerInterface $logger) + { + } public function finalize(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php index fd17f2cd2..a8b910424 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceFromBano.php @@ -17,7 +17,9 @@ use Symfony\Contracts\HttpClient\HttpClientInterface; class AddressReferenceFromBano { - public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $baseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher) {} + public function __construct(private readonly HttpClientInterface $client, private readonly AddressReferenceBaseImporter $baseImporter, private readonly AddressToReferenceMatcher $addressToReferenceMatcher) + { + } public function import(string $departementNo): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressToReferenceMatcher.php b/src/Bundle/ChillMainBundle/Service/Import/AddressToReferenceMatcher.php index 6a7bff632..32e8f0984 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressToReferenceMatcher.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressToReferenceMatcher.php @@ -64,7 +64,9 @@ final readonly class AddressToReferenceMatcher '{{ reviewed }}' => Address::ADDR_REFERENCE_STATUS_REVIEWED, ]; - public function __construct(private Connection $connection, private LoggerInterface $logger) {} + public function __construct(private Connection $connection, private LoggerInterface $logger) + { + } public function checkAddressesMatchingReferences(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php index b76d6f096..6196f8fad 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php @@ -43,7 +43,9 @@ final class GeographicalUnitBaseImporter private array $waitingForInsert = []; - public function __construct(private readonly Connection $defaultConnection, private readonly LoggerInterface $logger) {} + public function __construct(private readonly Connection $defaultConnection, private readonly LoggerInterface $logger) + { + } public function finalize(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBEFromBestAddress.php b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBEFromBestAddress.php index a95ba1abc..2ac71abb7 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBEFromBestAddress.php +++ b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBEFromBestAddress.php @@ -20,7 +20,9 @@ class PostalCodeBEFromBestAddress { private const RELEASE = 'https://gitea.champs-libres.be/api/v1/repos/Chill-project/belgian-bestaddresses-transform/releases/tags/v1.0.0'; - public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger) {} + public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger) + { + } public function import(string $lang = 'fr'): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBaseImporter.php index a0fc5a5db..5f7f52d72 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeBaseImporter.php @@ -54,7 +54,9 @@ class PostalCodeBaseImporter private array $waitingForInsert = []; - public function __construct(private readonly Connection $defaultConnection) {} + public function __construct(private readonly Connection $defaultConnection) + { + } public function finalize(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php index a7998af44..e5934af3b 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php +++ b/src/Bundle/ChillMainBundle/Service/Import/PostalCodeFRFromOpenData.php @@ -25,7 +25,9 @@ class PostalCodeFRFromOpenData { private const CSV = 'https://datanova.laposte.fr/data-fair/api/v1/datasets/laposte-hexasmal/data-files/019HexaSmal.csv'; - public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger) {} + public function __construct(private readonly PostalCodeBaseImporter $baseImporter, private readonly HttpClientInterface $client, private readonly LoggerInterface $logger) + { + } public function import(): void { diff --git a/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php b/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php index 4f2e88c08..b0bfae2b3 100644 --- a/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php +++ b/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php @@ -22,7 +22,9 @@ class ChillMailer implements MailerInterface { private string $prefix = '[Chill] '; - public function __construct(private readonly MailerInterface $initial, private readonly LoggerInterface $chillLogger) {} + public function __construct(private readonly MailerInterface $initial, private readonly LoggerInterface $chillLogger) + { + } public function send(RawMessage $message, Envelope $envelope = null): void { diff --git a/src/Bundle/ChillMainBundle/Service/RollingDate/RollingDate.php b/src/Bundle/ChillMainBundle/Service/RollingDate/RollingDate.php index 445b35cb0..942310da4 100644 --- a/src/Bundle/ChillMainBundle/Service/RollingDate/RollingDate.php +++ b/src/Bundle/ChillMainBundle/Service/RollingDate/RollingDate.php @@ -69,7 +69,8 @@ class RollingDate private readonly string $roll, private readonly ?\DateTimeImmutable $fixedDate = null, private readonly \DateTimeImmutable $pivotDate = new \DateTimeImmutable('now') - ) {} + ) { + } public function getFixedDate(): ?\DateTimeImmutable { diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php b/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php index 16bc87790..82dea7bc6 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php @@ -20,5 +20,7 @@ namespace Chill\MainBundle\Service\ShortMessage; class NullShortMessageSender implements ShortMessageSenderInterface { - public function send(ShortMessage $shortMessage): void {} + public function send(ShortMessage $shortMessage): void + { + } } diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessage.php b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessage.php index a2a5b6ed4..e028cf3c4 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessage.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessage.php @@ -26,7 +26,9 @@ class ShortMessage final public const PRIORITY_MEDIUM = 'medium'; - public function __construct(private string $content, private PhoneNumber $phoneNumber, private string $priority = 'low') {} + public function __construct(private string $content, private PhoneNumber $phoneNumber, private string $priority = 'low') + { + } public function getContent(): string { diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageHandler.php b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageHandler.php index 344ff3c17..55490b2eb 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageHandler.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageHandler.php @@ -25,7 +25,9 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; */ class ShortMessageHandler implements MessageHandlerInterface { - public function __construct(private readonly ShortMessageTransporterInterface $messageTransporter) {} + public function __construct(private readonly ShortMessageTransporterInterface $messageTransporter) + { + } public function __invoke(ShortMessage $message): void { diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageTransporter.php b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageTransporter.php index bbe4f0575..76e45acbd 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageTransporter.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessage/ShortMessageTransporter.php @@ -20,7 +20,9 @@ namespace Chill\MainBundle\Service\ShortMessage; class ShortMessageTransporter implements ShortMessageTransporterInterface { - public function __construct(private readonly ShortMessageSenderInterface $sender) {} + public function __construct(private readonly ShortMessageSenderInterface $sender) + { + } public function send(ShortMessage $shortMessage): void { diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessageOvh/OvhShortMessageSender.php b/src/Bundle/ChillMainBundle/Service/ShortMessageOvh/OvhShortMessageSender.php index d81123c9a..bf43d76d4 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessageOvh/OvhShortMessageSender.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessageOvh/OvhShortMessageSender.php @@ -36,7 +36,8 @@ class OvhShortMessageSender implements ShortMessageSenderInterface // for DI, must remains as third argument private readonly LoggerInterface $logger, private readonly PhoneNumberUtil $phoneNumberUtil - ) {} + ) { + } public function send(ShortMessage $shortMessage): void { diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php index f59b1cd66..8a4d99f82 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/AddressRender.php @@ -30,7 +30,9 @@ class AddressRender implements ChillEntityRenderInterface 'extended_infos' => false, ]; - public function __construct(private readonly \Twig\Environment $templating, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly \Twig\Environment $templating, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function renderBox($addr, array $options): string { diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php index a4d0f48e6..80536c528 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/CommentRender.php @@ -21,7 +21,9 @@ class CommentRender implements ChillEntityRenderInterface { use BoxUtilsChillEntityRenderTrait; - public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly \Twig\Environment $engine) {} + public function __construct(private readonly UserRepositoryInterface $userRepository, private readonly \Twig\Environment $engine) + { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php b/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php index 790996847..f246b0185 100644 --- a/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php +++ b/src/Bundle/ChillMainBundle/Templating/Entity/UserRender.php @@ -27,7 +27,9 @@ class UserRender implements ChillEntityRenderInterface 'at' => null, ]; - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) + { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php index 4ca9eda41..ecc54acf6 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php @@ -22,7 +22,8 @@ final readonly class FilterOrderGetActiveFilterHelper private TranslatorInterface $translator, private PropertyAccessorInterface $propertyAccessor, private UserRender $userRender, - ) {} + ) { + } /** * Return all the data required to display the active filters. diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php index 9b6a42fe4..ebce380b0 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php @@ -51,7 +51,8 @@ final class FilterOrderHelper public function __construct( private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack, - ) {} + ) { + } public function addSingleCheckbox(string $name, string $label): self { diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php index d5df6d4f3..4bef35046 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php @@ -37,7 +37,9 @@ class FilterOrderHelperBuilder */ private array $userPickers = []; - public function __construct(private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack) {} + public function __construct(private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack) + { + } public function addSingleCheckbox(string $name, string $label): self { diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php index 0aff466dc..c9c094a15 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperFactory.php @@ -16,7 +16,9 @@ use Symfony\Component\HttpFoundation\RequestStack; class FilterOrderHelperFactory implements FilterOrderHelperFactoryInterface { - public function __construct(private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack) {} + public function __construct(private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack) + { + } public function create(string $context, ?array $options = []): FilterOrderHelperBuilder { diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php index 6d91cdd83..40eca8679 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php @@ -25,7 +25,8 @@ class Templating extends AbstractExtension public function __construct( private readonly RequestStack $requestStack, private readonly FilterOrderGetActiveFilterHelper $filterOrderGetActiveFilterHelper, - ) {} + ) { + } public function getFilters(): array { diff --git a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php index eceae8d9c..bdcc1d9d9 100644 --- a/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php +++ b/src/Bundle/ChillMainBundle/Templating/TranslatableStringTwig.php @@ -22,7 +22,9 @@ class TranslatableStringTwig extends AbstractExtension /** * TranslatableStringTwig constructor. */ - public function __construct(private readonly TranslatableStringHelper $helper) {} + public function __construct(private readonly TranslatableStringHelper $helper) + { + } /** * Returns a list of filters to add to the existing list. diff --git a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php index cf8fabf66..f47ddd40b 100644 --- a/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Controller/GeographicalUnitByAddressApiControllerTest.php @@ -43,7 +43,7 @@ class GeographicalUnitByAddressApiControllerTest extends WebTestCase $em = self::$container->get(EntityManagerInterface::class); $nb = $em->createQuery('SELECT COUNT(a) FROM '.Address::class.' a')->getSingleScalarResult(); - /** @var \Chill\MainBundle\Entity\Address $random */ + /** @var Address $random */ $random = $em->createQuery('SELECT a FROM '.Address::class.' a') ->setFirstResult(random_int(0, $nb)) ->setMaxResults(1) diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php index cec60c7c9..489bab4cb 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php @@ -161,7 +161,9 @@ final class CronManagerTest extends TestCase class JobCanRun implements CronJobInterface { - public function __construct(private readonly string $key) {} + public function __construct(private readonly string $key) + { + } public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index b9e597ec0..44091f38b 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -58,7 +58,7 @@ final class ExportManagerTest extends KernelTestCase { self::bootKernel(); - $this->prophet = new \Prophecy\Prophet(); + $this->prophet = new Prophet(); } protected function tearDown(): void @@ -370,7 +370,7 @@ final class ExportManagerTest extends KernelTestCase $user = $this->prepareUser([]); $authorizationChecker = $this->prophet->prophesize(); - $authorizationChecker->willImplement(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class); + $authorizationChecker->willImplement(AuthorizationCheckerInterface::class); $authorizationChecker->isGranted('CHILL_STAT_DUMMY', $center) ->willReturn(true); @@ -399,7 +399,7 @@ final class ExportManagerTest extends KernelTestCase $user = $this->prepareUser([]); $authorizationChecker = $this->prophet->prophesize(); - $authorizationChecker->willImplement(\Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface::class); + $authorizationChecker->willImplement(AuthorizationCheckerInterface::class); $authorizationChecker->isGranted('CHILL_STAT_DUMMY', $center) ->willReturn(true); $authorizationChecker->isGranted('CHILL_STAT_DUMMY', $centerB) @@ -435,7 +435,7 @@ final class ExportManagerTest extends KernelTestCase ); $export = $this->prophet->prophesize(); - $export->willImplement(\Chill\MainBundle\Export\ExportInterface::class); + $export->willImplement(ExportInterface::class); $export->requiredRole()->willReturn('CHILL_STAT_DUMMY'); $result = $exportManager->isGrantedForElement($export->reveal(), null, []); @@ -532,14 +532,17 @@ class DummyFilterWithApplying implements FilterInterface public function __construct( private readonly ?string $role, private readonly string $applyOn - ) {} + ) { + } public function getTitle() { return 'dummy'; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { @@ -556,7 +559,9 @@ class DummyFilterWithApplying implements FilterInterface return $this->role; } - public function alterQuery(QueryBuilder $qb, $data) {} + public function alterQuery(QueryBuilder $qb, $data) + { + } public function applyOn() { @@ -572,14 +577,17 @@ class DummyExport implements ExportInterface * @var array */ private readonly array $supportedModifiers, - ) {} + ) { + } public function getTitle() { return 'dummy'; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index e7dbaf8fb..d7fdc49c8 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -117,9 +117,13 @@ class SortExportElementTest extends KernelTestCase private function makeAggregator(string $title): AggregatorInterface { return new class ($title) implements AggregatorInterface { - public function __construct(private readonly string $title) {} + public function __construct(private readonly string $title) + { + } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { @@ -146,7 +150,9 @@ class SortExportElementTest extends KernelTestCase return null; } - public function alterQuery(QueryBuilder $qb, $data) {} + public function alterQuery(QueryBuilder $qb, $data) + { + } public function applyOn() { @@ -158,14 +164,18 @@ class SortExportElementTest extends KernelTestCase private function makeFilter(string $title): FilterInterface { return new class ($title) implements FilterInterface { - public function __construct(private readonly string $title) {} + public function __construct(private readonly string $title) + { + } public function getTitle() { return $this->title; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { @@ -182,7 +192,9 @@ class SortExportElementTest extends KernelTestCase return null; } - public function alterQuery(QueryBuilder $qb, $data) {} + public function alterQuery(QueryBuilder $qb, $data) + { + } public function applyOn() { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php index e74888b83..d21c7d50a 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Authorization/AuthorizationHelperTest.php @@ -258,8 +258,8 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); + $entity->willImplement('\\'.HasScopeInterface::class); $entity->getCenter()->willReturn($center); $entity->getScope()->willReturn($scope); @@ -383,7 +383,7 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); $entity->getCenter()->willReturn($center); $this->assertTrue($helper->userHasAccess( @@ -407,7 +407,7 @@ final class AuthorizationHelperTest extends KernelTestCase $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); $entity->getCenter()->willReturn($center); $this->assertTrue($helper->userHasAccess( @@ -431,8 +431,8 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); + $entity->willImplement('\\'.HasScopeInterface::class); $entity->getCenter()->willReturn($centerB); $entity->getScope()->willReturn($scope); @@ -452,7 +452,7 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); $entity->getCenter()->willReturn($center); $this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE')); @@ -471,8 +471,8 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasScopeInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); + $entity->willImplement('\\'.HasScopeInterface::class); $entity->getCenter()->willReturn($center); $entity->getScope()->willReturn($scope); @@ -503,7 +503,7 @@ final class AuthorizationHelperTest extends KernelTestCase ]); $helper = $this->getAuthorizationHelper(); $entity = $this->prophesize(); - $entity->willImplement('\\'.\Chill\MainBundle\Entity\HasCenterInterface::class); + $entity->willImplement('\\'.HasCenterInterface::class); $entity->getCenter()->willReturn($centerA); $this->assertFalse($helper->userHasAccess($user, $entity->reveal(), 'CHILL_ROLE')); @@ -577,7 +577,7 @@ final class AuthorizationHelperTest extends KernelTestCase } /** - * @return \Chill\MainBundle\Security\Authorization\AuthorizationHelper + * @return AuthorizationHelper */ private function getAuthorizationHelper() { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php index 78956a1d9..b2481917e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php @@ -34,7 +34,9 @@ final class TokenManagerTest extends KernelTestCase $this->tokenManager = new TokenManager('secret', $logger); } - public static function setUpBefore() {} + public static function setUpBefore() + { + } public function testGenerate() { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php index 733e17fec..1ec23fdb3 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/DefaultScopeResolverTest.php @@ -35,7 +35,9 @@ final class DefaultScopeResolverTest extends TestCase { $scope = new Scope(); $entity = new class ($scope) implements HasScopeInterface { - public function __construct(private readonly Scope $scope) {} + public function __construct(private readonly Scope $scope) + { + } public function getScope() { @@ -51,7 +53,9 @@ final class DefaultScopeResolverTest extends TestCase public function testHasScopesInterface() { $entity = new class ($scopeA = new Scope(), $scopeB = new Scope()) implements HasScopesInterface { - public function __construct(private readonly Scope $scopeA, private readonly Scope $scopeB) {} + public function __construct(private readonly Scope $scopeA, private readonly Scope $scopeB) + { + } public function getScopes(): iterable { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php index 35245174c..dd4b7f121 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/Resolver/ScopeResolverDispatcherTest.php @@ -36,7 +36,9 @@ final class ScopeResolverDispatcherTest extends TestCase { $scope = new Scope(); $entity = new class ($scope) implements HasScopeInterface { - public function __construct(private readonly Scope $scope) {} + public function __construct(private readonly Scope $scope) + { + } public function getScope() { diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php index 53d8faa16..6b4253104 100644 --- a/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php +++ b/src/Bundle/ChillMainBundle/Timeline/TimelineBuilder.php @@ -37,7 +37,9 @@ class TimelineBuilder */ private array $providersByContext = []; - public function __construct(private readonly EntityManagerInterface $em, private readonly Environment $twig) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly Environment $twig) + { + } /** * add a provider id. diff --git a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php index 584e634ea..e736ba749 100644 --- a/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php +++ b/src/Bundle/ChillMainBundle/Timeline/TimelineSingleQuery.php @@ -15,7 +15,9 @@ class TimelineSingleQuery { private bool $distinct = false; - public function __construct(private ?string $id = null, private ?string $date = null, private ?string $key = null, private ?string $from = null, private ?string $where = null, private array $parameters = []) {} + public function __construct(private ?string $id = null, private ?string $date = null, private ?string $key = null, private ?string $from = null, private ?string $where = null, private array $parameters = []) + { + } public function buildSql(): string { diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php index 0bbf1d373..8980b8376 100644 --- a/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php +++ b/src/Bundle/ChillMainBundle/Validation/Validator/RoleScopeScopePresence.php @@ -21,7 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class RoleScopeScopePresence extends ConstraintValidator { - public function __construct(private readonly RoleProvider $roleProvider, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly RoleProvider $roleProvider, private readonly LoggerInterface $logger, private readonly TranslatorInterface $translator) + { + } public function validate($value, Constraint $constraint) { diff --git a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php index 0c02885ad..f0fd1880c 100644 --- a/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php +++ b/src/Bundle/ChillMainBundle/Validation/Validator/ValidPhonenumber.php @@ -18,7 +18,9 @@ use Symfony\Component\Validator\ConstraintValidator; final class ValidPhonenumber extends ConstraintValidator { - public function __construct(private readonly LoggerInterface $logger, private readonly PhoneNumberHelperInterface $phonenumberHelper) {} + public function __construct(private readonly LoggerInterface $logger, private readonly PhoneNumberHelperInterface $phonenumberHelper) + { + } /** * @param string $value diff --git a/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php b/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php index a1b631265..3ea5d495b 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php +++ b/src/Bundle/ChillMainBundle/Workflow/Counter/WorkflowByUserCounter.php @@ -22,7 +22,9 @@ use Symfony\Component\Workflow\Event\Event; final readonly class WorkflowByUserCounter implements NotificationCounterInterface, EventSubscriberInterface { - public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool) {} + public function __construct(private EntityWorkflowStepRepository $workflowStepRepository, private CacheItemPoolInterface $cacheItemPool) + { + } public function addNotification(UserInterface $u): int { diff --git a/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php b/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php index 9a1f52280..6c45cef3d 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php +++ b/src/Bundle/ChillMainBundle/Workflow/EntityWorkflowManager.php @@ -20,7 +20,9 @@ class EntityWorkflowManager /** * @param \Chill\MainBundle\Workflow\EntityWorkflowHandlerInterface[] $handlers */ - public function __construct(private readonly iterable $handlers, private readonly Registry $registry) {} + public function __construct(private readonly iterable $handlers, private readonly Registry $registry) + { + } public function getHandler(EntityWorkflow $entityWorkflow, array $options = []): EntityWorkflowHandlerInterface { diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php index b1fa80458..804a6587f 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/EntityWorkflowTransitionEventSubscriber.php @@ -23,7 +23,9 @@ use Symfony\Component\Workflow\TransitionBlocker; class EntityWorkflowTransitionEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender) {} + public function __construct(private readonly LoggerInterface $chillLogger, private readonly Security $security, private readonly UserRender $userRender) + { + } public function addDests(Event $event): void { diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php index e290a567e..07cf8cc14 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php +++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/NotificationOnTransition.php @@ -23,7 +23,9 @@ use Symfony\Component\Workflow\Registry; class NotificationOnTransition implements EventSubscriberInterface { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry) {} + public function __construct(private readonly EntityManagerInterface $entityManager, private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Security $security, private readonly Registry $registry) + { + } public static function getSubscribedEvents(): array { diff --git a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php index 90a6e19db..bd07a5a28 100644 --- a/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php +++ b/src/Bundle/ChillMainBundle/Workflow/EventSubscriber/SendAccessKeyEventSubscriber.php @@ -20,7 +20,9 @@ use Symfony\Component\Workflow\Registry; class SendAccessKeyEventSubscriber { - public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer) {} + public function __construct(private readonly \Twig\Environment $engine, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly MailerInterface $mailer) + { + } public function postPersist(EntityWorkflowStep $step): void { diff --git a/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php b/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php index 9d91b3357..f4280b50f 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php +++ b/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php @@ -11,4 +11,6 @@ declare(strict_types=1); namespace Chill\MainBundle\Workflow\Exception; -class HandlerNotFoundException extends \RuntimeException {} +class HandlerNotFoundException extends \RuntimeException +{ +} diff --git a/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php b/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php index dabe0cf8e..05ee58d87 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php +++ b/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php @@ -19,7 +19,9 @@ use Symfony\Component\Workflow\WorkflowInterface; class MetadataExtractor { - public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly Registry $registry, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function availableWorkflowFor(string $relatedEntityClass, ?int $relatedEntityId = 0): array { diff --git a/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php b/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php index c9ba7cf79..9302cf7f9 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php +++ b/src/Bundle/ChillMainBundle/Workflow/Notification/WorkflowNotificationHandler.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; class WorkflowNotificationHandler implements NotificationHandlerInterface { - public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security) {} + public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Security $security) + { + } public function getTemplate(Notification $notification, array $options = []): string { diff --git a/src/Bundle/ChillMainBundle/Workflow/Templating/WorkflowTwigExtensionRuntime.php b/src/Bundle/ChillMainBundle/Workflow/Templating/WorkflowTwigExtensionRuntime.php index f2b7d80db..e9edb11d9 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Templating/WorkflowTwigExtensionRuntime.php +++ b/src/Bundle/ChillMainBundle/Workflow/Templating/WorkflowTwigExtensionRuntime.php @@ -23,7 +23,9 @@ use Twig\Extension\RuntimeExtensionInterface; class WorkflowTwigExtensionRuntime implements RuntimeExtensionInterface { - public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly Registry $registry, private readonly EntityWorkflowRepository $repository, private readonly MetadataExtractor $metadataExtractor, private readonly NormalizerInterface $normalizer) + { + } public function getTransitionByString(EntityWorkflow $entityWorkflow, string $key): ?Transition { diff --git a/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php b/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php index 2020c7b52..f6590c9d3 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php +++ b/src/Bundle/ChillMainBundle/Workflow/Validator/EntityWorkflowCreationValidator.php @@ -21,7 +21,9 @@ use Symfony\Component\Workflow\WorkflowInterface; class EntityWorkflowCreationValidator extends \Symfony\Component\Validator\ConstraintValidator { - public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager) {} + public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager) + { + } /** * @param EntityWorkflow $value diff --git a/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php b/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php index 55f5a6420..5ae675b51 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php @@ -16,7 +16,9 @@ use Doctrine\Migrations\AbstractMigration; class Version20100000000000 extends AbstractMigration { - public function down(Schema $schema): void {} + public function down(Schema $schema): void + { + } public function up(Schema $schema): void { diff --git a/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php b/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php index 4bd9bd18f..c46b40ee5 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php @@ -16,7 +16,9 @@ use Doctrine\Migrations\AbstractMigration; final class Version20220513151853 extends AbstractMigration { - public function down(Schema $schema): void {} + public function down(Schema $schema): void + { + } public function getDescription(): string { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php index 64d2b8f12..f65533958 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/PersonAddressMoveEventSubscriber.php @@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class PersonAddressMoveEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister, private readonly Security $security, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister, private readonly Security $security, private readonly TranslatorInterface $translator) + { + } public static function getSubscribedEvents(): array { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php index 084fe8ff5..297da8673 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Events/UserRefEventSubscriber.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class UserRefEventSubscriber implements EventSubscriberInterface { - public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) {} + public function __construct(private readonly Security $security, private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly NotificationPersisterInterface $notificationPersister) + { + } public static function getSubscribedEvents() { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php index 0d362c581..2ddf3415c 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php @@ -20,7 +20,8 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface public function __construct( private ClockInterface $clock, private AccompanyingPeriodStepChangeRequestor $requestor, - ) {} + ) { + } public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php index 534672efc..71d28c57f 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php @@ -23,7 +23,8 @@ class AccompanyingPeriodStepChangeMessageHandler implements MessageHandlerInterf public function __construct( private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly AccompanyingPeriodStepChanger $changer, - ) {} + ) { + } public function __invoke(AccompanyingPeriodStepChangeRequestMessage $message): void { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php index 25a739ce0..b0fe4c5b2 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php @@ -30,7 +30,8 @@ class AccompanyingPeriodStepChanger private readonly EntityManagerInterface $entityManager, private readonly LoggerInterface $logger, private readonly Registry $workflowRegistry, - ) {} + ) { + } public function __invoke(AccompanyingPeriod $period, string $transition, string $workflowName = null): void { diff --git a/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php b/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php index ac3363db0..465807ebd 100644 --- a/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php +++ b/src/Bundle/ChillPersonBundle/Actions/ActionEvent.php @@ -52,7 +52,8 @@ class ActionEvent extends \Symfony\Contracts\EventDispatcher\Event * an array of key value data to describe the movement. */ protected $metadata = [] - ) {} + ) { + } /** * Add Sql which will be executed **after** the delete statement. diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php index f08bd7dff..b2deb17ca 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php @@ -19,7 +19,8 @@ class PersonMoveCenterHistoryHandler implements PersonMoveSqlHandlerInterface { public function __construct( private readonly PersonCenterHistoryRepository $centerHistoryRepository, - ) {} + ) { + } public function supports(string $className, string $field): bool { diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php index 292c805a0..48fa57b85 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php @@ -33,7 +33,8 @@ class PersonMove private readonly EntityManagerInterface $em, private readonly PersonMoveManager $personMoveManager, private readonly EventDispatcherInterface $eventDispatcher - ) {} + ) { + } /** * Return the sql used to move or delete entities associated to a person to diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php index 0c9230d90..230c2d4e2 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php @@ -20,7 +20,8 @@ class PersonMoveManager * @var iterable */ private readonly iterable $handlers, - ) {} + ) { + } /** * @param class-string $className diff --git a/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php b/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php index 3f233c174..d91c38f78 100644 --- a/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php +++ b/src/Bundle/ChillPersonBundle/Config/ConfigPersonAltNamesHelper.php @@ -24,7 +24,8 @@ class ConfigPersonAltNamesHelper * the raw config, directly from the container parameter. */ private $config - ) {} + ) { + } /** * get the choices as key => values. diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php index 7819ebb46..8efe73d92 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseApiController.php @@ -46,7 +46,9 @@ use Symfony\Component\Workflow\Registry; final class AccompanyingCourseApiController extends ApiController { - public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly AccompanyingPeriodACLAwareRepository $accompanyingPeriodACLAwareRepository, private readonly EventDispatcherInterface $eventDispatcher, private readonly ReferralsSuggestionInterface $referralAvailable, private readonly Registry $registry, private readonly ValidatorInterface $validator) {} + public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly AccompanyingPeriodACLAwareRepository $accompanyingPeriodACLAwareRepository, private readonly EventDispatcherInterface $eventDispatcher, private readonly ReferralsSuggestionInterface $referralAvailable, private readonly Registry $registry, private readonly ValidatorInterface $validator) + { + } public function commentApi($id, Request $request, string $_format): Response { diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php index 895011085..48e0e2cfa 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseCommentController.php @@ -30,7 +30,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AccompanyingCourseCommentController extends AbstractController { - public function __construct(private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly EntityManagerInterface $entityManager, private readonly FormFactoryInterface $formFactory, private readonly TranslatorInterface $translator) + { + } /** * Page of comments in Accompanying Course section. diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index af4da0bae..a2ced7fee 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -37,7 +37,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController { - public function __construct(protected SerializerInterface $serializer, protected EventDispatcherInterface $dispatcher, protected ValidatorInterface $validator, private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly Registry $registry, private readonly TranslatorInterface $translator) {} + public function __construct(protected SerializerInterface $serializer, protected EventDispatcherInterface $dispatcher, protected ValidatorInterface $validator, private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly Registry $registry, private readonly TranslatorInterface $translator) + { + } /** * @Route("/{_locale}/parcours/{accompanying_period_id}/close", name="chill_person_accompanying_course_close") diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php index 2a9e4e9da..47e46cb6b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkApiController.php @@ -21,7 +21,9 @@ use Symfony\Component\Routing\Annotation\Route; class AccompanyingCourseWorkApiController extends ApiController { - public function __construct(private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository) {} + public function __construct(private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository) + { + } /** * @Route("/api/1.0/person/accompanying-period/work/my-near-end") diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php index 89ec1ae17..5ae2db0e3 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php @@ -41,7 +41,8 @@ final class AccompanyingCourseWorkController extends AbstractController private readonly LoggerInterface $chillLogger, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory - ) {} + ) { + } /** * @Route( @@ -223,7 +224,7 @@ final class AccompanyingCourseWorkController extends AbstractController if (1 < count($types)) { $filterBuilder - ->addEntityChoice('typesFilter', 'accompanying_course_work.types_filter', \Chill\PersonBundle\Entity\SocialWork\SocialAction::class, $types, [ + ->addEntityChoice('typesFilter', 'accompanying_course_work.types_filter', SocialAction::class, $types, [ 'choice_label' => fn (SocialAction $sa) => $this->translatableStringHelper->localize($sa->getTitle()), ]); } diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php index 21378b9d7..5855692f1 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php @@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security; class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } /** * @Route( diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php index 55b985b85..e515dc57e 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodController.php @@ -39,7 +39,8 @@ class AccompanyingPeriodController extends AbstractController private readonly EventDispatcherInterface $eventDispatcher, private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator - ) {} + ) { + } /** * @throws \Exception @@ -431,7 +432,7 @@ class AccompanyingPeriodController extends AbstractController private function _getPerson(int $id): Person { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($id); + ->getRepository(Person::class)->find($id); if (null === $person) { throw $this->createNotFoundException('Person not found'); diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodRegulationListController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodRegulationListController.php index f5516114f..0c81e21b9 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodRegulationListController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodRegulationListController.php @@ -31,7 +31,9 @@ use Symfony\Component\Security\Core\Security; class AccompanyingPeriodRegulationListController { - public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } /** * @Route("/{_locale}/person/periods/undispatched", name="chill_person_course_list_regulation") diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php index 60b8e9cff..aa9a265e2 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingPeriodWorkEvaluationApiController.php @@ -29,7 +29,9 @@ use Symfony\Component\Serializer\SerializerInterface; class AccompanyingPeriodWorkEvaluationApiController { - public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security) {} + public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $accompanyingPeriodWorkEvaluationRepository, private readonly DocGeneratorTemplateRepository $docGeneratorTemplateRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security) + { + } /** * @Route("/api/1.0/person/docgen/template/by-evaluation/{id}.{_format}", diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php index a5b1081d5..cea622fab 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdApiController.php @@ -31,7 +31,9 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class HouseholdApiController extends ApiController { - public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository) {} + public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly HouseholdRepository $householdRepository, private readonly HouseholdACLAwareRepositoryInterface $householdACLAwareRepository) + { + } /** * @Route("/api/1.0/person/household/by-address-reference/{id}.json", diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionController.php index 00503ab3e..9a9ffa86d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdCompositionController.php @@ -44,7 +44,8 @@ class HouseholdCompositionController extends AbstractController private readonly TranslatorInterface $translator, private readonly \Twig\Environment $engine, private readonly UrlGeneratorInterface $urlGenerator - ) {} + ) { + } /** * @Route("/{_locale}/person/household/{household_id}/composition/{composition_id}/delete", name="chill_person_household_composition_delete") diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php index c85edaaf7..0c488dba5 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdController.php @@ -34,7 +34,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class HouseholdController extends AbstractController { - public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security) {} + public function __construct(private readonly TranslatorInterface $translator, private readonly PositionRepository $positionRepository, private readonly SerializerInterface $serializer, private readonly Security $security) + { + } /** * @Route( diff --git a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php index 7f895d478..c37cf63c0 100644 --- a/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php +++ b/src/Bundle/ChillPersonBundle/Controller/HouseholdMemberController.php @@ -30,7 +30,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class HouseholdMemberController extends ApiController { - public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository) {} + public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly AccompanyingPeriodRepository $periodRepository) + { + } /** * @Route( diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php index 193aad950..c6ffd1fec 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonAddressController.php @@ -29,7 +29,9 @@ class PersonAddressController extends AbstractController /** * PersonAddressController constructor. */ - public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly ValidatorInterface $validator, private readonly TranslatorInterface $translator) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/address/create", name="chill_person_address_create", methods={"POST"}) @@ -37,7 +39,7 @@ class PersonAddressController extends AbstractController public function createAction(mixed $person_id, Request $request) { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->find($person_id); if (null === $person) { @@ -94,7 +96,7 @@ class PersonAddressController extends AbstractController public function editAction(mixed $person_id, mixed $address_id) { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->find($person_id); if (null === $person) { @@ -124,7 +126,7 @@ class PersonAddressController extends AbstractController public function listAction(mixed $person_id) { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->find($person_id); if (null === $person) { @@ -148,7 +150,7 @@ class PersonAddressController extends AbstractController public function newAction(mixed $person_id) { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->find($person_id); if (null === $person) { @@ -177,7 +179,7 @@ class PersonAddressController extends AbstractController public function updateAction(mixed $person_id, mixed $address_id, Request $request) { $person = $this->getDoctrine()->getManager() - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->find($person_id); if (null === $person) { diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonController.php b/src/Bundle/ChillPersonBundle/Controller/PersonController.php index f9c24d2d4..99c3899e6 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonController.php @@ -47,7 +47,8 @@ final class PersonController extends AbstractController private readonly ConfigPersonAltNamesHelper $configPersonAltNameHelper, private readonly ValidatorInterface $validator, private readonly EntityManagerInterface $em, - ) {} + ) { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/general/edit", name="chill_person_general_edit") @@ -106,7 +107,7 @@ final class PersonController extends AbstractController $cFGroup = null; $cFDefaultGroup = $this->em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsDefaultGroup::class) - ->findOneByEntity(\Chill\PersonBundle\Entity\Person::class); + ->findOneByEntity(Person::class); if ($cFDefaultGroup) { $cFGroup = $cFDefaultGroup->getCustomFieldsGroup(); @@ -281,7 +282,7 @@ final class PersonController extends AbstractController /** * easy getting a person by his id. * - * @return \Chill\PersonBundle\Entity\Person + * @return Person */ private function _getPerson(int $id) { diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php index 3b7188513..31965a498 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonDuplicateController.php @@ -32,7 +32,9 @@ use function count; class PersonDuplicateController extends \Symfony\Bundle\FrameworkBundle\Controller\AbstractController { - public function __construct(private readonly SimilarPersonMatcher $similarPersonMatcher, private readonly TranslatorInterface $translator, private readonly PersonRepository $personRepository, private readonly PersonMove $personMove, private readonly EventDispatcherInterface $eventDispatcher) {} + public function __construct(private readonly SimilarPersonMatcher $similarPersonMatcher, private readonly TranslatorInterface $translator, private readonly PersonRepository $personRepository, private readonly PersonMove $personMove, private readonly EventDispatcherInterface $eventDispatcher) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person1_id}/duplicate/{person2_id}/confirm", name="chill_person_duplicate_confirm") diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php index a9d60d18e..7a112371d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonResourceController.php @@ -25,7 +25,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PersonResourceController extends AbstractController { - public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly PersonResourceRepository $personResourceRepository, private readonly PersonRepository $personRepository, private readonly EntityManagerInterface $em, private readonly TranslatorInterface $translator) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/resources/{resource_id}/delete", name="chill_person_resource_delete") diff --git a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php index 03b6975b4..a83b831f1 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php @@ -39,7 +39,9 @@ use Symfony\Component\Validator\Constraints\NotNull; class ReassignAccompanyingPeriodController extends AbstractController { - public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository, private readonly UserRepository $userRepository, private readonly AccompanyingPeriodRepository $courseRepository, private readonly \Twig\Environment $engine, private readonly FormFactoryInterface $formFactory, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly UserRender $userRender, private readonly EntityManagerInterface $em) + { + } /** * @Route("/{_locale}/person/accompanying-periods/reassign", name="chill_course_list_reassign") diff --git a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php index 80cc8c79b..eac149245 100644 --- a/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/RelationshipApiController.php @@ -21,7 +21,9 @@ use Symfony\Component\Validator\Validator\ValidatorInterface; class RelationshipApiController extends ApiController { - public function __construct(private readonly ValidatorInterface $validator, private readonly RelationshipRepository $repository) {} + public function __construct(private readonly ValidatorInterface $validator, private readonly RelationshipRepository $repository) + { + } /** * @ParamConverter("person", options={"id": "person_id"}) diff --git a/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php b/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php index 4b8278f9d..6d2b92438 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ResidentialAddressController.php @@ -27,7 +27,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class ResidentialAddressController extends AbstractController { - public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository) {} + public function __construct(private readonly UrlGeneratorInterface $generator, private readonly TranslatorInterface $translator, private readonly ResidentialAddressRepository $residentialAddressRepository) + { + } /** * @Route("/{_locale}/person/residential-address/{id}/delete", name="chill_person_residential_address_delete") diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php index b97f2ed30..b6b7baf00 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkEvaluationApiController.php @@ -22,7 +22,9 @@ use Symfony\Component\Routing\Annotation\Route; class SocialWorkEvaluationApiController extends AbstractController { - public function __construct(private readonly PaginatorFactory $paginatorFactory) {} + public function __construct(private readonly PaginatorFactory $paginatorFactory) + { + } /** * @Route("/api/1.0/person/social-work/evaluation/by-social-action/{action_id}.json", diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php index 2a7f39712..cbbd9a748 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkGoalApiController.php @@ -21,7 +21,9 @@ use Symfony\Component\HttpFoundation\Response; class SocialWorkGoalApiController extends ApiController { - public function __construct(private readonly GoalRepository $goalRepository, private readonly PaginatorFactory $paginator) {} + public function __construct(private readonly GoalRepository $goalRepository, private readonly PaginatorFactory $paginator) + { + } public function listBySocialAction(Request $request, SocialAction $action): Response { diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php index 9b97d8129..aaedfd330 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkResultApiController.php @@ -21,7 +21,9 @@ use Symfony\Component\HttpFoundation\Response; class SocialWorkResultApiController extends ApiController { - public function __construct(private readonly ResultRepository $resultRepository) {} + public function __construct(private readonly ResultRepository $resultRepository) + { + } public function listByGoal(Request $request, Goal $goal): Response { diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php index 6b341e926..5ecc41a4c 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php @@ -26,7 +26,8 @@ final class SocialWorkSocialActionApiController extends ApiController private readonly SocialIssueRepository $socialIssueRepository, private readonly PaginatorFactory $paginator, private readonly ClockInterface $clock, - ) {} + ) { + } public function listBySocialIssueApi($id, Request $request) { diff --git a/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php b/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php index 21792444e..c271f22f4 100644 --- a/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php +++ b/src/Bundle/ChillPersonBundle/Controller/TimelinePersonController.php @@ -22,7 +22,9 @@ use Symfony\Component\HttpFoundation\Request; class TimelinePersonController extends AbstractController { - public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory) {} + public function __construct(protected EventDispatcherInterface $eventDispatcher, protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory) + { + } /** * @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/person/{person_id}/timeline", name="chill_person_timeline") diff --git a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php index 1f484fd91..d5dd41e5b 100644 --- a/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/UserAccompanyingPeriodController.php @@ -21,7 +21,9 @@ use Symfony\Component\Routing\Annotation\Route; class UserAccompanyingPeriodController extends AbstractController { - public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly PaginatorFactory $paginatorFactory) {} + public function __construct(private readonly AccompanyingPeriodRepository $accompanyingPeriodRepository, private readonly PaginatorFactory $paginatorFactory) + { + } /** * @Route("/{_locale}/person/accompanying-periods/my", name="chill_person_accompanying_period_user") diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php index 44992ebef..63000093e 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadAccompanyingPeriodWork.php @@ -26,7 +26,9 @@ class LoadAccompanyingPeriodWork extends \Doctrine\Bundle\FixturesBundle\Fixture */ private array $cacheEvaluations = []; - public function __construct(private readonly AccompanyingPeriodRepository $periodRepository, private readonly EvaluationRepository $evaluationRepository) {} + public function __construct(private readonly AccompanyingPeriodRepository $periodRepository, private readonly EvaluationRepository $evaluationRepository) + { + } public function getDependencies() { diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php index 30aa345e7..47548ff2c 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php @@ -37,7 +37,8 @@ class LoadCustomFields extends AbstractFixture implements OrderedFixtureInterfac private readonly EntityManagerInterface $entityManager, private readonly CustomFieldChoice $customFieldChoice, private readonly CustomFieldText $customFieldText, - ) {} + ) { + } // put your code here public function getOrder() diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php index 3efcc6386..8fff20a39 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadRelationships.php @@ -24,7 +24,9 @@ class LoadRelationships extends Fixture implements DependentFixtureInterface { use PersonRandomHelper; - public function __construct(private readonly EntityManagerInterface $em) {} + public function __construct(private readonly EntityManagerInterface $em) + { + } public function getDependencies(): array { diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php index dc1e7b4dd..9c04d73cd 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadSocialWorkMetadata.php @@ -19,7 +19,9 @@ use League\Csv\Reader; class LoadSocialWorkMetadata extends Fixture implements OrderedFixtureInterface { - public function __construct(private readonly SocialWorkMetadata $importer) {} + public function __construct(private readonly SocialWorkMetadata $importer) + { + } public function getOrder() { diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index c5d7a026b..18861e01f 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -401,16 +401,16 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], 'apis' => [ [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod::class, + 'class' => AccompanyingPeriod::class, 'name' => 'accompanying_course', 'base_path' => '/api/1.0/person/accompanying-course', 'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseApiController::class, 'actions' => [ '_entity' => [ 'roles' => [ - Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_PUT => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_GET => AccompanyingPeriodVoter::SEE, + Request::METHOD_PATCH => AccompanyingPeriodVoter::SEE, + Request::METHOD_PUT => AccompanyingPeriodVoter::SEE, ], 'methods' => [ Request::METHOD_GET => true, @@ -426,8 +426,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'resource' => [ @@ -438,8 +438,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'comment' => [ @@ -450,8 +450,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'requestor' => [ @@ -462,8 +462,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'scope' => [ @@ -474,8 +474,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'socialissue' => [ @@ -487,8 +487,8 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], 'controller_action' => 'socialIssueApi', 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, - Request::METHOD_DELETE => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, + Request::METHOD_DELETE => AccompanyingPeriodVoter::SEE, ], ], 'work' => [ @@ -500,7 +500,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], 'controller_action' => 'workApi', 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, Request::METHOD_DELETE => 'ALWAYS_FAILS', ], ], @@ -511,7 +511,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_HEAD => false, ], 'roles' => [ - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter::SEE, + Request::METHOD_POST => AccompanyingPeriodVoter::SEE, ], ], // 'confidential' => [ @@ -618,7 +618,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'class' => \Chill\PersonBundle\Entity\Person::class, 'name' => 'person', 'base_path' => '/api/1.0/person/person', - 'base_role' => \Chill\PersonBundle\Security\Authorization\PersonVoter::SEE, + 'base_role' => PersonVoter::SEE, 'controller' => \Chill\PersonBundle\Controller\PersonApiController::class, 'actions' => [ '_entity' => [ @@ -629,10 +629,10 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac Request::METHOD_PATCH => true, ], 'roles' => [ - Request::METHOD_GET => \Chill\PersonBundle\Security\Authorization\PersonVoter::SEE, - Request::METHOD_HEAD => \Chill\PersonBundle\Security\Authorization\PersonVoter::SEE, - Request::METHOD_POST => \Chill\PersonBundle\Security\Authorization\PersonVoter::CREATE, - Request::METHOD_PATCH => \Chill\PersonBundle\Security\Authorization\PersonVoter::CREATE, + Request::METHOD_GET => PersonVoter::SEE, + Request::METHOD_HEAD => PersonVoter::SEE, + Request::METHOD_POST => PersonVoter::CREATE, + Request::METHOD_PATCH => PersonVoter::CREATE, ], ], 'address' => [ @@ -1001,7 +1001,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac 'property' => 'step', ], 'supports' => [ - \Chill\PersonBundle\Entity\AccompanyingPeriod::class, + AccompanyingPeriod::class, ], 'initial_marking' => 'DRAFT', 'places' => [ diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php index d68292927..fe552dfe0 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php @@ -84,5 +84,6 @@ class AccompanyingPeriodInfo * @ORM\Column(type="text") */ public readonly string $discriminator, - ) {} + ) { + } } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkReferrerHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkReferrerHistory.php index 0086faab2..8ce1c7749 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkReferrerHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkReferrerHistory.php @@ -59,7 +59,8 @@ class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, T * @ORM\Column(type="date_immutable", nullable=false) */ private \DateTimeImmutable $startDate - ) {} + ) { + } public function getId(): ?int { diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php index ab9ca7c7d..41b798a3f 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php @@ -58,7 +58,8 @@ class UserHistory implements TrackCreationInterface * @ORM\Column(type="datetime_immutable", nullable=false, options={"default": "now()"}) */ private \DateTimeImmutable $startDate = new \DateTimeImmutable('now') - ) {} + ) { + } public function getAccompanyingPeriod(): AccompanyingPeriod { diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 57c1a0314..db06be0f4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -532,7 +532,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI */ public function __construct() { - $this->calendars = new \Doctrine\Common\Collections\ArrayCollection(); + $this->calendars = new ArrayCollection(); $this->accompanyingPeriodParticipations = new ArrayCollection(); $this->spokenLanguages = new ArrayCollection(); $this->addresses = new ArrayCollection(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterHistory.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterHistory.php index 04cad642b..89ee1f5af 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterHistory.php @@ -59,7 +59,8 @@ class PersonCenterHistory implements TrackCreationInterface, TrackUpdateInterfac * @ORM\Column(type="date_immutable", nullable=false) */ private ?\DateTimeImmutable $startDate = null - ) {} + ) { + } public function getCenter(): ?Center { diff --git a/src/Bundle/ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php b/src/Bundle/ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php index cf15018fd..a65f68102 100644 --- a/src/Bundle/ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php +++ b/src/Bundle/ChillPersonBundle/Event/Person/PersonAddressMoveEvent.php @@ -29,7 +29,9 @@ class PersonAddressMoveEvent extends Event private ?HouseholdMember $previousMembership = null; - public function __construct(private readonly Person $person) {} + public function __construct(private readonly Person $person) + { + } /** * Get the date of the move. diff --git a/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php b/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php index c6b366fc8..60d521424 100644 --- a/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php +++ b/src/Bundle/ChillPersonBundle/EventListener/AccompanyingPeriodWorkEventListener.php @@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security; class AccompanyingPeriodWorkEventListener { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } public function prePersistAccompanyingPeriodWork(AccompanyingPeriodWork $work): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php index 522b2ecdd..6d15566af 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class AdministrativeLocationAggregator implements AggregatorInterface { - public function __construct(private readonly LocationRepository $locationRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly LocationRepository $locationRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php index 259d5fb66..9ea9998b3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ClosingMotiveAggregator implements AggregatorInterface { - public function __construct(private readonly ClosingMotiveRepositoryInterface $motiveRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly ClosingMotiveRepositoryInterface $motiveRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index 0e3e5f735..3c404c513 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class ConfidentialAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php index 32afe5247..53906931a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php @@ -28,7 +28,8 @@ class CreatorJobAggregator implements AggregatorInterface public function __construct( private readonly UserJobRepository $jobRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -79,7 +80,9 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php index f5dc99115..f0dbec2c4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php @@ -26,7 +26,9 @@ final readonly class DurationAggregator implements AggregatorInterface 'day', ]; - public function __construct(private TranslatorInterface $translator) {} + public function __construct(private TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index 0217166d2..c215eeb6a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class EmergencyAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index a90896ccd..de2f9305e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class EvaluationAggregator implements AggregatorInterface { - public function __construct(private EvaluationRepository $evaluationRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private EvaluationRepository $evaluationRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php index 3fa612988..2d6dbeae4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php @@ -28,7 +28,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class GeographicalUnitStatAggregator implements AggregatorInterface { - public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private TranslatableStringHelperInterface $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index de42039c1..d7dff6265 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class IntensityAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php index 69f443300..bb2df08d3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php @@ -28,7 +28,8 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface public function __construct( private UserJobRepositoryInterface $userJobRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { @@ -72,7 +73,9 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index 823b10d86..78349dd56 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -27,7 +27,9 @@ final readonly class ReferrerAggregator implements AggregatorInterface private const P = 'acp_ref_agg_date'; - public function __construct(private UserRepository $userRepository, private UserRender $userRender, private RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private UserRepository $userRepository, private UserRender $userRender, private RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php index 9f58b6539..b0a44bcd1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php @@ -27,7 +27,8 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface public function __construct( private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { @@ -78,7 +79,9 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php index ec168ceaf..824d7431f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class RequestorAggregator implements AggregatorInterface { - public function __construct(private TranslatorInterface $translator) {} + public function __construct(private TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index 06dbc906d..d7cdfbab1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class ScopeAggregator implements AggregatorInterface { - public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php index 8b3466158..7248b5b98 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php @@ -28,7 +28,8 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa public function __construct( private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { @@ -72,7 +73,9 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index 7abad2602..4459d634a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class SocialActionAggregator implements AggregatorInterface { - public function __construct(private SocialActionRender $actionRender, private SocialActionRepository $actionRepository) {} + public function __construct(private SocialActionRender $actionRender, private SocialActionRepository $actionRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php index 8c0cbfbd5..02746f82a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class SocialIssueAggregator implements AggregatorInterface { - public function __construct(private SocialIssueRepository $issueRepository, private SocialIssueRender $issueRender) {} + public function __construct(private SocialIssueRepository $issueRepository, private SocialIssueRender $issueRender) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index a9439a63f..5623a7212 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -27,7 +27,9 @@ final readonly class StepAggregator implements AggregatorInterface private const P = 'acp_step_agg_date'; - public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator) {} + public function __construct(private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php index 0702edf6f..0bf536929 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php @@ -27,7 +27,8 @@ final readonly class UserJobAggregator implements AggregatorInterface public function __construct( private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -78,7 +79,9 @@ final readonly class UserJobAggregator implements AggregatorInterface return Declarations::ACP_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php index b27477fd8..f9b033784 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php @@ -27,7 +27,8 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac public function __construct( private UserRender $userRender, private UserRepositoryInterface $userRepository, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index 9ff2ad50a..593e23420 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class EvaluationTypeAggregator implements AggregatorInterface { - public function __construct(private readonly EvaluationRepository $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly EvaluationRepository $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php index 4dfddab81..8960cbd86 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class HavingEndDateAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index 730c570a1..4b13bd477 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ChildrenNumberAggregator implements AggregatorInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 3dc3a1398..45263dd52 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -24,7 +24,9 @@ use Symfony\Component\Form\FormBuilderInterface; class CompositionAggregator implements AggregatorInterface { - public function __construct(private readonly HouseholdCompositionTypeRepository $typeRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly HouseholdCompositionTypeRepository $typeRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php index 2ca286b57..68ed28492 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php @@ -24,7 +24,8 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php index af1018f6e..06647dbc7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php @@ -27,7 +27,9 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface { private const PREFIX = 'acp_by_household_compo_agg'; - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php index 4881241f4..79d28c24e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php @@ -27,7 +27,8 @@ final readonly class CenterAggregator implements AggregatorInterface public function __construct( private CenterRepositoryInterface $centerRepository, private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index b8d204dc5..e54714d7a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -25,7 +25,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class CountryOfBirthAggregator implements AggregatorInterface, ExportElementValidatedInterface { - public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator) {} + public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php index 0181c6e7b..05a9273e5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php @@ -20,7 +20,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class GenderAggregator implements AggregatorInterface { - public function __construct(private TranslatorInterface $translator) {} + public function __construct(private TranslatorInterface $translator) + { + } public function addRole(): ?string { @@ -39,7 +41,9 @@ final readonly class GenderAggregator implements AggregatorInterface return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php index 8ce51a3ab..8691f8cd3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php @@ -26,7 +26,9 @@ use Symfony\Component\Form\FormBuilderInterface; class GeographicalUnitAggregator implements AggregatorInterface { - public function __construct(private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index eb1e52d9b..f44b949dc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -28,7 +28,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class HouseholdPositionAggregator implements AggregatorInterface, ExportElementValidatedInterface { - public function __construct(private TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper, private PositionRepository $positionRepository, private RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private TranslatorInterface $translator, private TranslatableStringHelper $translatableStringHelper, private PositionRepository $positionRepository, private RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 1555a5a12..c0f86ea25 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class MaritalStatusAggregator implements AggregatorInterface { - public function __construct(private MaritalStatusRepository $maritalStatusRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private MaritalStatusRepository $maritalStatusRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index 9daca5b34..bc11565e4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -24,7 +24,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final readonly class NationalityAggregator implements AggregatorInterface, ExportElementValidatedInterface { - public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator) {} + public function __construct(private CountryRepository $countriesRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php index 6f8978ad4..abb8b0e27 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php @@ -26,7 +26,8 @@ final readonly class PostalCodeAggregator implements AggregatorInterface public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php index 9abf5c1e7..901bd1cb6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class ActionTypeAggregator implements AggregatorInterface { - public function __construct(private SocialActionRepository $socialActionRepository, private SocialActionRender $actionRender, private SocialIssueRender $socialIssueRender, private SocialIssueRepository $socialIssueRepository) {} + public function __construct(private SocialActionRepository $socialActionRepository, private SocialActionRender $actionRender, private SocialIssueRender $socialIssueRender, private SocialIssueRepository $socialIssueRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php index f7c203a4e..d879e42f5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php @@ -25,7 +25,8 @@ class CreatorAggregator implements AggregatorInterface public function __construct( private readonly UserRepository $userRepository, private readonly UserRender $userRender - ) {} + ) { + } public function addRole(): ?string { @@ -46,7 +47,9 @@ class CreatorAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php index 1f7fdca5a..ea4499e1d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php @@ -27,7 +27,8 @@ class CreatorJobAggregator implements AggregatorInterface public function __construct( private readonly UserJobRepository $jobRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -63,7 +64,9 @@ class CreatorJobAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php index c57607693..6654212b0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php @@ -27,7 +27,8 @@ class CreatorScopeAggregator implements AggregatorInterface public function __construct( private readonly ScopeRepository $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -63,7 +64,9 @@ class CreatorScopeAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php index a9f8e020a..95e1b8518 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php @@ -19,7 +19,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class CurrentActionAggregator implements AggregatorInterface { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php index ce1e381f2..84367578e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class GoalAggregator implements AggregatorInterface { - public function __construct(private GoalRepository $goalRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private GoalRepository $goalRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php index e1549f315..de4e1d46e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class GoalResultAggregator implements AggregatorInterface { - public function __construct(private readonly ResultRepository $resultRepository, private readonly GoalRepository $goalRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly ResultRepository $resultRepository, private readonly GoalRepository $goalRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php index f58246a25..f02e05f4f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php @@ -25,7 +25,9 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface { private const PREFIX = 'acpw_handling3party_agg'; - public function __construct(private LabelThirdPartyHelper $labelThirdPartyHelper) {} + public function __construct(private LabelThirdPartyHelper $labelThirdPartyHelper) + { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index c8336b09b..1cd226e27 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -28,7 +28,8 @@ final readonly class JobAggregator implements AggregatorInterface public function __construct( private UserJobRepository $jobRepository, private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -58,7 +59,9 @@ final readonly class JobAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php index c97229048..9488cb091 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -29,7 +29,8 @@ final readonly class ReferrerAggregator implements AggregatorInterface private UserRepository $userRepository, private UserRender $userRender, private RollingDateConverterInterface $rollingDateConverter - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php index 63a037f21..53628d329 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class ResultAggregator implements AggregatorInterface { - public function __construct(private ResultRepository $resultRepository, private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private ResultRepository $resultRepository, private TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index dfffaa9e4..060712f6a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -28,7 +28,8 @@ final readonly class ScopeAggregator implements AggregatorInterface public function __construct( private ScopeRepository $scopeRepository, private TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { @@ -58,7 +59,9 @@ final readonly class ScopeAggregator implements AggregatorInterface return Declarations::SOCIAL_WORK_ACTION_TYPE; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php index ad3f8f745..209bf8889 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod.php @@ -34,7 +34,9 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod implements ExportInt $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php index 8d34837ae..db3b84ce7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/AvgDurationAPWorkPersonAssociatedOnWork.php @@ -34,7 +34,9 @@ class AvgDurationAPWorkPersonAssociatedOnWork implements ExportInterface, Groupe $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index 0cbe7b3e8..c5c66cd01 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -35,7 +35,9 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; } - public function buildForm(FormBuilderInterface $builder) {} + public function buildForm(FormBuilderInterface $builder) + { + } public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php index 7d0e52169..6c9efcfc3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php @@ -34,7 +34,8 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp private RollingDateConverterInterface $rollingDateConverter, private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php index 688681e97..6ebfa1bec 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeriod.php @@ -92,7 +92,8 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnAccompanyingPeri private readonly AggregateStringHelper $aggregateStringHelper, private readonly SocialActionRepository $socialActionRepository, private readonly FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php index ed64da7b0..f55f254b8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWorkAssociatePersonOnWork.php @@ -92,7 +92,8 @@ final readonly class ListAccompanyingPeriodWorkAssociatePersonOnWork implements private readonly AggregateStringHelper $aggregateStringHelper, private readonly SocialActionRepository $socialActionRepository, private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php index 71d9924be..fe707d56a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php @@ -81,7 +81,8 @@ final readonly class ListEvaluation implements ListInterface, GroupedExportInter private readonly AggregateStringHelper $aggregateStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter, private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index 1a1fd0316..a11df19c7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -135,7 +135,9 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return PersonVoter::DUPLICATE; } - public function validateForm($data, ExecutionContextInterface $context) {} + public function validateForm($data, ExecutionContextInterface $context) + { + } protected function getHeaders(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php index d283c8d8a..d29ba3fde 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php @@ -41,7 +41,8 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter, private FilterListAccompanyingPeriodHelperInterface $filterListAccompanyingPeriodHelper, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index 6bcb4f8b8..d34eb7a15 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ActiveOnDateFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index 3b7c4fe25..fb5d6dc02 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ActiveOneDayBetweenDatesFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 915a2c9e6..c79f94daf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -20,7 +20,9 @@ use Symfony\Component\Form\FormBuilderInterface; class AdministrativeLocationFilter implements FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php index 7fb032050..442dc505b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ClosingMotiveFilter implements FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index 4c8baf147..230267904 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -28,7 +28,9 @@ class ConfidentialFilter implements FilterInterface private const DEFAULT_CHOICE = 'false'; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php index cc7e21b08..790afc66b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php @@ -29,7 +29,8 @@ class CreatorJobFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelper $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index 671b87407..10528a007 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -28,7 +28,9 @@ class EmergencyFilter implements FilterInterface private const DEFAULT_CHOICE = 'false'; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php index bec01c249..95dcb5c62 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class EvaluationFilter implements FilterInterface { - public function __construct(private readonly EvaluationRepositoryInterface $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly EvaluationRepositoryInterface $evaluationRepository, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index 3b1183c99..ce193e1a4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -33,7 +33,9 @@ use Symfony\Component\Form\FormBuilderInterface; */ class GeographicalUnitStatFilter implements FilterInterface { - public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php index 8a9f734aa..818f7567a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HandlingThirdPartyFilter.php @@ -26,7 +26,8 @@ final readonly class HandlingThirdPartyFilter implements FilterInterface public function __construct( private ThirdPartyRender $thirdPartyRender, - ) {} + ) { + } public function getTitle() { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php index 72bcce39e..7df3ff0d2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasNoReferrerFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class HasNoReferrerFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php index 88d1d6933..ca5ccaf27 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class HasTemporaryLocationFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php index d6436f8b4..b6a05a466 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php @@ -29,7 +29,8 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index 3eb8bbb24..d1d3de19d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -28,7 +28,9 @@ class IntensityFilter implements FilterInterface private const DEFAULT_CHOICE = 'occasional'; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php index 099320c95..8ba1b585d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php @@ -39,7 +39,8 @@ readonly class JobWorkingOnCourseFilter implements FilterInterface private UserJobRepositoryInterface $userJobRepository, private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index 1b85f6cd7..2427b1637 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class OpenBetweenDatesFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php index 617577cde..7ded268f6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class OriginFilter implements FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 30f67f664..22a4b560f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -28,7 +28,9 @@ class ReferrerFilter implements FilterInterface private const PU = 'acp_referrer_filter_users'; - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index 0b7ce6994..90f6953f1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -31,7 +31,9 @@ final readonly class RequestorFilter implements FilterInterface 'no requestor' => 'no_requestor', ]; - public function __construct(private TranslatorInterface $translator, private EntityManagerInterface $em) {} + public function __construct(private TranslatorInterface $translator, private EntityManagerInterface $em) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php index 403ddd0b5..9aec79c94 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php @@ -39,7 +39,8 @@ readonly class ScopeWorkingOnCourseFilter implements FilterInterface private ScopeRepositoryInterface $scopeRepository, private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelperInterface $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index dc5ffa042..702c7533c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -31,7 +31,8 @@ final readonly class SocialActionFilter implements FilterInterface private SocialActionRender $actionRender, private RollingDateConverterInterface $rollingDateConverter, private TranslatorInterface $translator - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php index dfd627eda..8b0a4c085 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterBetweenDates.php @@ -39,7 +39,9 @@ class StepFilterBetweenDates implements FilterInterface 'course.inactive_long' => AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG, ]; - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php index 8b36b1b5b..c88bf1e34 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilterOnDate.php @@ -43,7 +43,9 @@ class StepFilterOnDate implements FilterInterface 'course.inactive_long' => AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG, ]; - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php index 3c6c12c63..d6bc25198 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserJobFilter.php @@ -30,7 +30,8 @@ class UserJobFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelper $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php index e7ed194f1..bfbe8e66d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserScopeFilter.php @@ -30,7 +30,8 @@ class UserScopeFilter implements FilterInterface public function __construct( private readonly ScopeRepositoryInterface $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper, - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php index 85d5db9d6..af7674570 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php @@ -34,7 +34,8 @@ final readonly class UserWorkingOnCourseFilter implements FilterInterface public function __construct( private UserRender $userRender, private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php index a0d8d0033..3bb8eb417 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByEndDateFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByEndDateFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php index 401cd79a5..8c46fbfc2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/ByStartDateFilter.php @@ -21,7 +21,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByStartDateFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php index 20472420c..fce1600d1 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; final readonly class EvaluationTypeFilter implements FilterInterface { - public function __construct(private TranslatableStringHelper $translatableStringHelper, private EvaluationRepositoryInterface $evaluationRepository) {} + public function __construct(private TranslatableStringHelper $translatableStringHelper, private EvaluationRepositoryInterface $evaluationRepository) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index 6094d56ee..8555fbac9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -25,7 +25,9 @@ class MaxDateFilter implements FilterInterface 'maxdate is not specified' => false, ]; - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php index 733e41480..c35b9cc69 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php @@ -28,7 +28,8 @@ readonly class CompositionFilter implements FilterInterface public function __construct( private TranslatableStringHelper $translatableStringHelper, private RollingDateConverterInterface $rollingDateConverter - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php index 8cd675abe..7c79f473a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AddressRefStatusFilter.php @@ -23,7 +23,9 @@ use Symfony\Component\Form\FormBuilderInterface; class AddressRefStatusFilter implements \Chill\MainBundle\Export\FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php index aa97ad54c..1c34f90ee 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php @@ -25,7 +25,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class AgeFilter implements ExportElementValidatedInterface, FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php index dd14c71ef..45d190eee 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php @@ -24,7 +24,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php index e873a6598..77f4f758f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ByHouseholdCompositionFilter.php @@ -29,7 +29,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ByHouseholdCompositionFilter implements FilterInterface { - public function __construct(private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly HouseholdCompositionTypeRepositoryInterface $householdCompositionTypeRepository, private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php index 82cda25ed..3cbd46a7b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php @@ -23,7 +23,9 @@ use Symfony\Component\Form\FormBuilderInterface; class DeadOrAliveFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index 1bc32d9bb..8caf64fbf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -24,7 +24,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class DeathdateFilter implements ExportElementValidatedInterface, FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php index e2041c3fa..a0aefe75b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GeographicalUnitFilter.php @@ -27,7 +27,9 @@ use Symfony\Component\Form\FormBuilderInterface; class GeographicalUnitFilter implements \Chill\MainBundle\Export\FilterInterface { - public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php index 6c4cdf802..d6af8204d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/MaritalStatusFilter.php @@ -19,7 +19,9 @@ use Symfony\Bridge\Doctrine\Form\Type\EntityType; class MaritalStatusFilter implements FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php index 4c83fafe3..556be8188 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php @@ -26,7 +26,9 @@ class NationalityFilter implements ExportElementValidatedInterface, FilterInterface { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php index ea8e01baf..ff511fe91 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php @@ -26,7 +26,9 @@ use Symfony\Component\Form\FormBuilderInterface; class ResidentialAddressAtThirdpartyFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php index 3c2d7a3a6..acd5ede84 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php @@ -23,7 +23,9 @@ use Doctrine\ORM\QueryBuilder; class ResidentialAddressAtUserFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php index c34c7eb40..079040b7f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithoutHouseholdComposition.php @@ -24,7 +24,9 @@ use Symfony\Component\Form\FormBuilderInterface; class WithoutHouseholdComposition implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php index 32bbbaf6e..92258ccf9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php @@ -24,7 +24,8 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php index 880543355..7b404796e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php @@ -24,7 +24,8 @@ final readonly class AccompanyingPeriodWorkStartDateBetweenDateFilter implements { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php index 2b7a6ef07..d413cdb37 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorJobFilter.php @@ -29,7 +29,8 @@ class CreatorJobFilter implements FilterInterface public function __construct( private readonly UserJobRepository $userJobRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php index 16ed52755..cedae69f6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/CreatorScopeFilter.php @@ -29,7 +29,8 @@ class CreatorScopeFilter implements FilterInterface public function __construct( private readonly ScopeRepository $scopeRepository, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index d3e54f2a5..4622f61f9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -29,7 +29,8 @@ class JobFilter implements FilterInterface public function __construct( protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php index 4d456fdb2..3997139c2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -24,7 +24,9 @@ final readonly class ReferrerFilter implements FilterInterface { private const PREFIX = 'acpw_referrer_filter'; - public function __construct(private RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index d4867a884..2569c3d5b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -29,7 +29,8 @@ class ScopeFilter implements FilterInterface public function __construct( protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper - ) {} + ) { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index c84ed7f40..7204e6e11 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -26,7 +26,9 @@ use Symfony\Component\Form\FormBuilderInterface; class SocialWorkTypeFilter implements FilterInterface { - public function __construct(private readonly SocialActionRender $socialActionRender, private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly SocialActionRender $socialActionRender, private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php index 8f75d033c..567f2f7e6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php @@ -16,7 +16,9 @@ use Chill\PersonBundle\Templating\Entity\PersonRenderInterface; class LabelPersonHelper { - public function __construct(private readonly PersonRepository $personRepository, private readonly PersonRenderInterface $personRender) {} + public function __construct(private readonly PersonRepository $personRepository, private readonly PersonRenderInterface $personRender) + { + } public function getLabel(string $key, array $values, string $header): callable { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index 30233bb39..5865bb4da 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -79,7 +79,8 @@ final readonly class ListAccompanyingPeriodHelper private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator, private UserHelper $userHelper, - ) {} + ) { + } public function getQueryKeys($data) { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php index 576885f2d..eef69e4fc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php @@ -69,7 +69,9 @@ class ListPersonHelper 'lifecycleUpdate', ]; - public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CenterRepositoryInterface $centerRepository, private readonly CivilityRepositoryInterface $civilityRepository, private readonly CountryRepository $countryRepository, private readonly LanguageRepositoryInterface $languageRepository, private readonly MaritalStatusRepositoryInterface $maritalStatusRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator, private readonly UserRepositoryInterface $userRepository) {} + public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CenterRepositoryInterface $centerRepository, private readonly CivilityRepositoryInterface $civilityRepository, private readonly CountryRepository $countryRepository, private readonly LanguageRepositoryInterface $languageRepository, private readonly MaritalStatusRepositoryInterface $maritalStatusRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator, private readonly UserRepositoryInterface $userRepository) + { + } /** * Those keys are the "direct" keys, which are created when we decide to use to list all the keys. diff --git a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php index fd7ef3ecb..5116ff1b0 100644 --- a/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php +++ b/src/Bundle/ChillPersonBundle/Form/ClosingMotiveType.php @@ -26,7 +26,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; */ class ClosingMotiveType extends AbstractType { - public function __construct(private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatorInterface $translator) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php index 2df66039f..0fe60cbe9 100644 --- a/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php +++ b/src/Bundle/ChillPersonBundle/Form/HouseholdCompositionType.php @@ -22,7 +22,9 @@ use Symfony\Component\Form\FormBuilderInterface; class HouseholdCompositionType extends AbstractType { - public function __construct(private readonly HouseholdCompositionTypeRepository $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly HouseholdCompositionTypeRepository $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php index 2063b0e21..a4946b52d 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonResourceType.php @@ -29,7 +29,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; final class PersonResourceType extends AbstractType { - public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php index 0d7a3bb4b..cce3ca46d 100644 --- a/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php +++ b/src/Bundle/ChillPersonBundle/Form/SocialWork/SocialIssueType.php @@ -23,7 +23,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class SocialIssueType extends AbstractType { - public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(protected TranslatableStringHelperInterface $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php index 6d983be37..17aad8bd0 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonAltNameType.php @@ -21,7 +21,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PersonAltNameType extends AbstractType { - public function __construct(private readonly ConfigPersonAltNamesHelper $configHelper, private readonly TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private readonly ConfigPersonAltNamesHelper $configHelper, private readonly TranslatableStringHelper $translatableStringHelper) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php index 0e84bfc83..a55721011 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PersonPhoneType.php @@ -24,7 +24,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PersonPhoneType extends AbstractType { - public function __construct(private readonly PhonenumberHelper $phonenumberHelper, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly PhonenumberHelper $phonenumberHelper, private readonly EntityManagerInterface $em) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php index c14472cdd..440b6568c 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php @@ -26,7 +26,9 @@ use Symfony\Component\Serializer\SerializerInterface; */ class PickPersonDynamicType extends AbstractType { - public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php index 19258f23d..0fe09e56a 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialActionType.php @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickSocialActionType extends AbstractType { - public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) {} + public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php index b61343423..3e6ae1e97 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickSocialIssueType.php @@ -20,7 +20,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class PickSocialIssueType extends AbstractType { - public function __construct(private readonly SocialIssueRender $issueRender, private readonly SocialIssueRepository $issueRepository) {} + public function __construct(private readonly SocialIssueRender $issueRender, private readonly SocialIssueRepository $issueRepository) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php index b820aa86f..c33244635 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/Select2MaritalStatusType.php @@ -25,17 +25,19 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class Select2MaritalStatusType extends AbstractType { - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { - $transformer = new ObjectToIdTransformer($this->em, \Chill\PersonBundle\Entity\MaritalStatus::class); + $transformer = new ObjectToIdTransformer($this->em, MaritalStatus::class); $builder->addModelTransformer($transformer); } public function configureOptions(OptionsResolver $resolver) { - $maritalStatuses = $this->em->getRepository(\Chill\PersonBundle\Entity\MaritalStatus::class)->findAll(); + $maritalStatuses = $this->em->getRepository(MaritalStatus::class)->findAll(); $choices = []; foreach ($maritalStatuses as $ms) { diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php index 3f89202e1..c4be4ba5e 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php @@ -42,7 +42,8 @@ class MembersEditor private readonly ValidatorInterface $validator, private readonly ?Household $household, private readonly EventDispatcherInterface $eventDispatcher - ) {} + ) { + } /** * Add a person to the household. diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php index 7f98fe120..16e25bc63 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php @@ -17,7 +17,9 @@ use Symfony\Contracts\EventDispatcher\EventDispatcherInterface; class MembersEditorFactory { - public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly ValidatorInterface $validator) {} + public function __construct(private readonly EventDispatcherInterface $eventDispatcher, private readonly ValidatorInterface $validator) + { + } public function createEditor(Household $household = null): MembersEditor { diff --git a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php index c82038b40..870f021f5 100644 --- a/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php +++ b/src/Bundle/ChillPersonBundle/Menu/SectionMenuBuilder.php @@ -28,7 +28,9 @@ class SectionMenuBuilder implements LocalMenuBuilderInterface /** * SectionMenuBuilder constructor. */ - public function __construct(protected ParameterBagInterface $parameterBag, private readonly Security $security, protected TranslatorInterface $translator) {} + public function __construct(protected ParameterBagInterface $parameterBag, private readonly Security $security, protected TranslatorInterface $translator) + { + } public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php index 668f868ae..4f1146391 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodNotificationHandler.php @@ -18,7 +18,9 @@ use Chill\PersonBundle\Repository\AccompanyingPeriodRepository; final readonly class AccompanyingPeriodNotificationHandler implements NotificationHandlerInterface { - public function __construct(private AccompanyingPeriodRepository $accompanyingPeriodRepository) {} + public function __construct(private AccompanyingPeriodRepository $accompanyingPeriodRepository) + { + } public function getTemplate(Notification $notification, array $options = []): string { diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php index 40aff8570..f69c49071 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkEvaluationDocumentNotificationHandler.php @@ -18,7 +18,9 @@ use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkEvalu final readonly class AccompanyingPeriodWorkEvaluationDocumentNotificationHandler implements NotificationHandlerInterface { - public function __construct(private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository) {} + public function __construct(private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository) + { + } public function getTemplate(Notification $notification, array $options = []): string { diff --git a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php index e147fa520..abb8123bc 100644 --- a/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php +++ b/src/Bundle/ChillPersonBundle/Notification/AccompanyingPeriodWorkNotificationHandler.php @@ -18,7 +18,9 @@ use Chill\PersonBundle\Repository\AccompanyingPeriod\AccompanyingPeriodWorkRepos final readonly class AccompanyingPeriodWorkNotificationHandler implements NotificationHandlerInterface { - public function __construct(private AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository) {} + public function __construct(private AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository) + { + } public function getTemplate(Notification $notification, array $options = []): string { diff --git a/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php b/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php index 739387941..f6619317f 100644 --- a/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php +++ b/src/Bundle/ChillPersonBundle/Privacy/AccompanyingPeriodPrivacyEvent.php @@ -37,7 +37,9 @@ class AccompanyingPeriodPrivacyEvent extends \Symfony\Contracts\EventDispatcher\ { final public const ACCOMPANYING_PERIOD_PRIVACY_EVENT = 'chill_person.accompanying_period_privacy_event'; - public function __construct(protected $period, protected $args = []) {} + public function __construct(protected $period, protected $args = []) + { + } public function getArgs(): array { diff --git a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php index df57a08fd..4e728c635 100644 --- a/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php +++ b/src/Bundle/ChillPersonBundle/Privacy/PrivacyEvent.php @@ -48,7 +48,9 @@ class PrivacyEvent extends \Symfony\Contracts\EventDispatcher\Event /** * PrivacyEvent constructor. */ - public function __construct(private readonly Person $person, private readonly array $args = ['action' => 'show']) {} + public function __construct(private readonly Person $person, private readonly array $args = ['action' => 'show']) + { + } public function addPerson(Person $person) { diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php index 0a43697c8..b50a1b18e 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php @@ -40,7 +40,8 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin private Security $security, private AuthorizationHelperForCurrentUserInterface $authorizationHelper, private CenterResolverManagerInterface $centerResolver - ) {} + ) { + } public function buildQueryOpenedAccompanyingCourseByUserAndPostalCodes(?User $user, array $postalCodes = []): QueryBuilder { diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php index 26121ffdc..6460ba958 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdACLAwareRepository.php @@ -21,7 +21,9 @@ use Symfony\Component\Security\Core\Security; final readonly class HouseholdACLAwareRepository implements HouseholdACLAwareRepositoryInterface { - public function __construct(private EntityManagerInterface $em, private AuthorizationHelper $authorizationHelper, private Security $security) {} + public function __construct(private EntityManagerInterface $em, private AuthorizationHelper $authorizationHelper, private Security $security) + { + } public function addACL(QueryBuilder $qb, string $alias = 'h'): QueryBuilder { diff --git a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php index fc5d0606d..c1bb427fd 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php @@ -13,4 +13,6 @@ namespace Chill\PersonBundle\Repository\Person; use Doctrine\Persistence\ObjectRepository; -interface PersonCenterHistoryInterface extends ObjectRepository {} +interface PersonCenterHistoryInterface extends ObjectRepository +{ +} diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php index 0b6b96339..7b6010718 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php @@ -25,7 +25,9 @@ use Symfony\Component\Security\Core\Security; final readonly class PersonACLAwareRepository implements PersonACLAwareRepositoryInterface { - public function __construct(private Security $security, private EntityManagerInterface $em, private CountryRepository $countryRepository, private AuthorizationHelperInterface $authorizationHelper) {} + public function __construct(private Security $security, private EntityManagerInterface $em, private CountryRepository $countryRepository, private AuthorizationHelperInterface $authorizationHelper) + { + } public function buildAuthorizedQuery( string $default = null, diff --git a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php index 9ca72ecac..b22253abe 100644 --- a/src/Bundle/ChillPersonBundle/Search/PersonSearch.php +++ b/src/Bundle/ChillPersonBundle/Search/PersonSearch.php @@ -36,7 +36,9 @@ class PersonSearch extends AbstractSearch implements HasAdvancedSearchFormInterf 'birthdate-after', 'gender', 'nationality', 'phonenumber', 'city', ]; - public function __construct(private readonly \Twig\Environment $templating, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern, private readonly PaginatorFactory $paginatorFactory, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository) {} + public function __construct(private readonly \Twig\Environment $templating, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern, private readonly PaginatorFactory $paginatorFactory, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository) + { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Search/SearchHouseholdApiProvider.php b/src/Bundle/ChillPersonBundle/Search/SearchHouseholdApiProvider.php index 6fdd66a84..1f04df11b 100644 --- a/src/Bundle/ChillPersonBundle/Search/SearchHouseholdApiProvider.php +++ b/src/Bundle/ChillPersonBundle/Search/SearchHouseholdApiProvider.php @@ -22,7 +22,9 @@ use Symfony\Component\Security\Core\Security; class SearchHouseholdApiProvider implements SearchApiInterface { - public function __construct(private readonly HouseholdRepository $householdRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern) {} + public function __construct(private readonly HouseholdRepository $householdRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern) + { + } public function getResult(string $key, array $metadata, float $pertinence) { diff --git a/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php index 8444a41ec..0d721c657 100644 --- a/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php +++ b/src/Bundle/ChillPersonBundle/Search/SearchPersonApiProvider.php @@ -22,7 +22,9 @@ use Symfony\Component\Security\Core\Security; class SearchPersonApiProvider implements SearchApiInterface { - public function __construct(private readonly PersonRepository $personRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern) {} + public function __construct(private readonly PersonRepository $personRepository, private readonly PersonACLAwareRepositoryInterface $personACLAwareRepository, private readonly Security $security, private readonly AuthorizationHelperInterface $authorizationHelper, private readonly ExtractDateFromPattern $extractDateFromPattern, private readonly ExtractPhonenumberFromPattern $extractPhonenumberFromPattern) + { + } public function getResult(string $key, array $metadata, float $pertinence) { diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php index 3bba4f5c5..383e76276 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodCommentVoter.php @@ -22,7 +22,9 @@ class AccompanyingPeriodCommentVoter extends Voter final public const EDIT = 'CHILL_PERSON_ACCOMPANYING_PERIOD_COMMENT_EDIT'; - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php index 5750a7b58..5a59e6b4b 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodResourceVoter.php @@ -20,7 +20,9 @@ class AccompanyingPeriodResourceVoter extends Voter { final public const EDIT = 'CHILL_PERSON_ACCOMPANYING_PERIOD_RESOURCE_EDIT'; - public function __construct(private readonly AccessDecisionManagerInterface $accessDecisionManager) {} + public function __construct(private readonly AccessDecisionManagerInterface $accessDecisionManager) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationDocumentVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationDocumentVoter.php index 77c131cd9..eb49e0cbe 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationDocumentVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationDocumentVoter.php @@ -25,7 +25,9 @@ class AccompanyingPeriodWorkEvaluationDocumentVoter extends Voter { final public const SEE = 'CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_DOCUMENT_SHOW'; - public function __construct(private readonly AccessDecisionManagerInterface $accessDecisionManager) {} + public function __construct(private readonly AccessDecisionManagerInterface $accessDecisionManager) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php index ce5faca8d..41a464581 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/AccompanyingPeriodWorkEvaluationVoter.php @@ -28,7 +28,9 @@ class AccompanyingPeriodWorkEvaluationVoter extends Voter implements ChillVoterI final public const STATS = 'CHILL_MAIN_ACCOMPANYING_PERIOD_WORK_EVALUATION_STATS'; - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } protected function supports($attribute, $subject) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php index e266fe0ae..80480cd33 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodDocGenNormalizer.php @@ -71,7 +71,9 @@ class AccompanyingPeriodDocGenNormalizer implements ContextAwareNormalizerInterf 'pinnedComment' => AccompanyingPeriod\Comment::class, ]; - public function __construct(private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SocialIssueRender $socialIssueRender, private readonly ClosingMotiveRender $closingMotiveRender, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {} + public function __construct(private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SocialIssueRender $socialIssueRender, private readonly ClosingMotiveRender $closingMotiveRender, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) + { + } /** * @param AccompanyingPeriod|null $period diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php index 2e26e96c4..f5720e5bc 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodResourceNormalizer.php @@ -28,7 +28,9 @@ class AccompanyingPeriodResourceNormalizer implements DenormalizerAwareInterface use ObjectToPopulateTrait; - public function __construct(private readonly ResourceRepository $repository) {} + public function __construct(private readonly ResourceRepository $repository) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php index e5cd50f09..036b62ec0 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkDenormalizer.php @@ -35,7 +35,9 @@ class AccompanyingPeriodWorkDenormalizer implements ContextAwareDenormalizerInte final public const GROUP_EDIT = 'accompanying_period_work:edit'; - public function __construct(private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly EntityManagerInterface $em) {} + public function __construct(private readonly AccompanyingPeriodWorkRepository $workRepository, private readonly EntityManagerInterface $em) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php index 720bb9c03..d6cc4c25f 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php @@ -25,7 +25,9 @@ class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAware private const SKIP = 'accompanying_period_work_evaluation_document_skip'; - public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry) {} + public function __construct(private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor, private readonly Registry $registry) + { + } public function normalize($object, string $format = null, array $context = []): array { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php index 67c9209e5..39560883e 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php @@ -26,7 +26,9 @@ class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormaliz private const IGNORE_EVALUATION = 'evaluation:ignore'; - public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor) {} + public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor) + { + } /** * @param AccompanyingPeriodWorkEvaluation $object diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php index 3f0cd738e..361321f38 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php @@ -28,7 +28,9 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac private const IGNORE_WORK = 'ignore:work'; - public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor) {} + public function __construct(private readonly Registry $registry, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly MetadataExtractor $metadataExtractor) + { + } /** * @param AccompanyingPeriodWork $object diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php index 0e358483e..d9679a699 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/MembersEditorNormalizer.php @@ -27,7 +27,9 @@ class MembersEditorNormalizer implements DenormalizerAwareInterface, Denormalize { use DenormalizerAwareTrait; - public function __construct(private readonly MembersEditorFactory $factory) {} + public function __construct(private readonly MembersEditorFactory $factory) + { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php index c8f9cf455..2f2458c90 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonDocGenNormalizer.php @@ -40,7 +40,9 @@ class PersonDocGenNormalizer implements private const CIRCULAR_KEY = 'person:circular'; - public function __construct(private readonly PersonRenderInterface $personRender, private readonly RelationshipRepository $relationshipRepository, private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SummaryBudgetInterface $summaryBudget) {} + public function __construct(private readonly PersonRenderInterface $personRender, private readonly RelationshipRepository $relationshipRepository, private readonly TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly SummaryBudgetInterface $summaryBudget) + { + } public function normalize($person, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php index eae33f399..3d99adf17 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizer.php @@ -48,7 +48,8 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar private readonly CenterResolverManagerInterface $centerResolverManager, private readonly ResidentialAddressRepository $residentialAddressRepository, private readonly PhoneNumberHelperInterface $phoneNumberHelper - ) {} + ) { + } public function denormalize($data, $type, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php index 36ec86966..96f9ea934 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php @@ -19,4 +19,6 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; */ interface PersonJsonNormalizerInterface extends DenormalizerInterface, - NormalizerInterface {} + NormalizerInterface +{ +} diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php index 402f5ff03..78a6d8769 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/RelationshipDocGenNormalizer.php @@ -22,7 +22,9 @@ class RelationshipDocGenNormalizer implements ContextAwareNormalizerInterface, N { use NormalizerAwareTrait; - public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } /** * @param Relationship $relation diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php index 78a91bd9c..12c36b286 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialActionNormalizer.php @@ -21,7 +21,9 @@ class SocialActionNormalizer implements NormalizerAwareInterface, NormalizerInte { use NormalizerAwareTrait; - public function __construct(private readonly SocialActionRender $render) {} + public function __construct(private readonly SocialActionRender $render) + { + } public function normalize($socialAction, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php index 778336d2b..e2a60b20c 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/SocialIssueNormalizer.php @@ -21,7 +21,9 @@ class SocialIssueNormalizer implements ContextAwareNormalizerInterface, Normaliz { use NormalizerAwareTrait; - public function __construct(private readonly SocialIssueRender $render) {} + public function __construct(private readonly SocialIssueRender $render) + { + } public function normalize($socialIssue, $format = null, array $context = []) { diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php index 41666e576..cfd310013 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php @@ -25,7 +25,9 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA private const IGNORE_ENTITY_WORKFLOW = 'ignore:entity_workflow'; - public function __construct(private readonly Registry $registry, private readonly MetadataExtractor $metadataExtractor) {} + public function __construct(private readonly Registry $registry, private readonly MetadataExtractor $metadataExtractor) + { + } /** * @param EntityWorkflow $object diff --git a/src/Bundle/ChillPersonBundle/Service/AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php b/src/Bundle/ChillPersonBundle/Service/AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php index 44d2e38d5..d82156994 100644 --- a/src/Bundle/ChillPersonBundle/Service/AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php +++ b/src/Bundle/ChillPersonBundle/Service/AccompanyingPeriod/OldDraftAccompanyingPeriodRemover.php @@ -20,7 +20,9 @@ use Psr\Log\LoggerInterface; class OldDraftAccompanyingPeriodRemover implements OldDraftAccompanyingPeriodRemoverInterface { - public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger) {} + public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger) + { + } public function remove(\DateInterval $interval): void { diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php index b01e7c5f3..592ab21fb 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodContext.php @@ -60,7 +60,8 @@ class AccompanyingPeriodContext implements private readonly BaseContextData $baseContextData, private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository - ) {} + ) { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkContext.php index 4c1be8159..c3f754eab 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkContext.php @@ -29,7 +29,9 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; */ class AccompanyingPeriodWorkContext implements DocGeneratorContextWithPublicFormInterface { - public function __construct(private readonly AccompanyingPeriodContext $periodContext, private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly AccompanyingPeriodContext $periodContext, private readonly NormalizerInterface $normalizer) + { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php index 6ecaa99b4..8887e65c9 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/AccompanyingPeriodWorkEvaluationContext.php @@ -37,7 +37,9 @@ class AccompanyingPeriodWorkEvaluationContext implements DocGeneratorContextWithAdminFormInterface, DocGeneratorContextWithPublicFormInterface { - public function __construct(private readonly AccompanyingPeriodWorkContext $accompanyingPeriodWorkContext, private readonly EntityManagerInterface $em, private readonly EvaluationRepository $evaluationRepository, private readonly NormalizerInterface $normalizer, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly AccompanyingPeriodWorkContext $accompanyingPeriodWorkContext, private readonly EntityManagerInterface $em, private readonly EvaluationRepository $evaluationRepository, private readonly NormalizerInterface $normalizer, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator) + { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContextWithThirdParty.php b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContextWithThirdParty.php index 7f142fdbf..d865d686a 100644 --- a/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContextWithThirdParty.php +++ b/src/Bundle/ChillPersonBundle/Service/DocGenerator/PersonContextWithThirdParty.php @@ -31,7 +31,8 @@ class PersonContextWithThirdParty implements DocGeneratorContextWithAdminFormInt private readonly PersonContextInterface $personContext, private readonly NormalizerInterface $normalizer, private readonly ThirdPartyRepository $thirdPartyRepository - ) {} + ) { + } public function adminFormReverseTransform(array $data): array { diff --git a/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php b/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php index 19059ef47..a157c392b 100644 --- a/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php +++ b/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php @@ -21,7 +21,8 @@ class AccompanyingPeriodViewEntityInfoProvider implements ViewEntityInfoProvider */ private readonly iterable $unions, private readonly AccompanyingPeriodInfoQueryBuilder $builder, - ) {} + ) { + } public function getViewQuery(): string { diff --git a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php index 40e85b368..a6f82be91 100644 --- a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php +++ b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php @@ -30,7 +30,8 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen public function __construct( private Security $security, private EntityManagerInterface $entityManager, - ) {} + ) { + } public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php index 7c6f2264f..207d90edd 100644 --- a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php +++ b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php @@ -20,7 +20,8 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocRenderer implemen { public function __construct( private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository, - ) {} + ) { + } public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadata.php b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadata.php index 21406072d..7ce08fd3b 100644 --- a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadata.php +++ b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadata.php @@ -27,7 +27,9 @@ use Doctrine\Persistence\ObjectRepository; final readonly class SocialWorkMetadata implements SocialWorkMetadataInterface { - public function __construct(private SocialIssueRepository $socialIssueRepository, private SocialActionRepository $socialActionRepository, private GoalRepository $goalRepository, private ResultRepository $resultRepository, private EvaluationRepository $evaluationRepository, private EntityManagerInterface $entityManager) {} + public function __construct(private SocialIssueRepository $socialIssueRepository, private SocialActionRepository $socialActionRepository, private GoalRepository $goalRepository, private ResultRepository $resultRepository, private EvaluationRepository $evaluationRepository, private EntityManagerInterface $entityManager) + { + } /** * @throws \Exception diff --git a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php index f31612606..f61d22252 100644 --- a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php +++ b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php @@ -11,4 +11,6 @@ declare(strict_types=1); namespace Chill\PersonBundle\Service\Import; -interface SocialWorkMetadataInterface extends ChillImporter {} +interface SocialWorkMetadataInterface extends ChillImporter +{ +} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php index 29ed4226a..e09c659c0 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/ClosingMotiveRender.php @@ -30,7 +30,8 @@ final readonly class ClosingMotiveRender implements ChillEntityRenderInterface public function __construct( private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator - ) {} + ) { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php index a09ad11f5..fe41d974e 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRender.php @@ -23,7 +23,9 @@ class PersonRender implements PersonRenderInterface { use BoxUtilsChillEntityRenderTrait; - public function __construct(private readonly ConfigPersonAltNamesHelper $configAltNamesHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly ConfigPersonAltNamesHelper $configAltNamesHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) + { + } public function renderBox($person, array $options): string { diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php index 203281b67..2f69d31a9 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php @@ -19,4 +19,6 @@ use Chill\PersonBundle\Entity\Person; * * @extends ChillEntityRenderInterface */ -interface PersonRenderInterface extends ChillEntityRenderInterface {} +interface PersonRenderInterface extends ChillEntityRenderInterface +{ +} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/ResourceKindRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/ResourceKindRender.php index b9cf28fb7..87e658766 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/ResourceKindRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/ResourceKindRender.php @@ -20,7 +20,9 @@ use Chill\PersonBundle\Entity\Person\PersonResourceKind; */ final readonly class ResourceKindRender implements ChillEntityRenderInterface { - public function __construct(private TranslatableStringHelper $translatableStringHelper) {} + public function __construct(private TranslatableStringHelper $translatableStringHelper) + { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php index 657ed0f53..a13df7ecc 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialActionRender.php @@ -43,7 +43,9 @@ class SocialActionRender implements ChillEntityRenderInterface */ final public const SHOW_AND_CHILDREN = 'show_and_children'; - public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly \Twig\Environment $engine, private readonly TranslatorInterface $translator) + { + } public function renderBox($socialAction, array $options): string { diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php index af8622f67..17e211892 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/SocialIssueRender.php @@ -37,7 +37,9 @@ final readonly class SocialIssueRender implements ChillEntityRenderInterface */ public const SHOW_AND_CHILDREN = 'show_and_children'; - public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine, private TranslatorInterface $translator) {} + public function __construct(private TranslatableStringHelper $translatableStringHelper, private \Twig\Environment $engine, private TranslatorInterface $translator) + { + } public function renderBox($socialIssue, array $options): string { diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php index 75e3877bc..dc5252108 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/SocialIssueConsistency/AccompanyingPeriodSocialIssueConsistencyEntityListenerTest.php @@ -121,7 +121,9 @@ final class AccompanyingPeriodSocialIssueConsistencyEntityListenerTest extends T protected function generateClass(AccompanyingPeriod $period, Collection $socialIssues): AccompanyingPeriodLinkedWithSocialIssuesEntityInterface { return new class ($period, $socialIssues) implements AccompanyingPeriodLinkedWithSocialIssuesEntityInterface { - public function __construct(public $period, public $socialIssues) {} + public function __construct(public $period, public $socialIssues) + { + } public function getAccompanyingPeriod(): AccompanyingPeriod { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php index 14c6e30fa..b62c06489 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonAddressControllerTest.php @@ -196,7 +196,7 @@ final class PersonAddressControllerTest extends WebTestCase */ protected function refreshPerson() { - self::$person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) + self::$person = $this->em->getRepository(Person::class) ->find(self::$person->getId()); } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index 572374bc1..86796fc3f 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -89,7 +89,7 @@ final class PersonControllerCreateTest extends WebTestCase $form = $crawler->selectButton("Créer l'usager")->form(); $this->assertInstanceOf( - \Symfony\Component\DomCrawler\Form::class, + Form::class, $form, 'The page contains a button' ); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php index d1ef1f1c9..5682f343d 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateTest.php @@ -43,7 +43,9 @@ final class PersonControllerUpdateTest extends WebTestCase /** * Prepare client and create a random person. */ - protected function setUp(): void {} + protected function setUp(): void + { + } protected function tearDown(): void { diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index d23fbcb7a..a89f5adc7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -205,7 +205,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) + $this->person = $this->em->getRepository(Person::class) ->find($this->person->getId()); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php index e0d56204f..3fbbf667b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php @@ -98,7 +98,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase */ protected function refreshPerson() { - $this->person = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) + $this->person = $this->em->getRepository(Person::class) ->find($this->person->getId()); } } diff --git a/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php index 6973eba1d..401ef5a07 100644 --- a/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Timeline/AbstractTimelineAccompanyingPeriod.php @@ -31,7 +31,9 @@ abstract class AbstractTimelineAccompanyingPeriod implements TimelineProviderInt { private const SUPPORTED_CONTEXTS = ['person', 'center']; - public function __construct(protected EntityManager $em, private readonly Security $security, private readonly AuthorizationHelper $authorizationHelper) {} + public function __construct(protected EntityManager $em, private readonly Security $security, private readonly AuthorizationHelper $authorizationHelper) + { + } public function getEntities(array $ids) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php index 6198e4e47..3c3ff4d4d 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/AccompanyingPeriodValidityValidator.php @@ -23,7 +23,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; class AccompanyingPeriodValidityValidator extends ConstraintValidator { - public function __construct(private readonly ActivityRepository $activityRepository, private readonly SocialIssueRender $socialIssueRender, private readonly TokenStorageInterface $token) {} + public function __construct(private readonly ActivityRepository $activityRepository, private readonly SocialIssueRender $socialIssueRender, private readonly TokenStorageInterface $token) + { + } public function validate($period, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php index 4b4a13c18..4de58387a 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/LocationValidityValidator.php @@ -20,7 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; class LocationValidityValidator extends ConstraintValidator { - public function __construct(private readonly PersonRenderInterface $render) {} + public function __construct(private readonly PersonRenderInterface $render) + { + } public function validate($period, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php index d3c25199b..7ab10d1f9 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ParticipationOverlapValidator.php @@ -24,7 +24,9 @@ class ParticipationOverlapValidator extends ConstraintValidator { private const MAX_PARTICIPATION = 1; - public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) {} + public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) + { + } public function validate($participations, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php index d7573c400..96f63f19b 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/AccompanyingPeriod/ResourceDuplicateCheckValidator.php @@ -21,7 +21,9 @@ use Symfony\Component\Validator\ConstraintValidator; class ResourceDuplicateCheckValidator extends ConstraintValidator { - public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) {} + public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender) + { + } public function validate($resources, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php index 2ca0af42c..8c1eebce2 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Household/HouseholdMembershipSequentialValidator.php @@ -24,7 +24,9 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException; */ class HouseholdMembershipSequentialValidator extends ConstraintValidator { - public function __construct(private readonly PersonRenderInterface $render) {} + public function __construct(private readonly PersonRenderInterface $render) + { + } public function validate($person, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php index 8a54de53e..4c340fc81 100644 --- a/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php +++ b/src/Bundle/ChillPersonBundle/Validator/Constraints/Relationship/RelationshipNoDuplicateValidator.php @@ -20,7 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException; class RelationshipNoDuplicateValidator extends ConstraintValidator { - public function __construct(private readonly RelationshipRepository $relationshipRepository) {} + public function __construct(private readonly RelationshipRepository $relationshipRepository) + { + } public function validate($value, Constraint $constraint) { diff --git a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php index aab72f148..b80c91f6e 100644 --- a/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php +++ b/src/Bundle/ChillPersonBundle/Widget/PersonListWidget.php @@ -34,7 +34,9 @@ class PersonListWidget implements WidgetInterface { protected UserInterface $user; - public function __construct(protected PersonRepository $personRepository, protected EntityManagerInterface $entityManager, protected AuthorizationHelperInterface $authorizationHelper, protected TokenStorageInterface $tokenStorage) {} + public function __construct(protected PersonRepository $personRepository, protected EntityManagerInterface $entityManager, protected AuthorizationHelperInterface $authorizationHelper, protected TokenStorageInterface $tokenStorage) + { + } public function render(Environment $env, $place, array $context, array $config) { diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php index 0fc13224e..19c8949c9 100644 --- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php +++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler.php @@ -21,7 +21,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AccompanyingPeriodWorkEvaluationDocumentWorkflowHandler implements EntityWorkflowHandlerInterface { - public function __construct(private readonly AccompanyingPeriodWorkEvaluationDocumentRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly AccompanyingPeriodWorkEvaluationDocumentRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) + { + } public function getDeletionRoles(): array { diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php index 63b34d1dc..17a1eba45 100644 --- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php +++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkEvaluationWorkflowHandler.php @@ -22,7 +22,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AccompanyingPeriodWorkEvaluationWorkflowHandler implements EntityWorkflowHandlerInterface { - public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly AccompanyingPeriodWorkEvaluationRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) + { + } public function getDeletionRoles(): array { diff --git a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php index 5c74e5b17..b78b81a20 100644 --- a/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php +++ b/src/Bundle/ChillPersonBundle/Workflow/AccompanyingPeriodWorkWorkflowHandler.php @@ -23,7 +23,9 @@ use Symfony\Contracts\Translation\TranslatorInterface; class AccompanyingPeriodWorkWorkflowHandler implements EntityWorkflowHandlerInterface { - public function __construct(private readonly AccompanyingPeriodWorkRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly AccompanyingPeriodWorkRepository $repository, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly TranslatorInterface $translator) + { + } public function getDeletionRoles(): array { diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php index 159e969a3..da6cf8552 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php @@ -19,7 +19,9 @@ use Doctrine\Migrations\AbstractMigration; */ class Version20160422000000 extends AbstractMigration { - public function down(Schema $schema): void {} + public function down(Schema $schema): void + { + } public function up(Schema $schema): void { diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php b/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php index e713486d0..8db3880ed 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php @@ -19,7 +19,9 @@ use Doctrine\Migrations\AbstractMigration; */ final class Version20210419112619 extends AbstractMigration { - public function down(Schema $schema): void {} + public function down(Schema $schema): void + { + } public function getDescription(): string { diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20231121070151.php b/src/Bundle/ChillPersonBundle/migrations/Version20231121070151.php index 1123ef1c3..c85132aff 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20231121070151.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20231121070151.php @@ -29,5 +29,7 @@ final class Version20231121070151 extends AbstractMigration $this->addSql("UPDATE chill_person_person SET gender = 'both' WHERE chill_person_person.gender = 'neuter'"); } - public function down(Schema $schema): void {} + public function down(Schema $schema): void + { + } } diff --git a/src/Bundle/ChillReportBundle/ChillReportBundle.php b/src/Bundle/ChillReportBundle/ChillReportBundle.php index 76bc4c9b2..ef92fa192 100644 --- a/src/Bundle/ChillReportBundle/ChillReportBundle.php +++ b/src/Bundle/ChillReportBundle/ChillReportBundle.php @@ -13,4 +13,6 @@ namespace Chill\ReportBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillReportBundle extends Bundle {} +class ChillReportBundle extends Bundle +{ +} diff --git a/src/Bundle/ChillReportBundle/Controller/ReportController.php b/src/Bundle/ChillReportBundle/Controller/ReportController.php index 22830a8df..7354edf3e 100644 --- a/src/Bundle/ChillReportBundle/Controller/ReportController.php +++ b/src/Bundle/ChillReportBundle/Controller/ReportController.php @@ -37,7 +37,8 @@ class ReportController extends AbstractController private readonly AuthorizationHelper $authorizationHelper, private readonly PaginatorFactory $paginator, private readonly TranslatorInterface $translator - ) {} + ) { + } /** * Create a new report for a given person and of a given type. @@ -56,7 +57,7 @@ class ReportController extends AbstractController $cFGroup = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) ->find($cf_group_id); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) + $person = $em->getRepository(Person::class) ->find($person_id); if (null === $person || null === $cFGroup) { @@ -182,7 +183,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); + $person = $em->getRepository(Person::class)->find($person_id); $this->denyAccessUnlessGranted('CHILL_PERSON_SEE', $person); @@ -239,7 +240,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); + $person = $em->getRepository(Person::class)->find($person_id); $cFGroup = $em ->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) ->find($cf_group_id); @@ -287,7 +288,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class) + $person = $em->getRepository(Person::class) ->find($person_id); if (null === $person) { @@ -309,7 +310,7 @@ class ReportController extends AbstractController } $cFGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) - ->findByEntity(\Chill\ReportBundle\Entity\Report::class); + ->findByEntity(Report::class); if (1 === \count($cFGroups)) { return $this->redirectToRoute('report_new', ['person_id' => $person_id, 'cf_group_id' => $cFGroups[0]->getId()]); @@ -331,7 +332,7 @@ class ReportController extends AbstractController ]) ->getForm(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); + $person = $em->getRepository(Person::class)->find($person_id); return $this->render('@ChillReport/Report/select_report_type.html.twig', [ 'form' => $form->createView(), @@ -358,7 +359,7 @@ class ReportController extends AbstractController $em = $this->getDoctrine()->getManager(); $cFGroups = $em->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) - ->findByEntity(\Chill\ReportBundle\Entity\Report::class); + ->findByEntity(Report::class); if (1 === \count($cFGroups)) { return $this->redirectToRoute('report_export_list', ['cf_group_id' => $cFGroups[0]->getId()]); @@ -458,7 +459,7 @@ class ReportController extends AbstractController { $em = $this->getDoctrine()->getManager(); - $person = $em->getRepository(\Chill\PersonBundle\Entity\Person::class)->find($person_id); + $person = $em->getRepository(Person::class)->find($person_id); $entity = $em->getRepository('ChillReportBundle:Report')->find($report_id); diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php index 1761e3522..7f281c2cb 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php @@ -46,7 +46,9 @@ class ReportList implements ExportElementValidatedInterface, ListInterface protected array $slugs = []; - public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em) {} + public function __construct(protected CustomFieldsGroup $customfieldsGroup, protected TranslatableStringHelper $translatableStringHelper, protected TranslatorInterface $translator, protected CustomFieldProvider $customFieldProvider, protected EntityManagerInterface $em) + { + } public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php index 0346f2ab3..68fc7b001 100644 --- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php +++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php @@ -19,7 +19,9 @@ use Doctrine\ORM\Query\Expr; class ReportDateFilter implements FilterInterface { - public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) {} + public function __construct(private readonly RollingDateConverterInterface $rollingDateConverter) + { + } public function addRole(): ?string { diff --git a/src/Bundle/ChillReportBundle/Form/ReportType.php b/src/Bundle/ChillReportBundle/Form/ReportType.php index 8d6551443..8d717a424 100644 --- a/src/Bundle/ChillReportBundle/Form/ReportType.php +++ b/src/Bundle/ChillReportBundle/Form/ReportType.php @@ -32,7 +32,7 @@ class ReportType extends AbstractType protected $authorizationHelper; /** - * @var \Doctrine\Persistence\ObjectManager + * @var ObjectManager */ protected $om; diff --git a/src/Bundle/ChillReportBundle/Search/ReportSearch.php b/src/Bundle/ChillReportBundle/Search/ReportSearch.php index 4737edd99..bfad327b4 100644 --- a/src/Bundle/ChillReportBundle/Search/ReportSearch.php +++ b/src/Bundle/ChillReportBundle/Search/ReportSearch.php @@ -96,7 +96,7 @@ class ReportSearch extends AbstractSearch implements ContainerAwareInterface /** * @param array $terms the terms * - * @return \Doctrine\ORM\QueryBuilder + * @return QueryBuilder */ private function buildQuery(array $terms) { diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php index a16653601..d91583dc0 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerNextTest.php @@ -43,7 +43,7 @@ final class ReportControllerNextTest extends WebTestCase ->get('doctrine.orm.entity_manager'); $this->person = $em - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->findOneBy( [ 'lastName' => 'Charline', @@ -58,7 +58,7 @@ final class ReportControllerNextTest extends WebTestCase // get custom fields group from fixture $customFieldsGroups = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) + ->getRepository(CustomFieldsGroup::class) ->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]); // filter customFieldsGroup to get only "situation de logement" $filteredCustomFieldsGroupHouse = array_filter( diff --git a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php index 1259e4b5f..e5270c038 100644 --- a/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Controller/ReportControllerTest.php @@ -43,7 +43,7 @@ final class ReportControllerTest extends WebTestCase private static $group; /** - * @var \Chill\PersonBundle\Entity\Person + * @var Person */ private static $person; @@ -59,7 +59,7 @@ final class ReportControllerTest extends WebTestCase // get a random person self::$person = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository(\Chill\PersonBundle\Entity\Person::class) + ->getRepository(Person::class) ->findOneBy( [ 'lastName' => 'Charline', @@ -73,7 +73,7 @@ final class ReportControllerTest extends WebTestCase $customFieldsGroups = self::$kernel->getContainer() ->get('doctrine.orm.entity_manager') - ->getRepository(\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup::class) + ->getRepository(CustomFieldsGroup::class) ->findBy(['entity' => \Chill\ReportBundle\Entity\Report::class]); // filter customFieldsGroup to get only "situation de logement" $filteredCustomFieldsGroupHouse = array_filter( @@ -123,7 +123,7 @@ final class ReportControllerTest extends WebTestCase $form = $crawlerAddAReportPage->selectButton('Créer un nouveau rapport')->form(); $this->assertInstanceOf( - \Symfony\Component\DomCrawler\Form::class, + Form::class, $form, 'I can see a form with a button "add a new report" ' ); @@ -242,7 +242,7 @@ final class ReportControllerTest extends WebTestCase $link = $crawlerPersonPage->selectLink("AJOUT D'UN RAPPORT")->link(); $this->assertInstanceOf( - \Symfony\Component\DomCrawler\Link::class, + Link::class, $link, 'There is a "add a report" link in menu' ); @@ -270,7 +270,7 @@ final class ReportControllerTest extends WebTestCase ->form(); $this->assertInstanceOf( - \Symfony\Component\DomCrawler\Form::class, + Form::class, $addForm, 'I have a report form' ); diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php index 5d4261d8a..90163fd2e 100644 --- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php @@ -44,7 +44,9 @@ final class ReportVoterTest extends KernelTestCase */ protected $voter; - public static function setUpBeforeClass(): void {} + public static function setUpBeforeClass(): void + { + } protected function setUp(): void { diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index 6e7a6dad1..ad6a16e57 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php @@ -58,7 +58,7 @@ final class TimelineProviderTest extends WebTestCase $scopesSocial = array_filter( self::$em - ->getRepository(\Chill\MainBundle\Entity\Scope::class) + ->getRepository(Scope::class) ->findAll(), static fn (Scope $scope) => 'social' === $scope->getName()['en'] ); diff --git a/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php index 17b600149..6a3f00dd5 100644 --- a/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php +++ b/src/Bundle/ChillReportBundle/Timeline/TimelineReportProvider.php @@ -25,7 +25,9 @@ use Symfony\Component\Security\Core\Security; */ class TimelineReportProvider implements TimelineProviderInterface { - public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private readonly Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues) {} + public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private readonly Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues) + { + } public function fetchQuery($context, array $args) { diff --git a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php index 16c520c75..bf7e2086f 100644 --- a/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php +++ b/src/Bundle/ChillTaskBundle/Controller/SingleTaskController.php @@ -55,7 +55,8 @@ final class SingleTaskController extends AbstractController private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, private readonly SingleTaskStateRepository $singleTaskStateRepository, private readonly SingleTaskRepository $singleTaskRepository, - ) {} + ) { + } /** * @Route( @@ -625,7 +626,7 @@ final class SingleTaskController extends AbstractController } /** - * @return \Symfony\Component\Form\FormInterface + * @return FormInterface */ protected function setCreateForm(SingleTask $task, string $role) { diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index eca0c17cc..91dfeaf61 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -103,9 +103,6 @@ class SingleTask extends AbstractTask private Collection $taskPlaceEvents; /** - * @var \DateInterval - * and this.getEndDate() === null - * * @ORM\Column(name="warning_interval", type="dateinterval", nullable=true) * * @Serializer\Groups({"read"}) diff --git a/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php b/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php index 7e572e078..2d4c7cef9 100644 --- a/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php +++ b/src/Bundle/ChillTaskBundle/Form/SingleTaskType.php @@ -27,7 +27,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class SingleTaskType extends AbstractType { - public function __construct(private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) {} + public function __construct(private readonly ParameterBagInterface $parameterBag, private readonly CenterResolverDispatcherInterface $centerResolverDispatcher, private readonly ScopeResolverDispatcher $scopeResolverDispatcher) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php index 6ac7f10ec..d19420580 100644 --- a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php @@ -17,4 +17,6 @@ namespace Chill\TaskBundle\Repository; * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ -abstract class AbstractTaskRepository extends \Doctrine\ORM\EntityRepository {} +abstract class AbstractTaskRepository extends \Doctrine\ORM\EntityRepository +{ +} diff --git a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php index 985aa9935..4bbedd1bb 100644 --- a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php @@ -17,4 +17,6 @@ namespace Chill\TaskBundle\Repository; * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ -class RecurringTaskRepository extends \Doctrine\ORM\EntityRepository {} +class RecurringTaskRepository extends \Doctrine\ORM\EntityRepository +{ +} diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php index 605597fea..e55a8f700 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php @@ -23,7 +23,9 @@ use Symfony\Component\Security\Core\Security; final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareRepositoryInterface { - public function __construct(private CenterResolverManagerInterface $centerResolverDispatcher, private EntityManagerInterface $em, private Security $security, private AuthorizationHelperInterface $authorizationHelper) {} + public function __construct(private CenterResolverManagerInterface $centerResolverDispatcher, private EntityManagerInterface $em, private Security $security, private AuthorizationHelperInterface $authorizationHelper) + { + } public function buildBaseQuery( string $pattern = null, diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php index 614870264..477788aa7 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php @@ -22,7 +22,8 @@ class SingleTaskStateRepository public function __construct( private readonly Connection $connection - ) {} + ) { + } /** * Return a list of all states associated to at least one single task in the database. diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php index 3c1103ddf..cc65d0215 100644 --- a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php +++ b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php @@ -29,7 +29,8 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event private readonly null|AbstractTask|AccompanyingPeriod|Person $subject, private readonly string $attribute, private readonly TokenInterface $token - ) {} + ) { + } public function getAttribute() { diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php index e8758290a..d4169549c 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php @@ -18,4 +18,6 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * * @coversNothing */ -final class TaskControllerTest extends WebTestCase {} +final class TaskControllerTest extends WebTestCase +{ +} diff --git a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php index 98b38a989..fa4c2527e 100644 --- a/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php +++ b/src/Bundle/ChillTaskBundle/Timeline/TaskLifeCycleEventTimelineProvider.php @@ -30,7 +30,9 @@ class TaskLifeCycleEventTimelineProvider implements TimelineProviderInterface { final public const TYPE = 'chill_task.transition'; - public function __construct(protected EntityManagerInterface $em, protected Registry $registry, protected AuthorizationHelper $authorizationHelper, protected Security $security) {} + public function __construct(protected EntityManagerInterface $em, protected Registry $registry, protected AuthorizationHelper $authorizationHelper, protected Security $security) + { + } public function fetchQuery($context, $args) { diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php index 81fea25e6..76a8da7c8 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php +++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php @@ -11,4 +11,6 @@ declare(strict_types=1); namespace Chill\TaskBundle\Workflow; -interface TaskWorkflowDefinition {} +interface TaskWorkflowDefinition +{ +} diff --git a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php index 91625c827..cff064edc 100644 --- a/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php +++ b/src/Bundle/ChillThirdPartyBundle/DependencyInjection/ChillThirdPartyExtension.php @@ -127,7 +127,7 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte ], 'apis' => [ [ - 'class' => \Chill\ThirdPartyBundle\Entity\ThirdParty::class, + 'class' => ThirdParty::class, 'name' => 'thirdparty', 'base_path' => '/api/1.0/thirdparty/thirdparty', // 'base_role' => \Chill\ThirdPartyBundle\Security\Authorization\ThirdPartyVoter::SHOW, @@ -142,11 +142,11 @@ class ChillThirdPartyExtension extends Extension implements PrependExtensionInte Request::METHOD_PATCH => true, ], 'roles' => [ - Request::METHOD_GET => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW, - Request::METHOD_HEAD => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::SHOW, - Request::METHOD_POST => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE, - Request::METHOD_PUT => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE, - Request::METHOD_PATCH => \Chill\ThirdPartyBundle\Security\Voter\ThirdPartyVoter::CREATE, + Request::METHOD_GET => ThirdPartyVoter::SHOW, + Request::METHOD_HEAD => ThirdPartyVoter::SHOW, + Request::METHOD_POST => ThirdPartyVoter::CREATE, + Request::METHOD_PUT => ThirdPartyVoter::CREATE, + Request::METHOD_PATCH => ThirdPartyVoter::CREATE, ], ], ], diff --git a/src/Bundle/ChillThirdPartyBundle/Export/Helper/LabelThirdPartyHelper.php b/src/Bundle/ChillThirdPartyBundle/Export/Helper/LabelThirdPartyHelper.php index e92cdae93..41e18d62c 100644 --- a/src/Bundle/ChillThirdPartyBundle/Export/Helper/LabelThirdPartyHelper.php +++ b/src/Bundle/ChillThirdPartyBundle/Export/Helper/LabelThirdPartyHelper.php @@ -16,7 +16,9 @@ use Chill\ThirdPartyBundle\Templating\Entity\ThirdPartyRender; class LabelThirdPartyHelper { - public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository) {} + public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly ThirdPartyRepository $thirdPartyRepository) + { + } public function getLabel(string $key, array $values, string $header): callable { diff --git a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php index 41e0140c8..046d553e9 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/ThirdPartyType.php @@ -100,7 +100,7 @@ class ThirdPartyType extends AbstractType 'label' => 'thirdparty.Contact data are confidential', ]); - // Institutional ThirdParty (parent) + // Institutional ThirdParty (parent) } else { $builder ->add('nameCompany', TextType::class, [ diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php index 77720331d..b2ef89132 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdPartyTypeCategoryType.php @@ -24,7 +24,9 @@ class PickThirdPartyTypeCategoryType extends \Symfony\Component\Form\AbstractTyp { private const PREFIX_TYPE = 'chill_3party.key_label.'; - public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator) {} + public function __construct(private readonly ThirdPartyCategoryRepository $thirdPartyCategoryRepository, private readonly ThirdPartyTypeManager $thirdPartyTypeManager, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator) + { + } public function configureOptions(OptionsResolver $resolver) { diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php index 0fd640f9b..9022fb6dc 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php @@ -26,7 +26,9 @@ use Symfony\Component\Serializer\SerializerInterface; */ class PickThirdpartyDynamicType extends AbstractType { - public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) {} + public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer) + { + } public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php index f05ad0296..63538cfc2 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php @@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security; final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareRepositoryInterface { - public function __construct(private Security $security, private AuthorizationHelper $authorizationHelper, private ThirdPartyRepository $thirdPartyRepository) {} + public function __construct(private Security $security, private AuthorizationHelper $authorizationHelper, private ThirdPartyRepository $thirdPartyRepository) + { + } public function buildQuery(string $filterString = null): QueryBuilder { diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php index 8970fec1c..844302295 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php @@ -44,14 +44,18 @@ FROM rows, searches */ class ThirdPartyApiSearch implements SearchApiInterface { - public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository) {} + public function __construct(private readonly ThirdPartyRepository $thirdPartyRepository) + { + } public function getResult(string $key, array $metadata, float $pertinence) { return $this->thirdPartyRepository->find($metadata['id']); } - public function prepare(array $metadatas): void {} + public function prepare(array $metadatas): void + { + } public function provideQuery(string $pattern, array $parameters): SearchApiQuery { diff --git a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php index 26f175705..b2271e8df 100644 --- a/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php +++ b/src/Bundle/ChillThirdPartyBundle/Serializer/Normalizer/ThirdPartyNormalizer.php @@ -24,7 +24,9 @@ class ThirdPartyNormalizer implements NormalizerAwareInterface, NormalizerInterf { use NormalizerAwareTrait; - public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {} + public function __construct(private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) + { + } public function normalize($thirdParty, $format = null, array $context = []) { diff --git a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php index a36ceda4e..4a7403f17 100644 --- a/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php +++ b/src/Bundle/ChillThirdPartyBundle/Templating/Entity/ThirdPartyRender.php @@ -23,7 +23,9 @@ class ThirdPartyRender implements ChillEntityRenderInterface { use BoxUtilsChillEntityRenderTrait; - public function __construct(protected \Twig\Environment $engine, protected TranslatableStringHelper $translatableStringHelper) {} + public function __construct(protected \Twig\Environment $engine, protected TranslatableStringHelper $translatableStringHelper) + { + } public function renderBox($entity, array $options): string { diff --git a/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php b/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php index 401eb9970..5ca164db1 100644 --- a/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php +++ b/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php @@ -13,4 +13,6 @@ namespace Chill\WopiBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -final class ChillWopiBundle extends Bundle {} +final class ChillWopiBundle extends Bundle +{ +} diff --git a/src/Bundle/ChillWopiBundle/src/Controller/Editor.php b/src/Bundle/ChillWopiBundle/src/Controller/Editor.php index 053b7abd0..feae8d708 100644 --- a/src/Bundle/ChillWopiBundle/src/Controller/Editor.php +++ b/src/Bundle/ChillWopiBundle/src/Controller/Editor.php @@ -37,7 +37,9 @@ use Twig\Environment; */ final readonly class Editor { - public function __construct(private ConfigurationInterface $wopiConfiguration, private DiscoveryInterface $wopiDiscovery, private DocumentManagerInterface $documentManager, private Environment $engine, private JWTTokenManagerInterface $JWTTokenManager, private NormalizerInterface $normalizer, private ResponderInterface $responder, private Security $security, private Psr17Interface $psr17, private RouterInterface $router) {} + public function __construct(private ConfigurationInterface $wopiConfiguration, private DiscoveryInterface $wopiDiscovery, private DocumentManagerInterface $documentManager, private Environment $engine, private JWTTokenManagerInterface $JWTTokenManager, private NormalizerInterface $normalizer, private ResponderInterface $responder, private Security $security, private Psr17Interface $psr17, private RouterInterface $router) + { + } public function __invoke(string $fileId, Request $request): Response { diff --git a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php index 141799207..2272c9efd 100644 --- a/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php +++ b/src/Bundle/ChillWopiBundle/src/Resources/config/routes/routes.php @@ -19,5 +19,5 @@ return static function (RoutingConfigurator $routes) { $routes ->add('chill_wopi_object_convert', '/convert/{uuid}') - ->controller(\Chill\WopiBundle\Controller\Convert::class); + ->controller(Chill\WopiBundle\Controller\Convert::class); }; diff --git a/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php b/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php index a57eab761..633529d02 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php @@ -22,7 +22,9 @@ use Twig\Environment; final readonly class Responder implements ResponderInterface { - public function __construct(private Environment $twig, private UrlGeneratorInterface $urlGenerator, private SerializerInterface $serializer) {} + public function __construct(private Environment $twig, private UrlGeneratorInterface $urlGenerator, private SerializerInterface $serializer) + { + } public function file( $file, diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php index 1496ba479..53e9ad819 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/AuthorizationManager.php @@ -19,7 +19,9 @@ use Symfony\Component\Security\Core\Security; class AuthorizationManager implements \ChampsLibres\WopiBundle\Contracts\AuthorizationManagerInterface { - public function __construct(private readonly JWTTokenManagerInterface $tokenManager, private readonly Security $security) {} + public function __construct(private readonly JWTTokenManagerInterface $tokenManager, private readonly Security $security) + { + } public function isRestrictedWebViewOnly(string $accessToken, Document $document, RequestInterface $request): bool { diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php index e6889778c..594bdffcc 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillDocumentLockManager.php @@ -28,7 +28,8 @@ class ChillDocumentLockManager implements DocumentLockManagerInterface public function __construct( private readonly ChillRedis $redis, private readonly int $ttlAfterDeleteSeconds = self::LOCK_GRACEFUL_DURATION_TIME - ) {} + ) { + } public function deleteLock(Document $document, RequestInterface $request): bool { diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php index 9f2dac4f0..189b780b2 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/ChillWopi.php @@ -17,7 +17,9 @@ use Psr\Http\Message\ResponseInterface; final readonly class ChillWopi implements WopiInterface { - public function __construct(private WopiInterface $wopi) {} + public function __construct(private WopiInterface $wopi) + { + } public function checkFileInfo( string $fileId, diff --git a/src/Bundle/ChillWopiBundle/src/Service/Wopi/UserManager.php b/src/Bundle/ChillWopiBundle/src/Service/Wopi/UserManager.php index f72ae3cde..4a0857521 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Wopi/UserManager.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Wopi/UserManager.php @@ -17,7 +17,9 @@ use Symfony\Component\Security\Core\Security; class UserManager implements \ChampsLibres\WopiBundle\Contracts\UserManagerInterface { - public function __construct(private readonly Security $security) {} + public function __construct(private readonly Security $security) + { + } public function getUserFriendlyName(string $accessToken, string $fileId, RequestInterface $request): ?string { diff --git a/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php b/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php index b2efd260a..a087c20d9 100644 --- a/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php +++ b/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php @@ -25,7 +25,8 @@ class ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector extends Abstra { public function __construct( private readonly ClassAnalyzer $classAnalyzer, - ) {} + ) { + } public function getRuleDefinition(): RuleDefinition { diff --git a/utils/rector/tests/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/config/config.php b/utils/rector/tests/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/config/config.php index 89ec65f14..c4178c04b 100644 --- a/utils/rector/tests/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/config/config.php +++ b/utils/rector/tests/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector/config/config.php @@ -10,5 +10,5 @@ declare(strict_types=1); */ return static function (Rector\Config\RectorConfig $rectorConfig): void { - $rectorConfig->rule(\Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class); + $rectorConfig->rule(Chill\Utils\Rector\Rector\ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector::class); }; From e67c5d98ef8e001aee6f0a0f5e6bcb8997c26c70 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 10 Jan 2024 11:09:33 +0100 Subject: [PATCH 12/82] force pipeline to run again --- src/Bundle/ChillActivityBundle/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillActivityBundle/CHANGELOG.md b/src/Bundle/ChillActivityBundle/CHANGELOG.md index 6261aa1db..4cda36f0c 100644 --- a/src/Bundle/ChillActivityBundle/CHANGELOG.md +++ b/src/Bundle/ChillActivityBundle/CHANGELOG.md @@ -28,3 +28,4 @@ Version 1.5.5 - [activity] replace dropdown for selecting reasons and use chillEntity for reason rendering - fix bug: error when trying to edit activity of which the type has been deactivated + From 0b50cbfe4c910355ab684d4a37bb9701a9b03b20 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 10 Jan 2024 13:09:10 +0100 Subject: [PATCH 13/82] adjust form for activity type presence field, setting placeholder to false --- src/Bundle/ChillActivityBundle/Form/ActivityType.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Bundle/ChillActivityBundle/Form/ActivityType.php b/src/Bundle/ChillActivityBundle/Form/ActivityType.php index 4e3b1eb8a..d322089c8 100644 --- a/src/Bundle/ChillActivityBundle/Form/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Form/ActivityType.php @@ -183,6 +183,7 @@ class ActivityType extends AbstractType $builder->add('attendee', EntityType::class, [ 'label' => $activityType->getLabel('attendee'), 'required' => $activityType->isRequired('attendee'), + 'placeholder' => false, 'expanded' => true, 'class' => ActivityPresence::class, 'choice_label' => fn (ActivityPresence $activityPresence) => $this->translatableStringHelper->localize($activityPresence->getName()), From 2c6b5dfee12a491ff70fcd3121189d11ee06838e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 10 Jan 2024 13:20:38 +0100 Subject: [PATCH 14/82] Add changie --- .changes/unreleased/DX-20240110-132016.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/DX-20240110-132016.yaml diff --git a/.changes/unreleased/DX-20240110-132016.yaml b/.changes/unreleased/DX-20240110-132016.yaml new file mode 100644 index 000000000..443bf7a68 --- /dev/null +++ b/.changes/unreleased/DX-20240110-132016.yaml @@ -0,0 +1,6 @@ +kind: DX +body: Set placeholder to False for expanded EntityType form fields where required + is set to False. +time: 2024-01-10T13:20:16.232711478+01:00 +custom: + Issue: "" From 2b903c4d6e6adf25d289e4e4baffa1afcffa1892 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Jan 2024 11:55:03 +0100 Subject: [PATCH 15/82] Use the correct id_seq to explicitly assign id to new row in accompanying period participation table --- .../PersonMoveAccompanyingPeriodParticipationHandler.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php index 2c342a9a5..3cff98292 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveAccompanyingPeriodParticipationHandler.php @@ -26,7 +26,7 @@ class PersonMoveAccompanyingPeriodParticipationHandler implements PersonMoveSqlH { $insertSql = sprintf(<<<'SQL' INSERT INTO chill_person_accompanying_period_participation (person_id, accompanyingperiod_id, id, startdate, enddate) - SELECT %d, accompanyingperiod_id, nextval('chill_person_accompanying_period_id_seq'), startdate, enddate + SELECT %d, accompanyingperiod_id, nextval('chill_person_accompanying_period_participation_id_seq'), startdate, enddate FROM chill_person_accompanying_period_participation cpapp WHERE person_id = %d AND NOT EXISTS ( From db130ef9df629da50a171450fff8da7e362e1348 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Jan 2024 11:59:21 +0100 Subject: [PATCH 16/82] add changie --- .changes/unreleased/Fixed-20240111-115909.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixed-20240111-115909.yaml diff --git a/.changes/unreleased/Fixed-20240111-115909.yaml b/.changes/unreleased/Fixed-20240111-115909.yaml new file mode 100644 index 000000000..b5e78c73b --- /dev/null +++ b/.changes/unreleased/Fixed-20240111-115909.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix the id_seq used when creating a new accompanying period participation during + fusion of two person files +time: 2024-01-11T11:59:09.581242964+01:00 +custom: + Issue: "" From aee245cd045b5405f3469adb9492911a6eaaf07c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Jan 2024 13:42:02 +0100 Subject: [PATCH 17/82] raise the expire term for artifacts in the gitlab pipeline --- .gitlab-ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dc3e39778..e976a4d18 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,7 +51,7 @@ build: paths: - .cache/ artifacts: - expire_in: 30 min + expire_in: 1 day paths: - bin - vendor/ @@ -65,7 +65,7 @@ code_style: paths: - .cache/ artifacts: - expire_in: 30 min + expire_in: 1 day paths: - bin - vendor/ @@ -79,7 +79,7 @@ phpstan_tests: paths: - .cache/ artifacts: - expire_in: 30 min + expire_in: 1 day paths: - bin - vendor/ @@ -94,7 +94,7 @@ rector_tests: paths: - .cache/ artifacts: - expire_in: 30 min + expire_in: 1 day paths: - bin - vendor/ @@ -121,7 +121,7 @@ unit_tests: - php -d memory_limit=3G tests/console doctrine:fixtures:load -n - php -d memory_limit=4G bin/phpunit --colors=never --exclude-group dbIntensive artifacts: - expire_in: 30 min + expire_in: 1 day paths: - bin - vendor/ From fdfc3fb7ecae3f2063c35fc556166bfbd918bb36 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 11 Jan 2024 16:17:04 +0100 Subject: [PATCH 18/82] Update changelog and master release version --- .changes/unreleased/DX-20240110-132016.yaml | 6 ------ .changes/unreleased/Fixed-20240111-115909.yaml | 6 ------ .changes/v2.15.2.md | 5 +++++ CHANGELOG.md | 6 ++++++ 4 files changed, 11 insertions(+), 12 deletions(-) delete mode 100644 .changes/unreleased/DX-20240110-132016.yaml delete mode 100644 .changes/unreleased/Fixed-20240111-115909.yaml create mode 100644 .changes/v2.15.2.md diff --git a/.changes/unreleased/DX-20240110-132016.yaml b/.changes/unreleased/DX-20240110-132016.yaml deleted file mode 100644 index 443bf7a68..000000000 --- a/.changes/unreleased/DX-20240110-132016.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: DX -body: Set placeholder to False for expanded EntityType form fields where required - is set to False. -time: 2024-01-10T13:20:16.232711478+01:00 -custom: - Issue: "" diff --git a/.changes/unreleased/Fixed-20240111-115909.yaml b/.changes/unreleased/Fixed-20240111-115909.yaml deleted file mode 100644 index b5e78c73b..000000000 --- a/.changes/unreleased/Fixed-20240111-115909.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: Fix the id_seq used when creating a new accompanying period participation during - fusion of two person files -time: 2024-01-11T11:59:09.581242964+01:00 -custom: - Issue: "" diff --git a/.changes/v2.15.2.md b/.changes/v2.15.2.md new file mode 100644 index 000000000..739b2482b --- /dev/null +++ b/.changes/v2.15.2.md @@ -0,0 +1,5 @@ +## v2.15.2 - 2024-01-11 +### Fixed +* Fix the id_seq used when creating a new accompanying period participation during fusion of two person files +### DX +* Set placeholder to False for expanded EntityType form fields where required is set to False. diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d3b6e42c..4a731bae4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## v2.15.2 - 2024-01-11 +### Fixed +* Fix the id_seq used when creating a new accompanying period participation during fusion of two person files +### DX +* Set placeholder to False for expanded EntityType form fields where required is set to False. + ## v2.15.1 - 2023-12-20 ### Fixed * Fix the household export query to exclude accompanying periods that are in draft state. From 27ce322690e45ccf7f6ea9705d5b1f21b3f84c1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Jan 2024 12:14:39 +0100 Subject: [PATCH 19/82] upgrade php-cs-fixer to 3.47.0 --- .../src/Entity/AsideActivity.php | 8 ++++---- .../ChillCustomFieldsBundle/Entity/CustomField.php | 2 +- .../Entity/CustomFieldLongChoice/Option.php | 2 +- .../Entity/CustomFieldsDefaultGroup.php | 2 +- .../Tests/Service/CustomFieldsHelperTest.php | 2 +- src/Bundle/ChillDocStoreBundle/Entity/Document.php | 6 +++--- .../ChillDocStoreBundle/Entity/PersonDocument.php | 2 +- .../Controller/ParticipationController.php | 2 +- src/Bundle/ChillEventBundle/Entity/Event.php | 8 ++++---- .../ChillEventBundle/Entity/Participation.php | 8 ++++---- src/Bundle/ChillEventBundle/Entity/Role.php | 2 +- src/Bundle/ChillEventBundle/Entity/Status.php | 2 +- .../CRUD/Controller/ApiController.php | 2 +- .../ChillUserSendRenewPasswordCodeCommand.php | 4 ++-- .../DataFixtures/ORM/LoadAddressReferences.php | 2 +- .../DataFixtures/ORM/LoadCountries.php | 2 +- .../DataFixtures/ORM/LoadLanguages.php | 2 +- .../DataFixtures/ORM/LoadLocationType.php | 2 +- .../ChillMainBundle/DataFixtures/ORM/LoadUsers.php | 2 +- .../DependencyInjection/ChillMainExtension.php | 2 +- src/Bundle/ChillMainBundle/Entity/PostalCode.php | 4 ++-- .../ChillMainBundle/Entity/User/UserJobHistory.php | 4 ++-- .../Entity/User/UserScopeHistory.php | 4 ++-- .../Form/Type/ComposedRoleScopeType.php | 2 +- .../Phonenumber/PhonenumberHelper.php | 2 +- src/Bundle/ChillMainBundle/Routing/MenuTwig.php | 2 +- .../Security/Authorization/AuthorizationHelper.php | 6 +++--- .../Security/Resolver/ScopeResolverDispatcher.php | 2 +- .../Tests/Search/SearchProviderTest.php | 2 +- .../Normalizer/PhonenumberNormalizerTest.php | 2 +- .../DataFixtures/ORM/LoadCustomFields.php | 4 ++-- .../DependencyInjection/ChillPersonExtension.php | 12 ++++++------ .../AccompanyingPeriodLocationHistory.php | 10 +++++----- .../AccompanyingPeriodStepHistory.php | 2 +- .../AccompanyingPeriod/AccompanyingPeriodWork.php | 14 +++++++------- .../AccompanyingPeriodWorkGoal.php | 2 +- .../Entity/AccompanyingPeriod/Resource.php | 2 +- .../Entity/AccompanyingPeriod/UserHistory.php | 2 +- .../Entity/Household/PersonHouseholdAddress.php | 6 +++--- src/Bundle/ChillPersonBundle/Entity/Person.php | 14 +++++++------- .../Entity/Person/PersonCenterCurrent.php | 2 +- .../Entity/Person/PersonResource.php | 6 +++--- .../ChillPersonBundle/Entity/PersonAltName.php | 2 +- .../Entity/PersonNotDuplicate.php | 6 +++--- .../Entity/SocialWork/SocialAction.php | 8 ++++---- .../Entity/SocialWork/SocialIssue.php | 4 ++-- .../CreatorJobAggregator.php | 3 +-- .../Export/Helper/ListAccompanyingPeriodHelper.php | 2 ++ .../PersonControllerUpdateWithHiddenFieldsTest.php | 2 +- .../PersonControllerViewWithHiddenFieldsTest.php | 2 +- ...mpanyingPeriodWorkAssociatePersonOnWorkTest.php | 2 +- src/Bundle/ChillReportBundle/Entity/Report.php | 8 ++++---- .../Tests/Timeline/TimelineProviderTest.php | 2 +- .../migrations/Version20150622233319.php | 2 +- src/Bundle/ChillTaskBundle/Entity/AbstractTask.php | 8 ++++---- src/Bundle/ChillTaskBundle/Entity/SingleTask.php | 2 +- .../Entity/Task/AbstractTaskPlaceEvent.php | 2 +- .../Entity/Task/SingleTaskPlaceEvent.php | 2 +- 58 files changed, 114 insertions(+), 113 deletions(-) diff --git a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php index 2bb8a985d..f43a0fdfb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Entity/AsideActivity.php @@ -32,7 +32,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @Assert\NotBlank */ - private \Chill\MainBundle\Entity\User $agent; + private User $agent; /** * @ORM\Column(type="datetime") @@ -44,7 +44,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @ORM\JoinColumn(nullable=false) */ - private \Chill\MainBundle\Entity\User $createdBy; + private User $createdBy; /** * @ORM\Column(type="datetime") @@ -82,7 +82,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\AsideActivityBundle\Entity\AsideActivityCategory $type = null; + private ?AsideActivityCategory $type = null; /** * @ORM\Column(type="datetime", nullable=true) @@ -92,7 +92,7 @@ class AsideActivity implements TrackCreationInterface, TrackUpdateInterface /** * @ORM\ManyToOne(targetEntity=User::class) */ - private \Chill\MainBundle\Entity\User $updatedBy; + private User $updatedBy; public function getAgent(): ?User { diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php index b75d23e5e..93eeafdea 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php @@ -38,7 +38,7 @@ class CustomField * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup", * inversedBy="customFields") */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldGroup = null; + private ?CustomFieldsGroup $customFieldGroup = null; /** * @ORM\Id diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php index b6f371c8e..a17bb5aaf 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php @@ -63,7 +63,7 @@ class Option * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option $parent = null; + private ?Option $parent = null; /** * A json representation of text (multilingual). diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php index fbf100a95..cb5f8da7a 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsDefaultGroup.php @@ -33,7 +33,7 @@ class CustomFieldsDefaultGroup * * sf4 check: option inversedBy="customFields" return inconsistent error mapping !! */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $customFieldsGroup = null; + private ?CustomFieldsGroup $customFieldsGroup = null; /** * @ORM\Column(type="string", length=255) diff --git a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php index 310e64b62..6d3abbc66 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php +++ b/src/Bundle/ChillCustomFieldsBundle/Tests/Service/CustomFieldsHelperTest.php @@ -25,7 +25,7 @@ final class CustomFieldsHelperTest extends KernelTestCase { private ?object $cfHelper = null; - private \Chill\CustomFieldsBundle\Entity\CustomField $randomCFText; + private CustomField $randomCFText; protected function setUp(): void { diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index e4990b1b8..d4d6dc945 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -37,7 +37,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface * @ORM\JoinColumn(name="category_id_inside_bundle", referencedColumnName="id_inside_bundle") * }) */ - private ?\Chill\DocStoreBundle\Entity\DocumentCategory $category = null; + private ?DocumentCategory $category = null; /** * @ORM\Column(type="datetime") @@ -61,12 +61,12 @@ class Document implements TrackCreationInterface, TrackUpdateInterface * message="Upload a document" * ) */ - private ?\Chill\DocStoreBundle\Entity\StoredObject $object = null; + private ?StoredObject $object = null; /** * @ORM\ManyToOne(targetEntity="Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate") */ - private ?\Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate $template = null; + private ?DocGeneratorTemplate $template = null; /** * @ORM\Column(type="text") diff --git a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php index 40b1a73b8..84056a3b9 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/PersonDocument.php @@ -43,7 +43,7 @@ class PersonDocument extends Document implements HasCenterInterface, HasScopeInt * * @var Scope The document's center */ - private ?\Chill\MainBundle\Entity\Scope $scope = null; + private ?Scope $scope = null; public function getCenter() { diff --git a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php index b0ce372ff..9785c20b0 100644 --- a/src/Bundle/ChillEventBundle/Controller/ParticipationController.php +++ b/src/Bundle/ChillEventBundle/Controller/ParticipationController.php @@ -548,7 +548,7 @@ class ParticipationController extends AbstractController Request $request, Participation $participation, bool $multiple = false - ): array|\Chill\EventBundle\Entity\Participation { + ): array|Participation { $em = $this->getDoctrine()->getManager(); if ($em->contains($participation)) { diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index 5ecc97afd..9d7b4d935 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -35,12 +35,12 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Center") */ - private ?\Chill\MainBundle\Entity\Center $center = null; + private ?Center $center = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") */ - private ?\Chill\MainBundle\Entity\Scope $circle = null; + private ?Scope $circle = null; /** * @ORM\Column(type="datetime") @@ -59,7 +59,7 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $moderator = null; + private ?User $moderator = null; /** * @ORM\Column(type="string", length=150) @@ -78,7 +78,7 @@ class Event implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\EventType") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Event constructor. diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index 8dda85c99..37899262f 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -37,7 +37,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * targetEntity="Chill\EventBundle\Entity\Event", * inversedBy="participations") */ - private ?\Chill\EventBundle\Entity\Event $event = null; + private ?Event $event = null; /** * @ORM\Id @@ -56,17 +56,17 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role") */ - private ?\Chill\EventBundle\Entity\Role $role = null; + private ?Role $role = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status") */ - private ?\Chill\EventBundle\Entity\Status $status = null; + private ?Status $status = null; /** * @return Center diff --git a/src/Bundle/ChillEventBundle/Entity/Role.php b/src/Bundle/ChillEventBundle/Entity/Role.php index 3d2264d2f..d0e07021e 100644 --- a/src/Bundle/ChillEventBundle/Entity/Role.php +++ b/src/Bundle/ChillEventBundle/Entity/Role.php @@ -50,7 +50,7 @@ class Role * targetEntity="Chill\EventBundle\Entity\EventType", * inversedBy="roles") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Get active. diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php index 22fe8e3ed..3c4237eb5 100644 --- a/src/Bundle/ChillEventBundle/Entity/Status.php +++ b/src/Bundle/ChillEventBundle/Entity/Status.php @@ -50,7 +50,7 @@ class Status * targetEntity="Chill\EventBundle\Entity\EventType", * inversedBy="statuses") */ - private ?\Chill\EventBundle\Entity\EventType $type = null; + private ?EventType $type = null; /** * Get active. diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php index 345da5bc5..78bdc96d5 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/ApiController.php @@ -175,7 +175,7 @@ class ApiController extends AbstractCRUDController public function indexApi(Request $request, string $_format) { return match ($request->getMethod()) { - Request::METHOD_GET, REQUEST::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format), + Request::METHOD_GET, Request::METHOD_HEAD => $this->indexApiAction('_index', $request, $_format), default => throw $this->createNotFoundException('This method is not supported'), }; } diff --git a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php index 0c68798f9..da14d85ff 100644 --- a/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php +++ b/src/Bundle/ChillMainBundle/Command/ChillUserSendRenewPasswordCodeCommand.php @@ -57,12 +57,12 @@ class ChillUserSendRenewPasswordCodeCommand extends Command /** * The current input interface. */ - private ?\Symfony\Component\Console\Input\InputInterface $input = null; + private ?InputInterface $input = null; /** * The current output interface. */ - private ?\Symfony\Component\Console\Output\OutputInterface $output = null; + private ?OutputInterface $output = null; public function __construct( LoggerInterface $logger, diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php index f95a3cf66..68f16cd01 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php @@ -26,7 +26,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt { protected $faker; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function __construct() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php index 4f0d24501..9f36a315e 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php @@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class LoadCountries extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php index 54025cc2f..70c7e90a9 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php @@ -27,7 +27,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, private array $ancientToExclude = ['ang', 'egy', 'fro', 'goh', 'grc', 'la', 'non', 'peo', 'pro', 'sga', 'dum', 'enm', 'frm', 'gmh', 'mga', 'akk', 'phn', 'zxx', 'got', 'und', ]; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; // The regional version of language are language with _ in the code // This array contains regional code to not exclude diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php index 946632513..3058ed635 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php @@ -23,7 +23,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class LoadLocationType extends AbstractFixture implements ContainerAwareInterface, OrderedFixtureInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php index d22da6b78..766d2246b 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php @@ -53,7 +53,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde ], ]; - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function getOrder() { diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index 5c33ef1b3..b62f1f2d7 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -261,7 +261,7 @@ class ChillMainExtension extends Extension implements 'ST_X' => STX::class, 'ST_Y' => STY::class, 'GREATEST' => Greatest::class, - 'LEAST' => LEAST::class, + 'LEAST' => Least::class, ], 'datetime_functions' => [ 'EXTRACT' => Extract::class, diff --git a/src/Bundle/ChillMainBundle/Entity/PostalCode.php b/src/Bundle/ChillMainBundle/Entity/PostalCode.php index 5aba8030c..b4c246bd5 100644 --- a/src/Bundle/ChillMainBundle/Entity/PostalCode.php +++ b/src/Bundle/ChillMainBundle/Entity/PostalCode.php @@ -59,7 +59,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface * * @groups({"read"}) */ - private ?\Chill\MainBundle\Doctrine\Model\Point $center = null; + private ?Point $center = null; /** * @ORM\Column(type="string", length=100) @@ -73,7 +73,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface * * @groups({"write", "read"}) */ - private ?\Chill\MainBundle\Entity\Country $country = null; + private ?Country $country = null; /** * @ORM\Column(type="datetime_immutable", nullable=true, options={"default": null}) diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php index 7916d9891..6bda2afec 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php @@ -84,7 +84,7 @@ class UserJobHistory return $this; } - public function setJob(?UserJob $job): UserJobHistory + public function setJob(?UserJob $job): User\UserJobHistory { $this->job = $job; @@ -98,7 +98,7 @@ class UserJobHistory return $this; } - public function setUser(User $user): UserJobHistory + public function setUser(User $user): User\UserJobHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php index 6ac768de2..a82599ed6 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php @@ -84,7 +84,7 @@ class UserScopeHistory return $this; } - public function setScope(?Scope $scope): UserScopeHistory + public function setScope(?Scope $scope): User\UserScopeHistory { $this->scope = $scope; @@ -98,7 +98,7 @@ class UserScopeHistory return $this; } - public function setUser(User $user): UserScopeHistory + public function setUser(User $user): User\UserScopeHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php index 6b87ed6ef..f4b4da609 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedRoleScopeType.php @@ -26,7 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ class ComposedRoleScopeType extends AbstractType { - private readonly \Chill\MainBundle\Security\RoleProvider $roleProvider; + private readonly RoleProvider $roleProvider; /** * @var string[] diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php index 462f379cf..9006268bd 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php @@ -33,7 +33,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface private bool $isConfigured = false; - private readonly PhonenumberUtil $phoneNumberUtil; + private readonly PhoneNumberUtil $phoneNumberUtil; private Client $twilioClient; diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index 39e35c040..2989187a8 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -22,7 +22,7 @@ use Twig\TwigFunction; */ class MenuTwig extends AbstractExtension implements ContainerAwareInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; /** * the default parameters for chillMenu. diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index 6d9454fe0..7e5d8a325 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -61,7 +61,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return User[] */ - public function findUsersReaching(string $role, array|\Chill\MainBundle\Entity\Center $center, array|\Chill\MainBundle\Entity\Scope $scope = null, bool $onlyEnabled = true): array + public function findUsersReaching(string $role, array|Center $center, array|Scope $scope = null, bool $onlyEnabled = true): array { return $this->userACLAwareRepository ->findUsersByReachedACL($role, $center, $scope, $onlyEnabled); @@ -126,7 +126,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return Scope[] */ - public function getReachableCircles(UserInterface $user, string $role, array|\Chill\MainBundle\Entity\Center $center) + public function getReachableCircles(UserInterface $user, string $role, array|Center $center) { $scopes = []; @@ -168,7 +168,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @param Center|Center[] $center May be an array of center */ - public function userCanReachCenter(User $user, array|\Chill\MainBundle\Entity\Center $center): bool + public function userCanReachCenter(User $user, array|Center $center): bool { if ($center instanceof \Traversable) { foreach ($center as $c) { diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index a3298eab5..ce1e16862 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -37,7 +37,7 @@ final readonly class ScopeResolverDispatcher /** * @return Scope|iterable|Scope|null */ - public function resolveScope(mixed $entity, ?array $options = []): null|\Chill\MainBundle\Entity\Scope|iterable + public function resolveScope(mixed $entity, ?array $options = []): null|iterable|Scope { foreach ($this->resolvers as $resolver) { if ($resolver->supports($entity, $options)) { diff --git a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php index b8ce37fff..d1602f7e2 100644 --- a/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Search/SearchProviderTest.php @@ -25,7 +25,7 @@ use PHPUnit\Framework\TestCase; */ final class SearchProviderTest extends TestCase { - private \Chill\MainBundle\Search\SearchProvider $search; + private SearchProvider $search; protected function setUp(): void { diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php index eda761dc1..583dfc4cc 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/PhonenumberNormalizerTest.php @@ -40,7 +40,7 @@ final class PhonenumberNormalizerTest extends TestCase /** * @dataProvider dataProviderNormalizePhonenumber */ - public function testNormalize(?Phonenumber $phonenumber, mixed $format, mixed $context, mixed $expected) + public function testNormalize(?PhoneNumber $phonenumber, mixed $format, mixed $context, mixed $expected) { $parameterBag = $this->prophesize(ParameterBagInterface::class); $parameterBag->get(Argument::exact('chill_main'))->willReturn(['phone_helper' => ['default_carrier_code' => 'BE']]); diff --git a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php index 47548ff2c..baf18cebc 100644 --- a/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php +++ b/src/Bundle/ChillPersonBundle/DataFixtures/ORM/LoadCustomFields.php @@ -25,9 +25,9 @@ use Doctrine\Persistence\ObjectManager; class LoadCustomFields extends AbstractFixture implements OrderedFixtureInterface { - private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfText = null; + private ?CustomField $cfText = null; - private ?\Chill\CustomFieldsBundle\Entity\CustomField $cfChoice = null; + private ?CustomField $cfChoice = null; /** * /** diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 18861e01f..3d5c0bc64 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -147,7 +147,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $container->prependExtensionConfig('chill_main', [ 'cruds' => [ [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\ClosingMotive::class, + 'class' => AccompanyingPeriod\ClosingMotive::class, 'name' => 'closing_motive', 'base_path' => '/admin/person/closing-motive', 'form_class' => \Chill\PersonBundle\Form\ClosingMotiveType::class, @@ -168,7 +168,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Origin::class, + 'class' => AccompanyingPeriod\Origin::class, 'name' => 'origin', 'base_path' => '/admin/person/origin', 'form_class' => \Chill\PersonBundle\Form\OriginType::class, @@ -535,7 +535,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Comment::class, + 'class' => AccompanyingPeriod\Comment::class, 'name' => 'accompanying_period_comment', 'base_path' => '/api/1.0/person/accompanying-period/comment', 'base_role' => 'ROLE_USER', @@ -554,7 +554,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Resource::class, + 'class' => AccompanyingPeriod\Resource::class, 'name' => 'accompanying_period_resource', 'base_path' => '/api/1.0/person/accompanying-period/resource', 'base_role' => 'ROLE_USER', @@ -573,7 +573,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\Origin::class, + 'class' => AccompanyingPeriod\Origin::class, 'name' => 'accompanying_period_origin', 'base_path' => '/api/1.0/person/accompanying-period/origin', 'controller' => \Chill\PersonBundle\Controller\OpeningApiController::class, @@ -718,7 +718,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac ], ], [ - 'class' => \Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork::class, + 'class' => AccompanyingPeriod\AccompanyingPeriodWork::class, 'name' => 'accompanying_period_work', 'base_path' => '/api/1.0/person/accompanying-course/work', 'controller' => \Chill\PersonBundle\Controller\AccompanyingCourseWorkApiController::class, diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php index 700076506..ab6e66f1c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php @@ -91,14 +91,14 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface return $this->startDate; } - public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory + public function setAddressLocation(?Address $addressLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->addressLocation = $addressLocation; return $this; } - public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory + public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->endDate = $endDate; @@ -108,21 +108,21 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface /** * @internal use AccompanyingPeriod::addLocationHistory */ - public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory + public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->period = $period; return $this; } - public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory + public function setPersonLocation(?Person $personLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->personLocation = $personLocation; return $this; } - public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory + public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory { $this->startDate = $startDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php index 15b2f0d2e..5a3ed774c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php @@ -108,7 +108,7 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda return $this; } - public function setStep(string $step): AccompanyingPeriodStepHistory + public function setStep(string $step): AccompanyingPeriod\AccompanyingPeriodStepHistory { $this->step = $step; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index a35dc3abf..afb4b1c82 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -255,7 +255,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues $this->referrersHistory = new ArrayCollection(); } - public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self { if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) { $this->accompanyingPeriodWorkEvaluations[] = $evaluation; @@ -265,7 +265,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function addGoal(AccompanyingPeriodWorkGoal $goal): self + public function addGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self { if (!$this->goals->contains($goal)) { $this->goals[] = $goal; @@ -288,7 +288,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues { if (!$this->getReferrers()->contains($referrer)) { $this->referrersHistory[] = - new AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); + new AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); } return $this; @@ -393,8 +393,8 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues public function getReferrers(): ReadableCollection { $users = $this->referrersHistory - ->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) - ->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) + ->filter(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) + ->map(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) ->getValues() ; @@ -452,7 +452,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this->updatedBy; } - public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self + public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self { $this->accompanyingPeriodWorkEvaluations ->removeElement($evaluation); @@ -461,7 +461,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function removeGoal(AccompanyingPeriodWorkGoal $goal): self + public function removeGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self { if ($this->goals->removeElement($goal)) { // set the owning side to null (unless already changed) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php index a569f3a9d..c0a1528ad 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWorkGoal.php @@ -35,7 +35,7 @@ class AccompanyingPeriodWorkGoal /** * @ORM\ManyToOne(targetEntity=AccompanyingPeriodWork::class, inversedBy="goals") */ - private ?\Chill\PersonBundle\Entity\AccompanyingPeriod\AccompanyingPeriodWork $accompanyingPeriodWork = null; + private ?AccompanyingPeriodWork $accompanyingPeriodWork = null; /** * @ORM\ManyToOne(targetEntity=Goal::class) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index 515816637..99ef4f7da 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php @@ -107,7 +107,7 @@ class Resource /** * @Groups({"read"}) */ - public function getResource(): null|\Chill\PersonBundle\Entity\Person|\Chill\ThirdPartyBundle\Entity\ThirdParty + public function getResource(): null|Person|ThirdParty { return $this->person ?? $this->thirdParty; } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php index 41b798a3f..29696cfe1 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php @@ -86,7 +86,7 @@ class UserHistory implements TrackCreationInterface return $this->user; } - public function setEndDate(?\DateTimeImmutable $endDate): UserHistory + public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\UserHistory { $this->endDate = $endDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php index 453176334..529f3e0a6 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/PersonHouseholdAddress.php @@ -52,7 +52,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\MainBundle\Entity\Address $address = null; + private ?Address $address = null; /** * @ORM\Id @@ -61,7 +61,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\PersonBundle\Entity\Household\Household $household = null; + private ?Household $household = null; /** * @ORM\Id @@ -70,7 +70,7 @@ class PersonHouseholdAddress * * @ORM\JoinColumn(nullable=false) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\Column(type="date_immutable") diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index db06be0f4..050be3260 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -227,7 +227,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Civility $civility = null; + private ?Civility $civility = null; /** * Contact information for contacting the person. @@ -245,7 +245,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Country $countryOfBirth = null; + private ?Country $countryOfBirth = null; /** * @ORM\Column(type="datetime", nullable=true, options={"default": NULL}) @@ -257,7 +257,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\User $createdBy = null; + private ?User $createdBy = null; /** * Cache the computation of household. @@ -390,7 +390,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\PersonBundle\Entity\MaritalStatus $maritalStatus = null; + private ?MaritalStatus $maritalStatus = null; /** * Comment on marital status. @@ -433,7 +433,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @ORM\JoinColumn(nullable=true) */ - private ?\Chill\MainBundle\Entity\Country $nationality = null; + private ?Country $nationality = null; /** * Number of children. @@ -525,7 +525,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * targetEntity=User::class * ) */ - private ?\Chill\MainBundle\Entity\User $updatedBy = null; + private ?User $updatedBy = null; /** * Person constructor. @@ -1356,7 +1356,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI /** * @return PersonResource[]|Collection */ - public function getResources(): array|\Doctrine\Common\Collections\Collection + public function getResources(): array|Collection { return $this->resources; } diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php index 551f8fd03..3cc618af4 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php @@ -63,7 +63,7 @@ class PersonCenterCurrent * * @internal Should not be instantied, unless inside Person entity */ - public function __construct(PersonCenterHistory $history) + public function __construct(Person\PersonCenterHistory $history) { $this->person = $history->getPerson(); $this->center = $history->getCenter(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php index c5c2c8d08..7f0a3e978 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php @@ -71,7 +71,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface * * @Groups({"read", "docgen:read"}) */ - private ?PersonResourceKind $kind = null; + private ?Person\PersonResourceKind $kind = null; /** * The person which host the owner of this resource. @@ -127,7 +127,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this->id; } - public function getKind(): ?PersonResourceKind + public function getKind(): ?Person\PersonResourceKind { return $this->kind; } @@ -196,7 +196,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setKind(?PersonResourceKind $kind): self + public function setKind(?Person\PersonResourceKind $kind): self { $this->kind = $kind; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php index 9b6b24621..78d820298 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php @@ -52,7 +52,7 @@ class PersonAltName * inversedBy="altNames" * ) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * Get id. diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php index ad0f4236f..7d296576c 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonNotDuplicate.php @@ -43,17 +43,17 @@ class PersonNotDuplicate /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person1 = null; + private ?Person $person1 = null; /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person2 = null; + private ?Person $person2 = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $user = null; + private ?User $user = null; public function __construct() { diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php index 8361399f5..19fd7395b 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialAction.php @@ -79,7 +79,7 @@ class SocialAction /** * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="socialActions") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $issue = null; + private ?SocialIssue $issue = null; /** * @ORM\Column(type="float", name="ordering", options={"default": 0.0}) @@ -89,7 +89,7 @@ class SocialAction /** * @ORM\ManyToOne(targetEntity=SocialAction::class, inversedBy="children") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialAction $parent = null; + private ?SocialAction $parent = null; /** * @var Collection @@ -166,7 +166,7 @@ class SocialAction * * @return Collection|SocialAction[] a list with the elements of the given list which are parent of other elements in the given list */ - public static function findAncestorSocialActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection + public static function findAncestorSocialActions(array|Collection $socialActions): Collection { $ancestors = new ArrayCollection(); @@ -246,7 +246,7 @@ class SocialAction /** * @param Collection|SocialAction[] $socialActions */ - public static function getDescendantsWithThisForActions(array|\Doctrine\Common\Collections\Collection $socialActions): Collection + public static function getDescendantsWithThisForActions(array|Collection $socialActions): Collection { $unique = []; diff --git a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php index 12e1c1742..397e5a826 100644 --- a/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php +++ b/src/Bundle/ChillPersonBundle/Entity/SocialWork/SocialIssue.php @@ -57,7 +57,7 @@ class SocialIssue /** * @ORM\ManyToOne(targetEntity=SocialIssue::class, inversedBy="children") */ - private ?\Chill\PersonBundle\Entity\SocialWork\SocialIssue $parent = null; + private ?SocialIssue $parent = null; /** * @var Collection @@ -115,7 +115,7 @@ class SocialIssue * * @return Collection|SocialIssue[] */ - public static function findAncestorSocialIssues(array|\Doctrine\Common\Collections\Collection $socialIssues): Collection + public static function findAncestorSocialIssues(array|Collection $socialIssues): Collection { $ancestors = new ArrayCollection(); diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php index 53906931a..bc2232a65 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php @@ -16,7 +16,6 @@ use Chill\MainBundle\Export\AggregatorInterface; use Chill\MainBundle\Repository\UserJobRepository; use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; -use Doctrine\ORM\Query\Expr; use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\FormBuilderInterface; @@ -59,7 +58,7 @@ class CreatorJobAggregator implements AggregatorInterface ->leftJoin( UserJobHistory::class, "{$p}_jobHistory", - Expr\Join::WITH, + Join::WITH, $qb->expr()->andX( $qb->expr()->eq("{$p}_jobHistory.user", "{$p}_userHistory.createdBy"), // et si il est null ? $qb->expr()->andX( diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index 5865bb4da..9b8902ba6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -110,6 +110,8 @@ final readonly class ListAccompanyingPeriodHelper return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)); }, 'acpCreatedBy', 'acpUpdatedBy', 'referrer' => $this->userHelper->getLabel($key, $values, 'export.list.acp.'.$key), + 'acpParticipantsPersons' => function ($value) { + }, 'locationPersonName', 'requestorPerson' => function ($value) use ($key) { if ('_header' === $value) { return 'export.list.acp.'.$key; diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php index a89f5adc7..db77c5672 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerUpdateWithHiddenFieldsTest.php @@ -34,7 +34,7 @@ final class PersonControllerUpdateWithHiddenFieldsTest extends WebTestCase private ?object $em = null; - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @var string The url using for seeing the person's information diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php index 3fbbf667b..6463c246b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerViewWithHiddenFieldsTest.php @@ -23,7 +23,7 @@ final class PersonControllerViewWithHiddenFieldsTest extends WebTestCase { private ?object $em = null; - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @var string The url to view the person details diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php index 6b6e7b7b4..6eb058f2c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingPeriodWorkAssociatePersonOnWorkTest.php @@ -33,7 +33,7 @@ final class CountAccompanyingPeriodWorkAssociatePersonOnWorkTest extends Abstrac $em = self::$container->get(EntityManagerInterface::class); yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(true)); - yield new CountAccompanyingPeriodWorkAssociatePersonOnwork($em, $this->getParameters(false)); + yield new CountAccompanyingPeriodWorkAssociatePersonOnWork($em, $this->getParameters(false)); } public function getFormData(): array diff --git a/src/Bundle/ChillReportBundle/Entity/Report.php b/src/Bundle/ChillReportBundle/Entity/Report.php index 1db2ed080..53878aa10 100644 --- a/src/Bundle/ChillReportBundle/Entity/Report.php +++ b/src/Bundle/ChillReportBundle/Entity/Report.php @@ -41,7 +41,7 @@ class Report implements HasCenterInterface, HasScopeInterface * @ORM\ManyToOne( * targetEntity="Chill\CustomFieldsBundle\Entity\CustomFieldsGroup") */ - private ?\Chill\CustomFieldsBundle\Entity\CustomFieldsGroup $cFGroup = null; + private ?CustomFieldsGroup $cFGroup = null; /** * @ORM\Column(type="datetime") @@ -60,17 +60,17 @@ class Report implements HasCenterInterface, HasScopeInterface /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\Scope") */ - private ?\Chill\MainBundle\Entity\Scope $scope = null; + private ?Scope $scope = null; /** * @ORM\ManyToOne(targetEntity="Chill\MainBundle\Entity\User") */ - private ?\Chill\MainBundle\Entity\User $user = null; + private ?User $user = null; /** * @return Center diff --git a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php index ad6a16e57..d7a4054f7 100644 --- a/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Timeline/TimelineProviderTest.php @@ -28,7 +28,7 @@ final class TimelineProviderTest extends WebTestCase { private static ?object $em = null; - private \Chill\PersonBundle\Entity\Person $person; + private Person $person; /** * @var Report diff --git a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php index 15827738e..268335cbc 100644 --- a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php +++ b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php @@ -22,7 +22,7 @@ use Symfony\Component\DependencyInjection\ContainerInterface; */ class Version20150622233319 extends AbstractMigration implements ContainerAwareInterface { - private ?\Symfony\Component\DependencyInjection\ContainerInterface $container = null; + private ?ContainerInterface $container = null; public function down(Schema $schema): void { diff --git a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php index 51ab8166d..948f9a81a 100644 --- a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php @@ -39,14 +39,14 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\MainBundle\Entity\User $assignee = null; + private ?User $assignee = null; /** * @ORM\ManyToOne( * targetEntity="\Chill\MainBundle\Entity\Scope" * ) */ - private ?\Chill\MainBundle\Entity\Scope $circle = null; + private ?Scope $circle = null; /** * @ORM\Column(name="closed", type="boolean", options={ "default": false }) @@ -60,7 +60,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\PersonBundle\Entity\AccompanyingPeriod $course = null; + private ?AccompanyingPeriod $course = null; /** * @ORM\Column(name="current_states", type="json", options={"jsonb"=true, "default"="[]"}) @@ -83,7 +83,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface * * @Serializer\Groups({"read"}) */ - private ?\Chill\PersonBundle\Entity\Person $person = null; + private ?Person $person = null; /** * @ORM\Column(name="title", type="text") diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index 91dfeaf61..f5ed0d3b0 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -71,7 +71,7 @@ class SingleTask extends AbstractTask * inversedBy="singleTasks" * ) */ - private ?\Chill\TaskBundle\Entity\RecurringTask $recurringTask = null; + private ?RecurringTask $recurringTask = null; /** * @ORM\Column(name="start_date", type="date", nullable=true) diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php index 8a47eda19..367bfbfb8 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php @@ -26,7 +26,7 @@ class AbstractTaskPlaceEvent * targetEntity="\Chill\MainBundle\Entity\User" * ) */ - private ?\Chill\MainBundle\Entity\User $author = null; + private ?User $author = null; /** * @ORM\Column(name="data", type="json") diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php index 47e3eabfb..50f1dce64 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php @@ -48,7 +48,7 @@ class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent * inversedBy="taskPlaceEvents" * ) */ - protected ?\Chill\TaskBundle\Entity\SingleTask $task = null; + protected ?SingleTask $task = null; public function getTask(): SingleTask { From 15a927a9f83c97b2376ae123fec67bca1a4d7195 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Jan 2024 12:46:20 +0100 Subject: [PATCH 20/82] [Export][List of accompanying periods] Add a list of persons, names and ids --- .../unreleased/Feature-20240122-124849.yaml | 6 +++++ .../Helper/ListAccompanyingPeriodHelper.php | 24 ++++++++++++++++++- .../translations/messages.fr.yml | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Feature-20240122-124849.yaml diff --git a/.changes/unreleased/Feature-20240122-124849.yaml b/.changes/unreleased/Feature-20240122-124849.yaml new file mode 100644 index 000000000..82703bd2c --- /dev/null +++ b/.changes/unreleased/Feature-20240122-124849.yaml @@ -0,0 +1,6 @@ +kind: Feature +body: '[Export][List of accompanyign period] Add two columns: the list of persons + participating to the period, and their ids' +time: 2024-01-22T12:48:49.824833412+01:00 +custom: + Issue: "241" diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index 9b8902ba6..2c2bc1d02 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -18,6 +18,7 @@ use Chill\MainBundle\Export\Helper\ExportAddressHelper; use Chill\MainBundle\Export\Helper\UserHelper; use Chill\MainBundle\Templating\TranslatableStringHelperInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; +use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\Household\PersonHouseholdAddress; use Chill\PersonBundle\Entity\SocialWork\SocialIssue; use Chill\PersonBundle\Repository\PersonRepository; @@ -40,6 +41,8 @@ final readonly class ListAccompanyingPeriodHelper 'closingDate', 'referrer', 'referrerSince', + 'acpParticipantPersons', + 'acpParticipantPersonsIds', 'administrativeLocation', 'locationIsPerson', 'locationIsTemp', @@ -79,6 +82,7 @@ final readonly class ListAccompanyingPeriodHelper private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator, private UserHelper $userHelper, + private LabelPersonHelper $labelPersonHelper, ) { } @@ -110,7 +114,20 @@ final readonly class ListAccompanyingPeriodHelper return $this->translatableStringHelper->localize(json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR)); }, 'acpCreatedBy', 'acpUpdatedBy', 'referrer' => $this->userHelper->getLabel($key, $values, 'export.list.acp.'.$key), - 'acpParticipantsPersons' => function ($value) { + + 'acpParticipantPersons' => $this->labelPersonHelper->getLabelMulti($key, $values, 'export.list.acp.'.$key), + 'acpParticipantPersonsIds' => function ($value) use ($key): string { + if ('_header' === $value) { + return 'export.list.acp.'.$key; + } + + if (null === $value || '' === $value) { + return ''; + } + + $keys = json_decode((string) $value, true, 512, JSON_THROW_ON_ERROR); + + return implode('|', $keys); }, 'locationPersonName', 'requestorPerson' => function ($value) use ($key) { if ('_header' === $value) { @@ -224,6 +241,11 @@ final readonly class ListAccompanyingPeriodHelper ->addSelect(sprintf('%s_t.%s AS %s', $entity, $field, $entity)); } + // persons + $qb + ->addSelect(sprintf('(SELECT AGGREGATE(IDENTITY(participant_persons_n.person)) FROM %s participant_persons_n WHERE participant_persons_n.accompanyingPeriod = acp) AS acpParticipantPersons', AccompanyingPeriodParticipation::class)) + ->addSelect(sprintf('(SELECT AGGREGATE(IDENTITY(participant_persons_ids.person)) FROM %s participant_persons_ids WHERE participant_persons_ids.accompanyingPeriod = acp) AS acpParticipantPersonsIds', AccompanyingPeriodParticipation::class)); + // step at date $qb ->addSelect('stepHistory.step AS step') diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 82c538c69..60dd6b09b 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1296,6 +1296,8 @@ export: socialIssues: Problématiques sociales requestorPerson: Demandeur (personne) requestorThirdParty: Demandeur (tiers) + acpParticipantPersons: Usagers concernés + acpParticipantPersonsIds: Usagers concernés (identifiants) eval: List of evaluations: Liste des évaluations From 7a126026990cbe080a7f429164ac636bc217459d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Jan 2024 10:51:48 +0100 Subject: [PATCH 21/82] fix testContextGenerationDataNormalizeDenormalizeGetData The method `Relationship::getOpposite` does not only compare the object equality, but also the object id. --- .../Entity/Relationships/Relationship.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php index f736913ae..ce56fa013 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php +++ b/src/Bundle/ChillPersonBundle/Entity/Relationships/Relationship.php @@ -147,10 +147,16 @@ class Relationship implements TrackCreationInterface, TrackUpdateInterface public function getOpposite(Person $counterpart): Person { if ($this->fromPerson !== $counterpart && $this->toPerson !== $counterpart) { - throw new \RuntimeException('the counterpart is neither the from nor to person for this relationship'); + // during tests, comparing using equality does not work. We have to compare the ids + if ( + ($this->fromPerson->getId() === $counterpart->getId() && $this->toPerson->getId() === $counterpart->getId()) + || null === $counterpart->getId() + ) { + throw new \RuntimeException(sprintf('the counterpart is neither the from nor to person for this relationship, expecting counterpart from %d and available %d and %d', $counterpart->getId(), $this->getFromPerson()->getId(), $this->getToPerson()->getId())); + } } - if ($this->fromPerson === $counterpart) { + if ($this->fromPerson === $counterpart || $this->fromPerson->getId() === $counterpart->getId()) { return $this->toPerson; } From 0bf6c07e8d3dfa7f9cae9ecd2a14da2e29ec48a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Jan 2024 11:32:22 +0100 Subject: [PATCH 22/82] Add Symfony Deprecations Helper to Gitlab CI configuration The Gitlab CI configuration for the Chill Project has been updated to include the Symfony Deprecations Helper setting. This addition helps to avoid direct deprecations and provide a more efficient testing process. The helper is integrated using Symfony's PHPUnit bridge. --- .gitlab-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e976a4d18..945d13532 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -34,6 +34,8 @@ variables: DEFAULT_CARRIER_CODE: BE # force a timezone TZ: Europe/Brussels + # avoid direct deprecations (using symfony phpunit bridge: https://symfony.com/doc/4.x/components/phpunit_bridge.html#internal-deprecations + SYMFONY_DEPRECATIONS_HELPER: max[total]=99999999&max[self]=0&max[direct]=0&verbose=0 stages: - Composer install From 51ebc253aa752c83a4f11982a201a05adb771503 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 24 Jan 2024 15:07:24 +0000 Subject: [PATCH 23/82] fix url of the base skeleton --- docs/source/installation/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/installation/index.rst b/docs/source/installation/index.rst index 9e6f2ed87..67a0b6ec6 100644 --- a/docs/source/installation/index.rst +++ b/docs/source/installation/index.rst @@ -48,7 +48,7 @@ Clone or download the chill-skeleton project and `cd` into the main directory. .. code-block:: bash - git clone https://gitlab.com/Chill-Projet/chill-skeleton-basic.git + git clone https://gitea.champs-libres.be/Chill-project/chill-skeleton-basic.git cd chill-skeleton-basic From 036fe8d6f868d1878b5eba5900d7014e1ad2371a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 10:43:53 +0100 Subject: [PATCH 24/82] upgrade php-cs 3.49 --- .../ByActivityTypeAggregator.php | 2 +- .../Aggregator/ActivityPresenceAggregator.php | 2 +- .../Aggregator/ActivityTypeAggregator.php | 2 +- .../ActivityDocumentACLAwareRepository.php | 8 +- ...ityDocumentACLAwareRepositoryInterface.php | 4 +- .../Repository/ActivityPresenceRepository.php | 2 +- .../ActivityPresenceRepositoryInterface.php | 2 +- .../Repository/ActivityTypeRepository.php | 2 +- ...anyingPeriodActivityGenericDocProvider.php | 4 +- .../PersonActivityGenericDocProvider.php | 2 +- .../Authorization/ActivityVoterTest.php | 2 +- .../Controller/AsideActivityController.php | 2 +- .../AsideActivityCategoryRepository.php | 2 +- .../Entity/AbstractElement.php | 4 +- .../Repository/ChargeKindRepository.php | 2 +- .../ChargeKindRepositoryInterface.php | 2 +- .../Repository/ResourceKindRepository.php | 2 +- .../ResourceKindRepositoryInterface.php | 2 +- .../migrations/Version20221207105407.php | 2 +- .../Exception/UserAbsenceSyncException.php | 2 +- .../Connector/MSGraph/MSUserAbsenceReader.php | 2 +- .../MSGraph/MSUserAbsenceReaderInterface.php | 2 +- .../Connector/MSGraph/MachineHttpClient.php | 4 +- .../Connector/MSGraph/MapCalendarToUser.php | 4 +- .../MSGraph/OnBehalfOfUserHttpClient.php | 4 +- .../MSGraphRemoteCalendarConnector.php | 2 +- .../Connector/NullRemoteCalendarConnector.php | 2 +- .../RemoteCalendarConnectorInterface.php | 2 +- .../Repository/CalendarACLAwareRepository.php | 4 +- .../CalendarACLAwareRepositoryInterface.php | 4 +- .../Repository/CalendarDocRepository.php | 2 +- .../CalendarDocRepositoryInterface.php | 2 +- .../Repository/CalendarRangeRepository.php | 6 +- .../Repository/CalendarRepository.php | 10 +-- .../Repository/InviteRepository.php | 2 +- ...anyingPeriodCalendarGenericDocProvider.php | 4 +- .../PersonCalendarGenericDocProvider.php | 4 +- .../DocGenerator/CalendarContextTest.php | 4 +- .../CustomFieldsGroupController.php | 2 +- .../CustomFields/CustomFieldChoice.php | 4 +- .../Entity/CustomField.php | 2 +- .../Entity/CustomFieldLongChoice/Option.php | 2 +- .../Entity/CustomFieldsGroup.php | 2 +- .../Service/CustomFieldProvider.php | 2 +- .../GeneratorDriver/DriverInterface.php | 2 +- .../Exception/TemplateException.php | 2 +- .../GeneratorDriver/RelatorioDriver.php | 2 +- .../DocGeneratorTemplateRepository.php | 4 +- .../Helper/NormalizeNullValueHelper.php | 2 +- .../Service/Context/BaseContextData.php | 2 +- .../Service/Generator/Generator.php | 6 +- .../Service/Generator/GeneratorException.php | 2 +- .../Service/Generator/GeneratorInterface.php | 6 +- .../RelatedEntityNotFoundException.php | 2 +- .../Service/Context/BaseContextDataTest.php | 2 +- .../ChillDocStoreBundle/Entity/Document.php | 2 +- ...ForAccompanyingPeriodProviderInterface.php | 8 +- .../GenericDocForPersonProviderInterface.php | 8 +- .../GenericDoc/Manager.php | 30 +++---- ...anyingCourseDocumentGenericDocProvider.php | 6 +- .../PersonDocumentGenericDocProvider.php | 10 +-- .../AccompanyingCourseDocumentRepository.php | 2 +- .../Repository/DocumentCategoryRepository.php | 2 +- .../PersonDocumentACLAwareRepository.php | 8 +- ...sonDocumentACLAwareRepositoryInterface.php | 12 +-- .../Repository/PersonDocumentRepository.php | 2 +- .../Repository/StoredObjectRepository.php | 2 +- .../WopiEditTwigExtensionRuntime.php | 6 +- .../Tests/GenericDoc/ManagerTest.php | 4 +- ...ngCourseDocumentGenericDocProviderTest.php | 2 +- .../PersonDocumentACLAwareRepositoryTest.php | 8 +- .../Tests/StoredObjectManagerTest.php | 4 +- src/Bundle/ChillEventBundle/Entity/Event.php | 2 +- .../ChillEventBundle/Entity/Participation.php | 14 ++-- src/Bundle/ChillEventBundle/Entity/Role.php | 2 +- src/Bundle/ChillEventBundle/Entity/Status.php | 2 +- .../Form/ChoiceLoader/EventChoiceLoader.php | 2 +- .../CRUD/Controller/CRUDController.php | 12 +-- .../Controller/ExportController.php | 6 +- .../Controller/PermissionsGroupController.php | 2 +- .../Controller/UserController.php | 6 +- .../ChillMainBundle/Cron/CronJobInterface.php | 2 +- .../ChillMainBundle/Cron/CronManager.php | 2 +- .../Cron/CronManagerInterface.php | 2 +- .../ORM/LoadAddressReferences.php | 2 +- .../DataFixtures/ORM/LoadCountries.php | 2 +- .../DataFixtures/ORM/LoadLanguages.php | 2 +- .../DataFixtures/ORM/LoadLocationType.php | 2 +- .../DataFixtures/ORM/LoadUsers.php | 2 +- .../ChillMainBundle/Doctrine/DQL/Extract.php | 2 +- .../Doctrine/DQL/JsonExtract.php | 2 +- .../ChillMainBundle/Doctrine/DQL/ToChar.php | 2 +- .../Hydration/FlatHierarchyEntityHydrator.php | 2 +- src/Bundle/ChillMainBundle/Entity/Address.php | 6 +- .../Entity/AddressReference.php | 2 +- .../ChillMainBundle/Entity/PostalCode.php | 2 +- .../ChillMainBundle/Entity/RoleScope.php | 4 +- src/Bundle/ChillMainBundle/Entity/User.php | 4 +- .../Entity/User/UserJobHistory.php | 4 +- .../Entity/User/UserScopeHistory.php | 4 +- .../ChillMainBundle/Export/ExportManager.php | 8 +- .../Export/Helper/UserHelper.php | 2 +- .../ChoiceLoader/PostalCodeChoiceLoader.php | 2 +- .../IdToEntityDataTransformer.php | 2 +- .../ChillMainBundle/Notification/Mailer.php | 2 +- .../Pagination/PaginatorFactory.php | 4 +- .../PhoneNumberHelperInterface.php | 2 +- .../Phonenumber/PhonenumberHelper.php | 2 +- .../Repository/AddressReferenceRepository.php | 4 +- .../Repository/AddressRepository.php | 6 +- .../Repository/CenterRepository.php | 4 +- .../Repository/CivilityRepository.php | 2 +- .../CivilityRepositoryInterface.php | 2 +- .../Repository/CountryRepository.php | 6 +- .../Repository/CronJobExecutionRepository.php | 2 +- .../CronJobExecutionRepositoryInterface.php | 2 +- .../GeographicalUnitLayerLayerRepository.php | 2 +- .../Repository/GeographicalUnitRepository.php | 2 +- .../Repository/GroupCenterRepository.php | 4 +- .../Repository/LanguageRepository.php | 4 +- .../LanguageRepositoryInterface.php | 4 +- .../Repository/NotificationRepository.php | 4 +- .../Repository/PermissionsGroupRepository.php | 4 +- .../Repository/PostalCodeRepository.php | 4 +- .../PostalCodeRepositoryInterface.php | 4 +- .../Repository/RegroupmentRepository.php | 4 +- .../Repository/RoleScopeRepository.php | 4 +- .../Repository/SavedExportRepository.php | 4 +- .../SavedExportRepositoryInterface.php | 4 +- .../Repository/ScopeRepository.php | 4 +- .../Repository/ScopeRepositoryInterface.php | 4 +- .../Repository/UserJobRepository.php | 2 +- .../Repository/UserJobRepositoryInterface.php | 2 +- .../Repository/UserRepository.php | 10 +-- .../Repository/UserRepositoryInterface.php | 6 +- .../Workflow/EntityWorkflowRepository.php | 12 +-- .../Workflow/EntityWorkflowStepRepository.php | 4 +- .../ChillMainBundle/Routing/MenuTwig.php | 2 +- .../Search/SearchApiNoQueryException.php | 2 +- .../Authorization/AuthorizationHelper.php | 4 +- .../AuthorizationHelperForCurrentUser.php | 2 +- ...orizationHelperForCurrentUserInterface.php | 2 +- .../AuthorizationHelperInterface.php | 2 +- .../Resolver/ScopeResolverDispatcher.php | 2 +- .../CommentEmbeddableDocGenNormalizer.php | 4 +- .../Normalizer/EntityWorkflowNormalizer.php | 4 +- .../EntityWorkflowStepNormalizer.php | 4 +- .../Normalizer/NotificationNormalizer.php | 4 +- .../Normalizer/PhonenumberNormalizer.php | 4 +- .../PrivateCommentEmbeddableNormalizer.php | 6 +- ...ddressWithReferenceOrPostalCodeCronJob.php | 2 +- ...eographicalUnitMaterializedViewCronJob.php | 2 +- .../Import/AddressReferenceBaseImporter.php | 6 +- .../Import/GeographicalUnitBaseImporter.php | 2 +- .../Service/Mailer/ChillMailer.php | 2 +- .../Templating/Listing/FilterOrderHelper.php | 4 +- .../Listing/FilterOrderHelperBuilder.php | 4 +- .../Cron/CronJobDatabaseInteractionTest.php | 2 +- .../Tests/Cron/CronManagerTest.php | 4 +- .../Tests/Export/ExportManagerTest.php | 10 +-- .../Tests/Export/SortExportElementTest.php | 2 +- .../Email/NotificationMailerTest.php | 2 +- .../Normalizer/DateNormalizerTest.php | 2 +- .../Normalizer/UserNormalizerTest.php | 6 +- .../Util/DateRangeCovering.php | 4 +- .../Workflow/Helper/MetadataExtractor.php | 2 +- .../AccompanyingPeriodStepChangeCronjob.php | 2 +- .../AccompanyingPeriodStepChanger.php | 2 +- .../ReassignAccompanyingPeriodController.php | 2 +- .../SocialWork/SocialIssueController.php | 2 +- .../Doctrine/DQL/AddressPart.php | 2 +- .../Entity/AccompanyingPeriod.php | 22 ++--- .../AccompanyingPeriodLocationHistory.php | 10 +-- .../AccompanyingPeriodStepHistory.php | 2 +- .../AccompanyingPeriodWork.php | 16 ++-- .../Entity/AccompanyingPeriod/Resource.php | 4 +- .../Entity/AccompanyingPeriod/UserHistory.php | 2 +- .../ChillPersonBundle/Entity/HasPerson.php | 2 +- .../Entity/Household/Household.php | 24 +++--- .../Entity/Household/HouseholdMember.php | 4 +- .../ChillPersonBundle/Entity/Person.php | 24 +++--- .../Entity/Person/PersonCenterCurrent.php | 2 +- .../Entity/Person/PersonResource.php | 6 +- .../Entity/PersonAltName.php | 2 +- .../ClosingDateAggregator.php | 2 +- .../JobWorkingOnCourseAggregator.php | 2 +- .../OpeningDateAggregator.php | 2 +- .../ScopeWorkingOnCourseAggregator.php | 2 +- .../UserWorkingOnCourseAggregator.php | 2 +- .../ChildrenNumberAggregator.php | 2 +- .../PersonAggregators/CenterAggregator.php | 2 +- .../PostalCodeAggregator.php | 2 +- .../Export/Helper/LabelPersonHelper.php | 2 +- .../Form/ChoiceLoader/PersonChoiceLoader.php | 2 +- .../ChillPersonBundle/Form/PersonType.php | 2 +- .../Household/MembersEditor.php | 2 +- .../Household/MembersEditorFactory.php | 2 +- .../AccompanyingPeriodInfoRepository.php | 2 +- ...PeriodWorkEvaluationDocumentRepository.php | 2 +- ...mpanyingPeriodWorkEvaluationRepository.php | 2 +- .../AccompanyingPeriodWorkRepository.php | 4 +- .../ClosingMotiveRepository.php | 2 +- .../AccompanyingPeriodACLAwareRepository.php | 8 +- ...nyingPeriodACLAwareRepositoryInterface.php | 6 +- .../AccompanyingPeriodRepository.php | 4 +- .../HouseholdCompositionRepository.php | 4 +- ...ouseholdCompositionRepositoryInterface.php | 4 +- .../HouseholdCompositionTypeRepository.php | 2 +- ...holdCompositionTypeRepositoryInterface.php | 2 +- .../Household/HouseholdRepository.php | 2 +- .../PersonHouseholdAddressRepository.php | 4 +- .../Household/PositionRepository.php | 2 +- .../Repository/MaritalStatusRepository.php | 2 +- .../MaritalStatusRepositoryInterface.php | 2 +- .../Person/PersonCenterHistoryRepository.php | 2 +- .../Repository/PersonACLAwareRepository.php | 80 +++++++++---------- .../PersonACLAwareRepositoryInterface.php | 60 +++++++------- .../Repository/PersonRepository.php | 4 +- .../Repository/PersonResourceRepository.php | 4 +- .../Relationships/RelationRepository.php | 2 +- .../Relationships/RelationshipRepository.php | 2 +- .../ResidentialAddressRepository.php | 4 +- .../SocialWork/EvaluationRepository.php | 4 +- .../EvaluationRepositoryInterface.php | 4 +- .../Repository/SocialWork/GoalRepository.php | 6 +- .../SocialWork/ResultRepository.php | 8 +- .../SocialWork/SocialActionRepository.php | 6 +- .../SocialWork/SocialIssueRepository.php | 4 +- ...PeriodWorkEvaluationDocumentNormalizer.php | 4 +- ...mpanyingPeriodWorkEvaluationNormalizer.php | 4 +- .../AccompanyingPeriodWorkNormalizer.php | 4 +- .../Normalizer/WorkflowNormalizer.php | 4 +- ...PeriodWorkEvaluationGenericDocProvider.php | 6 +- .../Events/PersonMoveEventSubscriberTest.php | 8 +- .../Controller/PersonControllerCreateTest.php | 2 +- .../Tests/Household/MembersEditorTest.php | 4 +- ...companyingPeriodACLAwareRepositoryTest.php | 2 +- .../Authorization/PersonVoterTest.php | 2 +- .../Normalizer/PersonDocGenNormalizerTest.php | 22 ++--- .../DocGenerator/PersonContextTest.php | 28 +++---- ...odWorkEvaluationGenericDocProviderTest.php | 6 +- .../Authorization/ReportVoterTest.php | 4 +- .../migrations/Version20150622233319.php | 2 +- .../ChillTaskBundle/Entity/AbstractTask.php | 2 +- .../ChillTaskBundle/Entity/SingleTask.php | 8 +- .../SingleTaskAclAwareRepository.php | 24 +++--- .../SingleTaskAclAwareRepositoryInterface.php | 16 ++-- .../Repository/SingleTaskRepository.php | 4 +- .../Authorization/AuthorizationEvent.php | 2 +- .../Templating/TaskTwigExtension.php | 2 +- .../Workflow/TaskWorkflowManager.php | 2 +- .../Controller/ThirdPartyController.php | 6 +- .../Entity/ThirdParty.php | 10 +-- .../ThirdPartyACLAwareRepository.php | 6 +- .../Repository/ThirdPartyRepository.php | 4 +- .../src/Service/Controller/Responder.php | 2 +- .../Service/Controller/ResponderInterface.php | 2 +- 257 files changed, 605 insertions(+), 605 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php index d8551c11d..0f41547d9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php @@ -57,7 +57,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|int|string $value): string { + return function (int|string|null $value): string { if ('_header' === $value) { return 'export.aggregator.acp.by_activity_type.activity_type'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php index a22a75189..392ff5b19 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php @@ -35,7 +35,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|int|string $value): string { + return function (int|string|null $value): string { if ('_header' === $value) { return 'export.aggregator.activity.by_activity_presence.header'; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index 0cb185857..d433e6a86 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -58,7 +58,7 @@ class ActivityTypeAggregator implements AggregatorInterface public function getLabels($key, array $values, $data): \Closure { - return function (null|int|string $value): string { + return function (int|string|null $value): string { if ('_header' === $value) { return 'Activity type'; } diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php index 38bb42e51..0623601a5 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php @@ -36,14 +36,14 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum ) { } - public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface + public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface { $query = $this->buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext($person, $startDate, $endDate, $content); return $this->addFetchQueryByPersonACL($query, $person); } - public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + public function buildBaseFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $activityMetadata = $this->em->getClassMetadata(Activity::class); @@ -72,7 +72,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum return $this->addWhereClauses($query, $startDate, $endDate, $content); } - public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $activityMetadata = $this->em->getClassMetadata(Activity::class); @@ -123,7 +123,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum return $this->addWhereClauses($query, $startDate, $endDate, $content); } - private function addWhereClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + private function addWhereClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepositoryInterface.php b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepositoryInterface.php index dcd45c016..79c320ba2 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepositoryInterface.php @@ -25,12 +25,12 @@ interface ActivityDocumentACLAwareRepositoryInterface * * This method must check the rights to see a document: the user must be allowed to see the given activities */ - public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface; + public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface; /** * Return a fetch query for querying document's activities for an activity in accompanying periods, but for a given person. * * This method must check the rights to see a document: the user must be allowed to see the given accompanying periods */ - public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery; + public function buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery; } diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepository.php index ae3296e7f..3ed96074b 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepository.php @@ -34,7 +34,7 @@ class ActivityPresenceRepository implements ActivityPresenceRepositoryInterface return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepositoryInterface.php b/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepositoryInterface.php index d2daa1d5d..228d70856 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepositoryInterface.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityPresenceRepositoryInterface.php @@ -25,7 +25,7 @@ interface ActivityPresenceRepositoryInterface /** * @return array|ActivityPresence[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?ActivityPresence; diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepository.php index 6f7453a74..99adf4fe0 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityTypeRepository.php @@ -48,7 +48,7 @@ final class ActivityTypeRepository implements ActivityTypeRepositoryInterface /** * @return array|ActivityType[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php index ff198b345..291ef5832 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php @@ -37,7 +37,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen ) { } - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); $activityMetadata = $this->em->getClassMetadata(Activity::class); @@ -100,7 +100,7 @@ final readonly class AccompanyingPeriodActivityGenericDocProvider implements Gen return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { return $this->activityDocumentACLAwareRepository ->buildFetchQueryActivityDocumentLinkedToAccompanyingPeriodFromPersonContext($person, $startDate, $endDate, $content); diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php index 1b0ed507b..618775452 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php @@ -28,7 +28,7 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe ) { } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { return $this->personActivityDocumentACLAwareRepository->buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext( $person, diff --git a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php index b907363a3..e3ab7b60a 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Security/Authorization/ActivityVoterTest.php @@ -157,7 +157,7 @@ final class ActivityVoterTest extends KernelTestCase * * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface */ - protected function prepareToken(User $user = null) + protected function prepareToken(?User $user = null) { $token = $this->prophet->prophesize(); $token diff --git a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php index 0a7891a07..6bd2affe7 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Controller/AsideActivityController.php @@ -49,7 +49,7 @@ final class AsideActivityController extends CRUDController return $asideActivity; } - protected function buildQueryEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null) + protected function buildQueryEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null) { $qb = parent::buildQueryEntities($action, $request); diff --git a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php index 533e567b4..6735606ce 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Repository/AsideActivityCategoryRepository.php @@ -49,7 +49,7 @@ class AsideActivityCategoryRepository implements ObjectRepository * * @return AsideActivityCategory[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php b/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php index 52a52c99f..85420e670 100644 --- a/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php +++ b/src/Bundle/ChillBudgetBundle/Entity/AbstractElement.php @@ -132,14 +132,14 @@ abstract class AbstractElement return $this; } - public function setComment(string $comment = null): self + public function setComment(?string $comment = null): self { $this->comment = $comment; return $this; } - public function setEndDate(\DateTimeInterface $endDate = null): self + public function setEndDate(?\DateTimeInterface $endDate = null): self { if ($endDate instanceof \DateTime) { $this->endDate = \DateTimeImmutable::createFromMutable($endDate); diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php index 577be07db..a0c23a4ad 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepository.php @@ -66,7 +66,7 @@ final class ChargeKindRepository implements ChargeKindRepositoryInterface * * @return array */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php index 7a930bea8..d9ec3e269 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ChargeKindRepositoryInterface.php @@ -36,7 +36,7 @@ interface ChargeKindRepositoryInterface extends ObjectRepository /** * @return array */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?ChargeKind; diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php index e10913195..723f26748 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepository.php @@ -71,7 +71,7 @@ final class ResourceKindRepository implements ResourceKindRepositoryInterface * * @return list */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepositoryInterface.php b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepositoryInterface.php index d639d54ee..950487225 100644 --- a/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepositoryInterface.php +++ b/src/Bundle/ChillBudgetBundle/Repository/ResourceKindRepositoryInterface.php @@ -36,7 +36,7 @@ interface ResourceKindRepositoryInterface extends ObjectRepository /** * @return list */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?ResourceKind; diff --git a/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php b/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php index 1d2707120..cfe3a0089 100644 --- a/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php +++ b/src/Bundle/ChillBudgetBundle/migrations/Version20221207105407.php @@ -32,7 +32,7 @@ final class Version20221207105407 extends AbstractMigration implements Container return 'Use new budget admin entities'; } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillCalendarBundle/Exception/UserAbsenceSyncException.php b/src/Bundle/ChillCalendarBundle/Exception/UserAbsenceSyncException.php index dd2c0b9c2..7466f93a4 100644 --- a/src/Bundle/ChillCalendarBundle/Exception/UserAbsenceSyncException.php +++ b/src/Bundle/ChillCalendarBundle/Exception/UserAbsenceSyncException.php @@ -13,7 +13,7 @@ namespace Chill\CalendarBundle\Exception; class UserAbsenceSyncException extends \LogicException { - public function __construct(string $message = '', int $code = 20_230_706, \Throwable $previous = null) + public function __construct(string $message = '', int $code = 20_230_706, ?\Throwable $previous = null) { parent::__construct($message, $code, $previous); } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php index 2d1006cca..58cd04dfa 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php @@ -33,7 +33,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft */ - public function isUserAbsent(User $user): null|bool + public function isUserAbsent(User $user): bool|null { $id = $this->mapCalendarToUser->getUserId($user); diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php index f67562e27..a918bb7ea 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReaderInterface.php @@ -18,5 +18,5 @@ interface MSUserAbsenceReaderInterface /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft */ - public function isUserAbsent(User $user): null|bool; + public function isUserAbsent(User $user): bool|null; } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php index ce490ce3f..f84d04120 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MachineHttpClient.php @@ -29,7 +29,7 @@ class MachineHttpClient implements HttpClientInterface private readonly HttpClientInterface $decoratedClient; - public function __construct(private readonly MachineTokenStorage $machineTokenStorage, HttpClientInterface $decoratedClient = null) + public function __construct(private readonly MachineTokenStorage $machineTokenStorage, ?HttpClientInterface $decoratedClient = null) { $this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create(); } @@ -68,7 +68,7 @@ class MachineHttpClient implements HttpClientInterface return $this->decoratedClient->request($method, $url, $options); } - public function stream($responses, float $timeout = null): ResponseStreamInterface + public function stream($responses, ?float $timeout = null): ResponseStreamInterface { return $this->decoratedClient->stream($responses, $timeout); } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php index 70a0fae55..aa3b1c4a4 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MapCalendarToUser.php @@ -178,8 +178,8 @@ class MapCalendarToUser public function writeSubscriptionMetadata( User $user, int $expiration, - string $id = null, - string $secret = null + ?string $id = null, + ?string $secret = null ): void { $user->setAttributeByDomain(self::METADATA_KEY, self::EXPIRATION_SUBSCRIPTION_EVENT, $expiration); diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserHttpClient.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserHttpClient.php index d969a56b6..02c9ea806 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserHttpClient.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/OnBehalfOfUserHttpClient.php @@ -29,7 +29,7 @@ class OnBehalfOfUserHttpClient private readonly HttpClientInterface $decoratedClient; - public function __construct(private readonly OnBehalfOfUserTokenStorage $tokenStorage, HttpClientInterface $decoratedClient = null) + public function __construct(private readonly OnBehalfOfUserTokenStorage $tokenStorage, ?HttpClientInterface $decoratedClient = null) { $this->decoratedClient = $decoratedClient ?? \Symfony\Component\HttpClient\HttpClient::create(); } @@ -63,7 +63,7 @@ class OnBehalfOfUserHttpClient return $this->decoratedClient->request($method, $url, $options); } - public function stream($responses, float $timeout = null): ResponseStreamInterface + public function stream($responses, ?float $timeout = null): ResponseStreamInterface { return $this->decoratedClient->stream($responses, $timeout); } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php index 23f83688a..27297f3ac 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraphRemoteCalendarConnector.php @@ -171,7 +171,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface } } - public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void + public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void { if ('' === $remoteId) { return; diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php index 4acb40554..7da67df0c 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php @@ -46,7 +46,7 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface return []; } - public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void + public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void { } diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/RemoteCalendarConnectorInterface.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/RemoteCalendarConnectorInterface.php index 53d2c8602..1e3c16845 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/RemoteCalendarConnectorInterface.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/RemoteCalendarConnectorInterface.php @@ -47,7 +47,7 @@ interface RemoteCalendarConnectorInterface */ public function listEventsForUser(User $user, \DateTimeImmutable $startDate, \DateTimeImmutable $endDate, ?int $offset = 0, ?int $limit = 50): array; - public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, CalendarRange $associatedCalendarRange = null): void; + public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void; public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void; diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php index c91794c6b..a3350a7cd 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepository.php @@ -159,7 +159,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface /** * @return array|Calendar[] */ - public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array + public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array { $qb = $this->buildQueryByAccompanyingPeriod($period, $startDate, $endDate)->select('c'); @@ -178,7 +178,7 @@ class CalendarACLAwareRepository implements CalendarACLAwareRepositoryInterface return $qb->getQuery()->getResult(); } - public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array + public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array { $qb = $this->buildQueryByPerson($person, $startDate, $endDate) ->select('c'); diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepositoryInterface.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepositoryInterface.php index f6d1b5c17..78f71229d 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarACLAwareRepositoryInterface.php @@ -46,7 +46,7 @@ interface CalendarACLAwareRepositoryInterface /** * @return array|Calendar[] */ - public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array; + public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array; /** * Return all the calendars which are associated with a person, either on @see{Calendar::person} or within. @@ -58,5 +58,5 @@ interface CalendarACLAwareRepositoryInterface * * @return array|Calendar[] */ - public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], int $offset = null, int $limit = null): array; + public function findByPerson(Person $person, ?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?array $orderBy = [], ?int $offset = null, ?int $limit = null): array; } diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php index fb71717d0..dd593bf3c 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepository.php @@ -35,7 +35,7 @@ class CalendarDocRepository implements ObjectRepository, CalendarDocRepositoryIn return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepositoryInterface.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepositoryInterface.php index 6d86fd943..d2b1951df 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepositoryInterface.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarDocRepositoryInterface.php @@ -25,7 +25,7 @@ interface CalendarDocRepositoryInterface /** * @return array|CalendarDoc[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null); + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null); public function findOneBy(array $criteria): ?CalendarDoc; diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php index a707ccde9..d6e1ac8a5 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRangeRepository.php @@ -52,7 +52,7 @@ class CalendarRangeRepository implements ObjectRepository /** * @return array|CalendarRange[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -64,8 +64,8 @@ class CalendarRangeRepository implements ObjectRepository User $user, \DateTimeImmutable $from, \DateTimeImmutable $to, - int $limit = null, - int $offset = null + ?int $limit = null, + ?int $offset = null ): array { $qb = $this->buildQueryAvailableRangesForUser($user, $from, $to); diff --git a/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php index 486493b21..3121854e5 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/CalendarRepository.php @@ -46,7 +46,7 @@ class CalendarRepository implements ObjectRepository ->getSingleScalarResult(); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -67,7 +67,7 @@ class CalendarRepository implements ObjectRepository /** * @return array|Calendar[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -75,7 +75,7 @@ class CalendarRepository implements ObjectRepository /** * @return array|Calendar[] */ - public function findByAccompanyingPeriod(AccompanyingPeriod $period, array $orderBy = null, int $limit = null, int $offset = null): array + public function findByAccompanyingPeriod(AccompanyingPeriod $period, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->findBy( [ @@ -87,7 +87,7 @@ class CalendarRepository implements ObjectRepository ); } - public function findByNotificationAvailable(\DateTimeImmutable $startDate, \DateTimeImmutable $endDate, int $limit = null, int $offset = null): array + public function findByNotificationAvailable(\DateTimeImmutable $startDate, \DateTimeImmutable $endDate, ?int $limit = null, ?int $offset = null): array { $qb = $this->queryByNotificationAvailable($startDate, $endDate)->select('c'); @@ -105,7 +105,7 @@ class CalendarRepository implements ObjectRepository /** * @return array|Calendar[] */ - public function findByUser(User $user, \DateTimeImmutable $from, \DateTimeImmutable $to, int $limit = null, int $offset = null): array + public function findByUser(User $user, \DateTimeImmutable $from, \DateTimeImmutable $to, ?int $limit = null, ?int $offset = null): array { $qb = $this->buildQueryByUser($user, $from, $to)->select('c'); diff --git a/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php index c6f163aa3..8778330f8 100644 --- a/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php +++ b/src/Bundle/ChillCalendarBundle/Repository/InviteRepository.php @@ -41,7 +41,7 @@ class InviteRepository implements ObjectRepository /** * @return array|Invite[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null) { return $this->entityRepository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php index 7b566a2f1..faca60a67 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php @@ -44,7 +44,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen /** * @throws MappingException */ - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); @@ -91,7 +91,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen return $this->security->isGranted(CalendarVoter::SEE, $accompanyingPeriod); } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php index 7b7a8f96d..f088e27ba 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php @@ -40,7 +40,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe ) { } - private function addWhereClausesToQuery(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); @@ -74,7 +74,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe /** * @throws MappingException */ - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $classMetadata = $this->em->getClassMetadata(CalendarDoc::class); $storedObjectMetadata = $this->em->getClassMetadata(StoredObject::class); diff --git a/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php b/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php index 506baa98b..4a4b4f7d4 100644 --- a/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php +++ b/src/Bundle/ChillCalendarBundle/Tests/Service/DocGenerator/CalendarContextTest.php @@ -202,8 +202,8 @@ final class CalendarContextTest extends TestCase } private function buildCalendarContext( - EntityManagerInterface $entityManager = null, - NormalizerInterface $normalizer = null + ?EntityManagerInterface $entityManager = null, + ?NormalizerInterface $normalizer = null ): CalendarContext { $baseContext = $this->prophesize(BaseContextData::class); $baseContext->getData(null)->willReturn(['base_context' => 'data']); diff --git a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php index b88a005dc..a218e2cd2 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php +++ b/src/Bundle/ChillCustomFieldsBundle/Controller/CustomFieldsGroupController.php @@ -363,7 +363,7 @@ class CustomFieldsGroupController extends AbstractController * * @return \Symfony\Component\Form\Form */ - private function createMakeDefaultForm(CustomFieldsGroup $group = null) + private function createMakeDefaultForm(?CustomFieldsGroup $group = null) { return $this->createFormBuilder($group, [ 'method' => 'POST', diff --git a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php index 3daee9ecb..b57b45bc9 100644 --- a/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php +++ b/src/Bundle/ChillCustomFieldsBundle/CustomFields/CustomFieldChoice.php @@ -156,7 +156,7 @@ class CustomFieldChoice extends AbstractCustomField return $serialized; } - public function extractOtherValue(CustomField $cf, array $data = null) + public function extractOtherValue(CustomField $cf, ?array $data = null) { return $data['_other']; } @@ -355,7 +355,7 @@ class CustomFieldChoice extends AbstractCustomField * If the value had an 'allow_other' = true option, the returned value * **is not** the content of the _other field, but the `_other` string. */ - private function guessValue(null|array|string $value) + private function guessValue(array|string|null $value) { if (null === $value) { return null; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php index 93eeafdea..6d1373fb0 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomField.php @@ -212,7 +212,7 @@ class CustomField * * @return CustomField */ - public function setCustomFieldsGroup(CustomFieldsGroup $customFieldGroup = null) + public function setCustomFieldsGroup(?CustomFieldsGroup $customFieldGroup = null) { $this->customFieldGroup = $customFieldGroup; diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php index a17bb5aaf..2d9889066 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldLongChoice/Option.php @@ -182,7 +182,7 @@ class Option /** * @return $this */ - public function setParent(Option $parent = null) + public function setParent(?Option $parent = null) { $this->parent = $parent; $this->key = $parent->getKey(); diff --git a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php index 9d2be4979..99eb51cce 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php +++ b/src/Bundle/ChillCustomFieldsBundle/Entity/CustomFieldsGroup.php @@ -139,7 +139,7 @@ class CustomFieldsGroup /** * Get name. */ - public function getName(string $language = null): array|string + public function getName(?string $language = null): array|string { // TODO set this in a service, PLUS twig function if (null !== $language) { diff --git a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php index aad28a2b2..fcccf01ed 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php +++ b/src/Bundle/ChillCustomFieldsBundle/Service/CustomFieldProvider.php @@ -84,7 +84,7 @@ class CustomFieldProvider implements ContainerAwareInterface * * @see \Symfony\Component\DependencyInjection\ContainerAwareInterface::setContainer() */ - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { if (null === $container) { throw new \LogicException('container should not be null'); diff --git a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php index a408ec8e6..4d802d2ca 100644 --- a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php +++ b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/DriverInterface.php @@ -13,5 +13,5 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver; interface DriverInterface { - public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string; + public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string; } diff --git a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/Exception/TemplateException.php b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/Exception/TemplateException.php index 9fa6f6654..041133c50 100644 --- a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/Exception/TemplateException.php +++ b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/Exception/TemplateException.php @@ -17,7 +17,7 @@ namespace Chill\DocGeneratorBundle\GeneratorDriver\Exception; */ class TemplateException extends \RuntimeException { - public function __construct(private readonly array $errors, $code = 0, \Throwable $previous = null) + public function __construct(private readonly array $errors, $code = 0, ?\Throwable $previous = null) { parent::__construct('Error while generating document from template', $code, $previous); } diff --git a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php index 547af44c9..b46ee09b2 100644 --- a/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php +++ b/src/Bundle/ChillDocGeneratorBundle/GeneratorDriver/RelatorioDriver.php @@ -33,7 +33,7 @@ final class RelatorioDriver implements DriverInterface $this->url = $parameterBag->get('chill_doc_generator')['driver']['relatorio']['url']; } - public function generateFromString(string $template, string $resourceType, array $data, string $templateName = null): string + public function generateFromString(string $template, string $resourceType, array $data, ?string $templateName = null): string { $form = new FormDataPart( [ diff --git a/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php b/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php index 85486c2ce..0f2771b4e 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php +++ b/src/Bundle/ChillDocGeneratorBundle/Repository/DocGeneratorTemplateRepository.php @@ -58,7 +58,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository * * @return DocGeneratorTemplate[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -85,7 +85,7 @@ final class DocGeneratorTemplateRepository implements ObjectRepository ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?DocGeneratorTemplate + public function findOneBy(array $criteria, ?array $orderBy = null): ?DocGeneratorTemplate { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php index c7167670d..79cf47be5 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php +++ b/src/Bundle/ChillDocGeneratorBundle/Serializer/Helper/NormalizeNullValueHelper.php @@ -20,7 +20,7 @@ class NormalizeNullValueHelper { } - public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ClassMetadataInterface $classMetadata = null) + public function normalize(array $attributes, string $format = 'docgen', ?array $context = [], ?ClassMetadataInterface $classMetadata = null) { $data = []; $data['isNull'] = true; diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php b/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php index 28092331f..2773d3816 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Context/BaseContextData.php @@ -21,7 +21,7 @@ class BaseContextData { } - public function getData(User $user = null): array + public function getData(?User $user = null): array { $data = []; diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php index 25b5f9f03..6c9a6f219 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php @@ -46,10 +46,10 @@ class Generator implements GeneratorInterface DocGeneratorTemplate $template, int $entityId, array $contextGenerationDataNormalized, - StoredObject $destinationStoredObject = null, + ?StoredObject $destinationStoredObject = null, bool $isTest = false, - File $testFile = null, - User $creator = null + ?File $testFile = null, + ?User $creator = null ): ?string { if ($destinationStoredObject instanceof StoredObject && StoredObject::STATUS_PENDING !== $destinationStoredObject->getStatus()) { $this->logger->info(self::LOG_PREFIX.'Aborting generation of an already generated document'); diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php index 2c91942bc..cd7669240 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorException.php @@ -16,7 +16,7 @@ class GeneratorException extends \RuntimeException /** * @param string[] $errors */ - public function __construct(private readonly array $errors = [], \Throwable $previous = null) + public function __construct(private readonly array $errors = [], ?\Throwable $previous = null) { parent::__construct( 'Could not generate the document', diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorInterface.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorInterface.php index 64d99f801..c4ff38ac5 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorInterface.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/GeneratorInterface.php @@ -33,9 +33,9 @@ interface GeneratorInterface DocGeneratorTemplate $template, int $entityId, array $contextGenerationDataNormalized, - StoredObject $destinationStoredObject = null, + ?StoredObject $destinationStoredObject = null, bool $isTest = false, - File $testFile = null, - User $creator = null + ?File $testFile = null, + ?User $creator = null ): ?string; } diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/RelatedEntityNotFoundException.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/RelatedEntityNotFoundException.php index a252755ea..3b1bd6f97 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/RelatedEntityNotFoundException.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/RelatedEntityNotFoundException.php @@ -13,7 +13,7 @@ namespace Chill\DocGeneratorBundle\Service\Generator; class RelatedEntityNotFoundException extends \RuntimeException { - public function __construct(string $relatedEntityClass, int $relatedEntityId, \Throwable $previous = null) + public function __construct(string $relatedEntityClass, int $relatedEntityId, ?\Throwable $previous = null) { parent::__construct( sprintf('Related entity not found: %s, %s', $relatedEntityClass, $relatedEntityId), diff --git a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php index 7ce52dee0..476f7abe4 100644 --- a/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php +++ b/src/Bundle/ChillDocGeneratorBundle/tests/Service/Context/BaseContextDataTest.php @@ -56,7 +56,7 @@ final class BaseContextDataTest extends KernelTestCase } private function buildBaseContext( - NormalizerInterface $normalizer = null + ?NormalizerInterface $normalizer = null ): BaseContextData { return new BaseContextData( $normalizer ?? self::$container->get(NormalizerInterface::class) diff --git a/src/Bundle/ChillDocStoreBundle/Entity/Document.php b/src/Bundle/ChillDocStoreBundle/Entity/Document.php index d4d6dc945..a56b6b800 100644 --- a/src/Bundle/ChillDocStoreBundle/Entity/Document.php +++ b/src/Bundle/ChillDocStoreBundle/Entity/Document.php @@ -138,7 +138,7 @@ class Document implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setObject(StoredObject $object = null) + public function setObject(?StoredObject $object = null) { $this->object = $object; diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForAccompanyingPeriodProviderInterface.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForAccompanyingPeriodProviderInterface.php index 9ceec5438..bffa19b53 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForAccompanyingPeriodProviderInterface.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForAccompanyingPeriodProviderInterface.php @@ -17,10 +17,10 @@ interface GenericDocForAccompanyingPeriodProviderInterface { public function buildFetchQueryForAccompanyingPeriod( AccompanyingPeriod $accompanyingPeriod, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, - string $origin = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, + ?string $origin = null ): FetchQueryInterface; /** diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForPersonProviderInterface.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForPersonProviderInterface.php index 815459f20..264a1d8f2 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForPersonProviderInterface.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocForPersonProviderInterface.php @@ -17,10 +17,10 @@ interface GenericDocForPersonProviderInterface { public function buildFetchQueryForPerson( Person $person, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, - string $origin = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, + ?string $origin = null ): FetchQueryInterface; /** diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Manager.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Manager.php index bfeddc8dc..a185ce9b6 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Manager.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Manager.php @@ -43,9 +43,9 @@ final readonly class Manager */ public function countDocForAccompanyingPeriod( AccompanyingPeriod $accompanyingPeriod, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, array $places = [] ): int { ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places); @@ -73,9 +73,9 @@ final readonly class Manager public function countDocForPerson( Person $person, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, array $places = [] ): int { ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places); @@ -94,9 +94,9 @@ final readonly class Manager AccompanyingPeriod $accompanyingPeriod, int $offset = 0, int $limit = 20, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, array $places = [] ): iterable { ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($accompanyingPeriod, $startDate, $endDate, $content, $places); @@ -137,9 +137,9 @@ final readonly class Manager Person $person, int $offset = 0, int $limit = 20, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, array $places = [] ): iterable { ['sql' => $sql, 'params' => $params, 'types' => $types] = $this->buildUnionQuery($person, $startDate, $endDate, $content, $places); @@ -183,9 +183,9 @@ final readonly class Manager */ private function buildUnionQuery( AccompanyingPeriod|Person $linked, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, array $places = [], ): array { $queries = []; diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php index 3ef5d5482..d45f68a38 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php @@ -34,7 +34,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen ) { } - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); @@ -59,7 +59,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen return $this->security->isGranted(AccompanyingCourseDocumentVoter::SEE, $accompanyingPeriod); } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); @@ -108,7 +108,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen return $this->security->isGranted(AccompanyingPeriodVoter::SEE, $person); } - private function addWhereClause(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + private function addWhereClause(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $classMetadata = $this->entityManager->getClassMetadata(AccompanyingCourseDocument::class); diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php index 3345b1c7e..9f4cd4aff 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php @@ -32,10 +32,10 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe public function buildFetchQueryForPerson( Person $person, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null, - string $origin = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null, + ?string $origin = null ): FetchQueryInterface { return $this->personDocumentACLAwareRepository->buildFetchQueryForPerson( $person, @@ -50,7 +50,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe return $this->security->isGranted(PersonDocumentVoter::SEE, $person); } - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { return $this->personDocumentACLAwareRepository->buildFetchQueryForAccompanyingPeriod($accompanyingPeriod, $startDate, $endDate, $content); } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/AccompanyingCourseDocumentRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/AccompanyingCourseDocumentRepository.php index 6c6e93fd7..2679993c4 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/AccompanyingCourseDocumentRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/AccompanyingCourseDocumentRepository.php @@ -55,7 +55,7 @@ class AccompanyingCourseDocumentRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/DocumentCategoryRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/DocumentCategoryRepository.php index 166749f71..460418951 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/DocumentCategoryRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/DocumentCategoryRepository.php @@ -41,7 +41,7 @@ class DocumentCategoryRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php index dacd141f3..b43605018 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php @@ -48,14 +48,14 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA return $qb; } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface { $query = $this->buildBaseFetchQueryForPerson($person, $startDate, $endDate, $content); return $this->addFetchQueryByPersonACL($query, $person); } - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $period, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $period, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface { $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); $participationMetadata = $this->em->getClassMetadata(AccompanyingPeriodParticipation::class); @@ -114,7 +114,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA return $this->addFilterClauses($query, $startDate, $endDate, $content); } - public function buildBaseFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + public function buildBaseFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); @@ -134,7 +134,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA return $this->addFilterClauses($query, $startDate, $endDate, $content); } - private function addFilterClauses(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + private function addFilterClauses(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $personDocMetadata = $this->em->getClassMetadata(PersonDocument::class); diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepositoryInterface.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepositoryInterface.php index 4bb55ce50..f1bc70812 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepositoryInterface.php @@ -29,15 +29,15 @@ interface PersonDocumentACLAwareRepositoryInterface public function buildFetchQueryForPerson( Person $person, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null ): FetchQueryInterface; public function buildFetchQueryForAccompanyingPeriod( AccompanyingPeriod $period, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null ): FetchQueryInterface; } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentRepository.php index 4dfeb74fe..f880c0d67 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentRepository.php @@ -39,7 +39,7 @@ readonly class PersonDocumentRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepository.php index 92644c97d..d2e715f7e 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepository.php @@ -44,7 +44,7 @@ final class StoredObjectRepository implements ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php b/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php index 969e4f95e..f833200c8 100644 --- a/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php +++ b/src/Bundle/ChillDocStoreBundle/Templating/WopiEditTwigExtensionRuntime.php @@ -136,13 +136,13 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt } /** - * @param array{small: boolean} $options + * @param array{small: bool} $options * * @throws \Twig\Error\LoaderError * @throws \Twig\Error\RuntimeError * @throws \Twig\Error\SyntaxError */ - public function renderButtonGroup(Environment $environment, StoredObject $document, string $title = null, bool $canEdit = true, array $options = []): string + public function renderButtonGroup(Environment $environment, StoredObject $document, ?string $title = null, bool $canEdit = true, array $options = []): string { return $environment->render(self::TEMPLATE_BUTTON_GROUP, [ 'document' => $document, @@ -153,7 +153,7 @@ final readonly class WopiEditTwigExtensionRuntime implements RuntimeExtensionInt ]); } - public function renderEditButton(Environment $environment, StoredObject $document, array $options = null): string + public function renderEditButton(Environment $environment, StoredObject $document, ?array $options = null): string { return $environment->render(self::TEMPLATE, [ 'document' => $document, diff --git a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php index 1b22a4d2e..8d4e67282 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/ManagerTest.php @@ -174,7 +174,7 @@ class ManagerTest extends KernelTestCase final readonly class SimpleGenericDocAccompanyingPeriodProvider implements GenericDocForAccompanyingPeriodProviderInterface { - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $query = new FetchQuery( 'accompanying_course_document_dummy', @@ -196,7 +196,7 @@ final readonly class SimpleGenericDocAccompanyingPeriodProvider implements Gener final readonly class SimpleGenericDocPersonProvider implements GenericDocForPersonProviderInterface { - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $query = new FetchQuery( 'dummy_person_doc', diff --git a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php index edbe59c13..1250b132c 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProviderTest.php @@ -40,7 +40,7 @@ class AccompanyingCourseDocumentGenericDocProviderTest extends KernelTestCase /** * @dataProvider provideSearchArguments */ - public function testWithoutAnyArgument(?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, string $content = null): void + public function testWithoutAnyArgument(?\DateTimeImmutable $startDate, ?\DateTimeImmutable $endDate, ?string $content = null): void { $period = $this->entityManager->createQuery('SELECT a FROM '.AccompanyingPeriod::class.' a') ->setMaxResults(1) diff --git a/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php b/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php index 6dfd521a1..d24afe17f 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/Repository/PersonDocumentACLAwareRepositoryTest.php @@ -53,7 +53,7 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase * @throws \Doctrine\ORM\NoResultException * @throws \Doctrine\ORM\NonUniqueResultException */ - public function testBuildFetchQueryForPerson(\DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): void + public function testBuildFetchQueryForPerson(?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): void { $centerManager = $this->prophesize(CenterResolverManagerInterface::class); $centerManager->resolveCenters(Argument::type(Person::class)) @@ -92,9 +92,9 @@ class PersonDocumentACLAwareRepositoryTest extends KernelTestCase */ public function testBuildFetchQueryForAccompanyingPeriod( AccompanyingPeriod $period, - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null ): void { $centerManager = $this->prophesize(CenterResolverManagerInterface::class); $centerManager->resolveCenters(Argument::type(Person::class)) diff --git a/src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php b/src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php index bf659ba9b..bb6971939 100644 --- a/src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php +++ b/src/Bundle/ChillDocStoreBundle/Tests/StoredObjectManagerTest.php @@ -90,7 +90,7 @@ final class StoredObjectManagerTest extends TestCase /** * @dataProvider getDataProvider */ - public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null) + public function testRead(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null) { if (null !== $exceptionClass) { $this->expectException($exceptionClass); @@ -104,7 +104,7 @@ final class StoredObjectManagerTest extends TestCase /** * @dataProvider getDataProvider */ - public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, string $exceptionClass = null) + public function testWrite(StoredObject $storedObject, string $encodedContent, string $clearContent, ?string $exceptionClass = null) { if (null !== $exceptionClass) { $this->expectException($exceptionClass); diff --git a/src/Bundle/ChillEventBundle/Entity/Event.php b/src/Bundle/ChillEventBundle/Entity/Event.php index 9d7b4d935..b5d013588 100644 --- a/src/Bundle/ChillEventBundle/Entity/Event.php +++ b/src/Bundle/ChillEventBundle/Entity/Event.php @@ -136,7 +136,7 @@ class Event implements HasCenterInterface, HasScopeInterface return $this->id; } - public function getModerator(): null|User + public function getModerator(): User|null { return $this->moderator; } diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index 37899262f..464feaf30 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -83,7 +83,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get event. */ - public function getEvent(): null|Event + public function getEvent(): Event|null { return $this->event; } @@ -121,7 +121,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get role. */ - public function getRole(): null|Role + public function getRole(): Role|null { return $this->role; } @@ -141,7 +141,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa /** * Get status. */ - public function getStatus(): null|Status + public function getStatus(): Status|null { return $this->status; } @@ -233,7 +233,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * * @return Participation */ - public function setEvent(Event $event = null) + public function setEvent(?Event $event = null) { if ($this->event !== $event) { $this->update(); @@ -249,7 +249,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * * @return Participation */ - public function setPerson(Person $person = null) + public function setPerson(?Person $person = null) { if ($person !== $this->person) { $this->update(); @@ -265,7 +265,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * * @return Participation */ - public function setRole(Role $role = null) + public function setRole(?Role $role = null) { if ($role !== $this->role) { $this->update(); @@ -280,7 +280,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * * @return Participation */ - public function setStatus(Status $status = null) + public function setStatus(?Status $status = null) { if ($this->status !== $status) { $this->update(); diff --git a/src/Bundle/ChillEventBundle/Entity/Role.php b/src/Bundle/ChillEventBundle/Entity/Role.php index d0e07021e..d51fb87e3 100644 --- a/src/Bundle/ChillEventBundle/Entity/Role.php +++ b/src/Bundle/ChillEventBundle/Entity/Role.php @@ -125,7 +125,7 @@ class Role * * @return Role */ - public function setType(EventType $type = null) + public function setType(?EventType $type = null) { $this->type = $type; diff --git a/src/Bundle/ChillEventBundle/Entity/Status.php b/src/Bundle/ChillEventBundle/Entity/Status.php index 3c4237eb5..59ae93df1 100644 --- a/src/Bundle/ChillEventBundle/Entity/Status.php +++ b/src/Bundle/ChillEventBundle/Entity/Status.php @@ -125,7 +125,7 @@ class Status * * @return Status */ - public function setType(EventType $type = null) + public function setType(?EventType $type = null) { $this->type = $type; diff --git a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php index 7507550c2..9aa001170 100644 --- a/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php +++ b/src/Bundle/ChillEventBundle/Form/ChoiceLoader/EventChoiceLoader.php @@ -41,7 +41,7 @@ class EventChoiceLoader implements ChoiceLoaderInterface */ public function __construct( EntityRepository $eventRepository, - array $centers = null + ?array $centers = null ) { $this->eventRepository = $eventRepository; diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index 78e559ad8..213efba24 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -181,7 +181,7 @@ class CRUDController extends AbstractController /** * Count the number of entities. */ - protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int + protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int { return $this->buildQueryEntities($action, $request) ->select('COUNT(e)') @@ -210,7 +210,7 @@ class CRUDController extends AbstractController * It is preferable to override customizeForm instead of overriding * this method. */ - protected function createFormFor(string $action, mixed $entity, string $formClass = null, array $formOptions = []): FormInterface + protected function createFormFor(string $action, mixed $entity, ?string $formClass = null, array $formOptions = []): FormInterface { $formClass ??= $this->getFormClassFor($action); @@ -463,7 +463,7 @@ class CRUDController extends AbstractController * * @throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException */ - protected function formEditAction(string $action, Request $request, mixed $id, string $formClass = null, array $formOptions = []): Response + protected function formEditAction(string $action, Request $request, mixed $id, ?string $formClass = null, array $formOptions = []): Response { $entity = $this->getEntity($action, $id, $request); @@ -660,7 +660,7 @@ class CRUDController extends AbstractController Request $request, int $totalItems, PaginatorInterface $paginator, - FilterOrderHelper $filterOrder = null + ?FilterOrderHelper $filterOrder = null ) { $query = $this->queryEntities($action, $request, $paginator, $filterOrder); @@ -670,7 +670,7 @@ class CRUDController extends AbstractController /** * @return \Chill\MainBundle\Entity\Center[] */ - protected function getReachableCenters(string $role, Scope $scope = null) + protected function getReachableCenters(string $role, ?Scope $scope = null) { return $this->getAuthorizationHelper() ->getReachableCenters($this->getUser(), $role, $scope); @@ -934,7 +934,7 @@ class CRUDController extends AbstractController * * @return type */ - protected function queryEntities(string $action, Request $request, PaginatorInterface $paginator, FilterOrderHelper $filterOrder = null) + protected function queryEntities(string $action, Request $request, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null) { $query = $this->buildQueryEntities($action, $request) ->setFirstResult($paginator->getCurrentPage()->getFirstItemNumber()) diff --git a/src/Bundle/ChillMainBundle/Controller/ExportController.php b/src/Bundle/ChillMainBundle/Controller/ExportController.php index 963e03322..2df7008d6 100644 --- a/src/Bundle/ChillMainBundle/Controller/ExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/ExportController.php @@ -334,7 +334,7 @@ class ExportController extends AbstractController * When the method is POST, the form is stored if valid, and a redirection * is done to next step. */ - private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response + private function exportFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response { $exportManager = $this->exportManager; @@ -392,7 +392,7 @@ class ExportController extends AbstractController * If the form is posted and valid, store the data in session and * redirect to the next step. */ - private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, SavedExport $savedExport = null): Response + private function formatterFormStep(Request $request, DirectExportInterface|ExportInterface $export, string $alias, ?SavedExport $savedExport = null): Response { // check we have data from the previous step (export step) $data = $this->session->get('export_step', null); @@ -521,7 +521,7 @@ class ExportController extends AbstractController * * @return Response */ - private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, SavedExport $savedExport = null) + private function selectCentersStep(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport = null) { if (!$this->filterStatsByCenters) { return $this->redirectToRoute('chill_main_export_new', [ diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php index b5fdeca7e..42d0d6a78 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php @@ -400,7 +400,7 @@ final class PermissionsGroupController extends AbstractController * get a role scope by his parameters. The role scope is persisted if it * doesn't exist in database. */ - protected function getPersistentRoleScopeBy(string $role, Scope $scope = null): RoleScope + protected function getPersistentRoleScopeBy(string $role, ?Scope $scope = null): RoleScope { $roleScope = $this->roleScopeRepository ->findOneBy(['role' => $role, 'scope' => $scope]); diff --git a/src/Bundle/ChillMainBundle/Controller/UserController.php b/src/Bundle/ChillMainBundle/Controller/UserController.php index 69e9a5d80..b335b356a 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserController.php @@ -268,7 +268,7 @@ class UserController extends CRUDController ->build(); } - protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int + protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int { if (!$filterOrder instanceof FilterOrderHelper) { return parent::countEntities($action, $request, $filterOrder); @@ -281,7 +281,7 @@ class UserController extends CRUDController return $this->userRepository->countByUsernameOrEmail($filterOrder->getQueryString()); } - protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface + protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface { // for "new", add special config if ('new' === $action) { @@ -325,7 +325,7 @@ class UserController extends CRUDController Request $request, int $totalItems, PaginatorInterface $paginator, - FilterOrderHelper $filterOrder = null + ?FilterOrderHelper $filterOrder = null ) { if (0 === $totalItems) { return []; diff --git a/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php b/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php index 41e4b41a8..dcc19f01c 100644 --- a/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php +++ b/src/Bundle/ChillMainBundle/Cron/CronJobInterface.php @@ -28,5 +28,5 @@ interface CronJobInterface * * @return array|null optionally return an array with the same data than the previous execution */ - public function run(array $lastExecutionData): null|array; + public function run(array $lastExecutionData): array|null; } diff --git a/src/Bundle/ChillMainBundle/Cron/CronManager.php b/src/Bundle/ChillMainBundle/Cron/CronManager.php index 147d035cd..14878235d 100644 --- a/src/Bundle/ChillMainBundle/Cron/CronManager.php +++ b/src/Bundle/ChillMainBundle/Cron/CronManager.php @@ -58,7 +58,7 @@ final readonly class CronManager implements CronManagerInterface ) { } - public function run(string $forceJob = null): void + public function run(?string $forceJob = null): void { if (null !== $forceJob) { $this->runForce($forceJob); diff --git a/src/Bundle/ChillMainBundle/Cron/CronManagerInterface.php b/src/Bundle/ChillMainBundle/Cron/CronManagerInterface.php index 19b151657..d2292d455 100644 --- a/src/Bundle/ChillMainBundle/Cron/CronManagerInterface.php +++ b/src/Bundle/ChillMainBundle/Cron/CronManagerInterface.php @@ -16,5 +16,5 @@ interface CronManagerInterface /** * Execute one job, with a given priority, or the given job (identified by his key). */ - public function run(string $forceJob = null): void; + public function run(?string $forceJob = null): void; } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php index 68f16cd01..d04ef29e8 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadAddressReferences.php @@ -50,7 +50,7 @@ class LoadAddressReferences extends AbstractFixture implements ContainerAwareInt $manager->flush(); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php index 9f36a315e..3433eebd7 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadCountries.php @@ -43,7 +43,7 @@ class LoadCountries extends AbstractFixture implements ContainerAwareInterface, $manager->flush(); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php index 70c7e90a9..c5c03277f 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLanguages.php @@ -57,7 +57,7 @@ class LoadLanguages extends AbstractFixture implements ContainerAwareInterface, $manager->flush(); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php index 3058ed635..aab896add 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadLocationType.php @@ -65,7 +65,7 @@ class LoadLocationType extends AbstractFixture implements ContainerAwareInterfac $manager->flush(); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php index 766d2246b..8cb335fba 100644 --- a/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php +++ b/src/Bundle/ChillMainBundle/DataFixtures/ORM/LoadUsers.php @@ -92,7 +92,7 @@ class LoadUsers extends AbstractFixture implements ContainerAwareInterface, Orde $manager->flush(); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { if (null === $container) { throw new \LogicException('$container should not be null'); diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php index 1fb51c15b..93000be9c 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/Extract.php @@ -29,7 +29,7 @@ class Extract extends FunctionNode { private string $field; - private null|\Doctrine\ORM\Query\AST\Node|string $value = null; + private \Doctrine\ORM\Query\AST\Node|string|null $value = null; // private PathExpression $value; // private FunctionNode $value; // private DateDiffFunction $value; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php index 7d93071b7..95d851790 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/JsonExtract.php @@ -18,7 +18,7 @@ use Doctrine\ORM\Query\SqlWalker; class JsonExtract extends FunctionNode { - private null|\Doctrine\ORM\Query\AST\Node|string $element = null; + private \Doctrine\ORM\Query\AST\Node|string|null $element = null; private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $keyToExtract = null; diff --git a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php index a5e73209d..ef150867e 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php +++ b/src/Bundle/ChillMainBundle/Doctrine/DQL/ToChar.php @@ -23,7 +23,7 @@ class ToChar extends FunctionNode { private ?\Doctrine\ORM\Query\AST\ArithmeticExpression $datetime = null; - private null|\Doctrine\ORM\Query\AST\Node|string $fmt = null; + private \Doctrine\ORM\Query\AST\Node|string|null $fmt = null; public function getSql(SqlWalker $sqlWalker) { diff --git a/src/Bundle/ChillMainBundle/Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php b/src/Bundle/ChillMainBundle/Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php index 704b95861..110842a2a 100644 --- a/src/Bundle/ChillMainBundle/Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php +++ b/src/Bundle/ChillMainBundle/Doctrine/ORM/Hydration/FlatHierarchyEntityHydrator.php @@ -39,7 +39,7 @@ final class FlatHierarchyEntityHydrator extends ObjectHydrator ); } - private function flatListGenerator(array $hashMap, object $parent = null): \Generator + private function flatListGenerator(array $hashMap, ?object $parent = null): \Generator { $parent = null === $parent ? null : spl_object_id($parent); $hashMap += [$parent => []]; diff --git a/src/Bundle/ChillMainBundle/Entity/Address.php b/src/Bundle/ChillMainBundle/Entity/Address.php index 94f66b6d2..f6584fddd 100644 --- a/src/Bundle/ChillMainBundle/Entity/Address.php +++ b/src/Bundle/ChillMainBundle/Entity/Address.php @@ -440,7 +440,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface return $this->getIsNoAddress(); } - public function setAddressReference(AddressReference $addressReference = null): Address + public function setAddressReference(?AddressReference $addressReference = null): Address { $this->addressReference = $addressReference; @@ -529,7 +529,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface * * @return Address */ - public function setPostcode(PostalCode $postcode = null) + public function setPostcode(?PostalCode $postcode = null) { $this->postcode = $postcode; @@ -620,7 +620,7 @@ class Address implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setValidTo(\DateTimeInterface $validTo = null): self + public function setValidTo(?\DateTimeInterface $validTo = null): self { $this->validTo = $validTo; diff --git a/src/Bundle/ChillMainBundle/Entity/AddressReference.php b/src/Bundle/ChillMainBundle/Entity/AddressReference.php index 140028da5..49b510f8c 100644 --- a/src/Bundle/ChillMainBundle/Entity/AddressReference.php +++ b/src/Bundle/ChillMainBundle/Entity/AddressReference.php @@ -219,7 +219,7 @@ class AddressReference * * @return Address */ - public function setPostcode(PostalCode $postcode = null) + public function setPostcode(?PostalCode $postcode = null) { $this->postcode = $postcode; diff --git a/src/Bundle/ChillMainBundle/Entity/PostalCode.php b/src/Bundle/ChillMainBundle/Entity/PostalCode.php index b4c246bd5..4d906d6c8 100644 --- a/src/Bundle/ChillMainBundle/Entity/PostalCode.php +++ b/src/Bundle/ChillMainBundle/Entity/PostalCode.php @@ -210,7 +210,7 @@ class PostalCode implements TrackUpdateInterface, TrackCreationInterface * * @return PostalCode */ - public function setCountry(Country $country = null) + public function setCountry(?Country $country = null) { $this->country = $country; diff --git a/src/Bundle/ChillMainBundle/Entity/RoleScope.php b/src/Bundle/ChillMainBundle/Entity/RoleScope.php index f7dc5fa2f..4777505f5 100644 --- a/src/Bundle/ChillMainBundle/Entity/RoleScope.php +++ b/src/Bundle/ChillMainBundle/Entity/RoleScope.php @@ -78,14 +78,14 @@ class RoleScope return $this->scope; } - public function setRole(string $role = null): self + public function setRole(?string $role = null): self { $this->role = $role; return $this; } - public function setScope(Scope $scope = null): self + public function setScope(?Scope $scope = null): self { $this->scope = $scope; diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 423d0f3ba..d5821c08f 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -274,7 +274,7 @@ class User implements UserInterface, \Stringable return $this->mainLocation; } - public function getMainScope(\DateTimeImmutable $at = null): ?Scope + public function getMainScope(?\DateTimeImmutable $at = null): ?Scope { $at ??= new \DateTimeImmutable('now'); @@ -326,7 +326,7 @@ class User implements UserInterface, \Stringable return $this->salt; } - public function getUserJob(\DateTimeImmutable $at = null): ?UserJob + public function getUserJob(?\DateTimeImmutable $at = null): ?UserJob { $at ??= new \DateTimeImmutable('now'); diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php index 6bda2afec..7916d9891 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserJobHistory.php @@ -84,7 +84,7 @@ class UserJobHistory return $this; } - public function setJob(?UserJob $job): User\UserJobHistory + public function setJob(?UserJob $job): UserJobHistory { $this->job = $job; @@ -98,7 +98,7 @@ class UserJobHistory return $this; } - public function setUser(User $user): User\UserJobHistory + public function setUser(User $user): UserJobHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php index a82599ed6..6ac768de2 100644 --- a/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php +++ b/src/Bundle/ChillMainBundle/Entity/User/UserScopeHistory.php @@ -84,7 +84,7 @@ class UserScopeHistory return $this; } - public function setScope(?Scope $scope): User\UserScopeHistory + public function setScope(?Scope $scope): UserScopeHistory { $this->scope = $scope; @@ -98,7 +98,7 @@ class UserScopeHistory return $this; } - public function setUser(User $user): User\UserScopeHistory + public function setUser(User $user): UserScopeHistory { $this->user = $user; diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index 067cc72e9..159b90b6b 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -89,7 +89,7 @@ class ExportManager * * @return FilterInterface[] a \Generator that contains filters. The key is the filter's alias */ - public function getFiltersApplyingOn(DirectExportInterface|ExportInterface $export, array $centers = null): array + public function getFiltersApplyingOn(DirectExportInterface|ExportInterface $export, ?array $centers = null): array { if ($export instanceof DirectExportInterface) { return []; @@ -116,7 +116,7 @@ class ExportManager * * @return array an array that contains aggregators. The key is the filter's alias */ - public function getAggregatorsApplyingOn(DirectExportInterface|ExportInterface $export, array $centers = null): array + public function getAggregatorsApplyingOn(DirectExportInterface|ExportInterface $export, ?array $centers = null): array { if ($export instanceof ListInterface || $export instanceof DirectExportInterface) { return []; @@ -450,8 +450,8 @@ class ExportManager */ public function isGrantedForElement( DirectExportInterface|ExportInterface|ModifierInterface $element, - DirectExportInterface|ExportInterface $export = null, - array $centers = null + DirectExportInterface|ExportInterface|null $export = null, + ?array $centers = null ): bool { if ($element instanceof ExportInterface || $element instanceof DirectExportInterface) { $role = $element->requiredRole(); diff --git a/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php b/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php index 693bb0376..36b126df9 100644 --- a/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php +++ b/src/Bundle/ChillMainBundle/Export/Helper/UserHelper.php @@ -34,7 +34,7 @@ class UserHelper */ public function getLabel($key, array $values, string $header): callable { - return function (null|int|string $value) use ($header) { + return function (int|string|null $value) use ($header) { if ('_header' === $value) { return $header; } diff --git a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php index 2bc89f97d..d2dd47962 100644 --- a/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php +++ b/src/Bundle/ChillMainBundle/Form/ChoiceLoader/PostalCodeChoiceLoader.php @@ -46,7 +46,7 @@ class PostalCodeChoiceLoader implements ChoiceLoaderInterface { return new \Symfony\Component\Form\ChoiceList\ArrayChoiceList( $this->lazyLoadedPostalCodes, - static fn (PostalCode $pc = null) => \call_user_func($value, $pc) + static fn (?PostalCode $pc = null) => \call_user_func($value, $pc) ); } diff --git a/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php b/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php index 3532c3d9e..1796f7ed2 100644 --- a/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php +++ b/src/Bundle/ChillMainBundle/Form/DataTransformer/IdToEntityDataTransformer.php @@ -35,7 +35,7 @@ class IdToEntityDataTransformer implements DataTransformerInterface public function __construct( private readonly ObjectRepository $repository, private readonly bool $multiple = false, - callable $getId = null + ?callable $getId = null ) { $this->getId = $getId ?? static fn (object $o) => $o->getId(); } diff --git a/src/Bundle/ChillMainBundle/Notification/Mailer.php b/src/Bundle/ChillMainBundle/Notification/Mailer.php index 246480361..d62d6bc75 100644 --- a/src/Bundle/ChillMainBundle/Notification/Mailer.php +++ b/src/Bundle/ChillMainBundle/Notification/Mailer.php @@ -74,7 +74,7 @@ class Mailer mixed $recipient, array $subject, array $bodies, - callable $callback = null, + ?callable $callback = null, mixed $force = false ) { $fromEmail = $this->routeParameters['from_email']; diff --git a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php index 166dcdb68..0daad7283 100644 --- a/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php +++ b/src/Bundle/ChillMainBundle/Pagination/PaginatorFactory.php @@ -59,8 +59,8 @@ class PaginatorFactory */ public function create( $totalItems, - string $route = null, - array $routeParameters = null + ?string $route = null, + ?array $routeParameters = null ) { return new Paginator( $totalItems, diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php b/src/Bundle/ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php index bd3eeffe5..c7cf1ddfd 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhoneNumberHelperInterface.php @@ -22,7 +22,7 @@ use libphonenumber\PhoneNumber; */ interface PhoneNumberHelperInterface { - public function format(PhoneNumber $phoneNumber = null): string; + public function format(?PhoneNumber $phoneNumber = null): string; /** * Get type (mobile, landline, ...) for phone number. diff --git a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php index 9006268bd..d08d393a3 100644 --- a/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php +++ b/src/Bundle/ChillMainBundle/Phonenumber/PhonenumberHelper.php @@ -66,7 +66,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface * * @throws NumberParseException */ - public function format(PhoneNumber $phoneNumber = null): string + public function format(?PhoneNumber $phoneNumber = null): string { if (null === $phoneNumber) { return ''; diff --git a/src/Bundle/ChillMainBundle/Repository/AddressReferenceRepository.php b/src/Bundle/ChillMainBundle/Repository/AddressReferenceRepository.php index d029226d0..86faf6ea1 100644 --- a/src/Bundle/ChillMainBundle/Repository/AddressReferenceRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/AddressReferenceRepository.php @@ -71,7 +71,7 @@ final class AddressReferenceRepository implements ObjectRepository * * @return AddressReference[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -103,7 +103,7 @@ final class AddressReferenceRepository implements ObjectRepository ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?AddressReference + public function findOneBy(array $criteria, ?array $orderBy = null): ?AddressReference { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/AddressRepository.php b/src/Bundle/ChillMainBundle/Repository/AddressRepository.php index eee1d5b1f..074b1fc32 100644 --- a/src/Bundle/ChillMainBundle/Repository/AddressRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/AddressRepository.php @@ -26,7 +26,7 @@ final class AddressRepository implements ObjectRepository $this->repository = $entityManager->getRepository(Address::class); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -50,12 +50,12 @@ final class AddressRepository implements ObjectRepository * * @return Address[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Address + public function findOneBy(array $criteria, ?array $orderBy = null): ?Address { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/CenterRepository.php b/src/Bundle/ChillMainBundle/Repository/CenterRepository.php index 46e87cb10..0b507faa1 100644 --- a/src/Bundle/ChillMainBundle/Repository/CenterRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CenterRepository.php @@ -51,12 +51,12 @@ final class CenterRepository implements CenterRepositoryInterface * * @return Center[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Center + public function findOneBy(array $criteria, ?array $orderBy = null): ?Center { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php b/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php index 9ed4cbf01..982d3dd4c 100644 --- a/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CivilityRepository.php @@ -34,7 +34,7 @@ class CivilityRepository implements CivilityRepositoryInterface return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Repository/CivilityRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/CivilityRepositoryInterface.php index f838b54e8..5d687ac7e 100644 --- a/src/Bundle/ChillMainBundle/Repository/CivilityRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/CivilityRepositoryInterface.php @@ -26,7 +26,7 @@ interface CivilityRepositoryInterface extends ObjectRepository /** * @return array|Civility[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?Civility; diff --git a/src/Bundle/ChillMainBundle/Repository/CountryRepository.php b/src/Bundle/ChillMainBundle/Repository/CountryRepository.php index 000ecb4e1..701019dba 100644 --- a/src/Bundle/ChillMainBundle/Repository/CountryRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CountryRepository.php @@ -26,7 +26,7 @@ final class CountryRepository implements ObjectRepository $this->repository = $entityManager->getRepository(Country::class); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -50,12 +50,12 @@ final class CountryRepository implements ObjectRepository * * @return Country[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Country + public function findOneBy(array $criteria, ?array $orderBy = null): ?Country { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepository.php b/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepository.php index 8fa4ea8f6..1f369ef4e 100644 --- a/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepository.php @@ -40,7 +40,7 @@ class CronJobExecutionRepository implements CronJobExecutionRepositoryInterface /** * @return array|CronJobExecution[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepositoryInterface.php index cef997edd..df894bbfb 100644 --- a/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/CronJobExecutionRepositoryInterface.php @@ -26,7 +26,7 @@ interface CronJobExecutionRepositoryInterface extends ObjectRepository /** * @return array|CronJobExecution[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?CronJobExecution; diff --git a/src/Bundle/ChillMainBundle/Repository/GeographicalUnitLayerLayerRepository.php b/src/Bundle/ChillMainBundle/Repository/GeographicalUnitLayerLayerRepository.php index 88d92a7dc..11a03c209 100644 --- a/src/Bundle/ChillMainBundle/Repository/GeographicalUnitLayerLayerRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/GeographicalUnitLayerLayerRepository.php @@ -49,7 +49,7 @@ final class GeographicalUnitLayerLayerRepository implements GeographicalUnitLaye /** * @return array|GeographicalUnitLayer[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Repository/GeographicalUnitRepository.php b/src/Bundle/ChillMainBundle/Repository/GeographicalUnitRepository.php index 2bb22b842..608609a11 100644 --- a/src/Bundle/ChillMainBundle/Repository/GeographicalUnitRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/GeographicalUnitRepository.php @@ -86,7 +86,7 @@ final class GeographicalUnitRepository implements GeographicalUnitRepositoryInte ->getResult(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): ?GeographicalUnit + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): ?GeographicalUnit { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php b/src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php index a07087369..2d9ad8c5a 100644 --- a/src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/GroupCenterRepository.php @@ -44,12 +44,12 @@ final class GroupCenterRepository implements ObjectRepository * * @return GroupCenter[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?GroupCenter + public function findOneBy(array $criteria, ?array $orderBy = null): ?GroupCenter { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/LanguageRepository.php b/src/Bundle/ChillMainBundle/Repository/LanguageRepository.php index 1bbf2c168..d8c5d54f8 100644 --- a/src/Bundle/ChillMainBundle/Repository/LanguageRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/LanguageRepository.php @@ -43,12 +43,12 @@ final class LanguageRepository implements LanguageRepositoryInterface * * @return Language[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Language + public function findOneBy(array $criteria, ?array $orderBy = null): ?Language { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/LanguageRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/LanguageRepositoryInterface.php index ab110fc24..397b264e4 100644 --- a/src/Bundle/ChillMainBundle/Repository/LanguageRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/LanguageRepositoryInterface.php @@ -29,9 +29,9 @@ interface LanguageRepositoryInterface extends ObjectRepository * * @return Language[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; - public function findOneBy(array $criteria, array $orderBy = null): ?Language; + public function findOneBy(array $criteria, ?array $orderBy = null): ?Language; public function getClassName(): string; } diff --git a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php index bc26981b2..ef7e05240 100644 --- a/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/NotificationRepository.php @@ -194,7 +194,7 @@ final class NotificationRepository implements ObjectRepository * * @return Notification[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -214,7 +214,7 @@ final class NotificationRepository implements ObjectRepository ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?Notification + public function findOneBy(array $criteria, ?array $orderBy = null): ?Notification { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/PermissionsGroupRepository.php b/src/Bundle/ChillMainBundle/Repository/PermissionsGroupRepository.php index 59b7c93a4..910d924db 100644 --- a/src/Bundle/ChillMainBundle/Repository/PermissionsGroupRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/PermissionsGroupRepository.php @@ -57,12 +57,12 @@ final class PermissionsGroupRepository implements ObjectRepository * * @return PermissionsGroup[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?PermissionsGroup + public function findOneBy(array $criteria, ?array $orderBy = null): ?PermissionsGroup { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php index 45e10816a..0949f52ba 100644 --- a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepository.php @@ -54,7 +54,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -79,7 +79,7 @@ final class PostalCodeRepository implements PostalCodeRepositoryInterface ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?PostalCode + public function findOneBy(array $criteria, ?array $orderBy = null): ?PostalCode { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php index 590598cb0..fe3dee195 100644 --- a/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/PostalCodeRepositoryInterface.php @@ -32,11 +32,11 @@ interface PostalCodeRepositoryInterface extends ObjectRepository * * @return PostalCode[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; public function findByPattern(string $pattern, ?Country $country, ?int $start = 0, ?int $limit = 50): array; - public function findOneBy(array $criteria, array $orderBy = null): ?PostalCode; + public function findOneBy(array $criteria, ?array $orderBy = null): ?PostalCode; public function getClassName(): string; } diff --git a/src/Bundle/ChillMainBundle/Repository/RegroupmentRepository.php b/src/Bundle/ChillMainBundle/Repository/RegroupmentRepository.php index cd51b7913..e18279944 100644 --- a/src/Bundle/ChillMainBundle/Repository/RegroupmentRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/RegroupmentRepository.php @@ -51,12 +51,12 @@ final class RegroupmentRepository implements ObjectRepository * * @return Regroupment[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Regroupment + public function findOneBy(array $criteria, ?array $orderBy = null): ?Regroupment { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php b/src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php index 6ee488ffe..ddf52af5b 100644 --- a/src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/RoleScopeRepository.php @@ -44,12 +44,12 @@ final class RoleScopeRepository implements ObjectRepository * * @return RoleScope[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?RoleScope + public function findOneBy(array $criteria, ?array $orderBy = null): ?RoleScope { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/SavedExportRepository.php b/src/Bundle/ChillMainBundle/Repository/SavedExportRepository.php index 4c0a5035b..702fdf7d6 100644 --- a/src/Bundle/ChillMainBundle/Repository/SavedExportRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/SavedExportRepository.php @@ -42,12 +42,12 @@ class SavedExportRepository implements SavedExportRepositoryInterface return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findByUser(User $user, ?array $orderBy = [], int $limit = null, int $offset = null): array + public function findByUser(User $user, ?array $orderBy = [], ?int $limit = null, ?int $offset = null): array { $qb = $this->repository->createQueryBuilder('se'); diff --git a/src/Bundle/ChillMainBundle/Repository/SavedExportRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/SavedExportRepositoryInterface.php index 488139846..3b168505f 100644 --- a/src/Bundle/ChillMainBundle/Repository/SavedExportRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/SavedExportRepositoryInterface.php @@ -27,12 +27,12 @@ interface SavedExportRepositoryInterface extends ObjectRepository */ public function findAll(): array; - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; /** * @return array|SavedExport[] */ - public function findByUser(User $user, ?array $orderBy = [], int $limit = null, int $offset = null): array; + public function findByUser(User $user, ?array $orderBy = [], ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?SavedExport; diff --git a/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php b/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php index 21e55954b..ba4ddae9b 100644 --- a/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/ScopeRepository.php @@ -58,12 +58,12 @@ final class ScopeRepository implements ScopeRepositoryInterface * * @return Scope[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Scope + public function findOneBy(array $criteria, ?array $orderBy = null): ?Scope { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php index 6c68b08b2..436be847b 100644 --- a/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/ScopeRepositoryInterface.php @@ -37,9 +37,9 @@ interface ScopeRepositoryInterface extends ObjectRepository * * @return Scope[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; - public function findOneBy(array $criteria, array $orderBy = null): ?Scope; + public function findOneBy(array $criteria, ?array $orderBy = null): ?Scope; public function getClassName(): string; } diff --git a/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php b/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php index dee7ac9d7..3c92c7f60 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserJobRepository.php @@ -58,7 +58,7 @@ readonly class UserJobRepository implements UserJobRepositoryInterface * * @return array|object[]|UserJob[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Repository/UserJobRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/UserJobRepositoryInterface.php index ef7488042..75c2a5671 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserJobRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/UserJobRepositoryInterface.php @@ -41,7 +41,7 @@ interface UserJobRepositoryInterface extends ObjectRepository * * @return array|object[]|UserJob[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null); + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null); public function findOneBy(array $criteria): ?UserJob; diff --git a/src/Bundle/ChillMainBundle/Repository/UserRepository.php b/src/Bundle/ChillMainBundle/Repository/UserRepository.php index 3bc24a6ac..dc5a9adfe 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/UserRepository.php @@ -164,7 +164,7 @@ final readonly class UserRepository implements UserRepositoryInterface * * @return User[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -172,7 +172,7 @@ final readonly class UserRepository implements UserRepositoryInterface /** * @return array|User[] */ - public function findByActive(array $orderBy = null, int $limit = null, int $offset = null): array + public function findByActive(?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->findBy(['enabled' => true], $orderBy, $limit, $offset); } @@ -182,7 +182,7 @@ final readonly class UserRepository implements UserRepositoryInterface * * @return array|User[] */ - public function findByNotHavingAttribute(string $key, int $limit = null, int $offset = null): array + public function findByNotHavingAttribute(string $key, ?int $limit = null, ?int $offset = null): array { $rsm = new ResultSetMappingBuilder($this->entityManager); $rsm->addRootEntityFromClassMetadata(User::class, 'u'); @@ -200,7 +200,7 @@ final readonly class UserRepository implements UserRepositoryInterface return $this->entityManager->createNativeQuery($sql, $rsm)->setParameter(':key', $key)->getResult(); } - public function findByUsernameOrEmail(string $pattern, ?array $orderBy = [], int $limit = null, int $offset = null): array + public function findByUsernameOrEmail(string $pattern, ?array $orderBy = [], ?int $limit = null, ?int $offset = null): array { $qb = $this->queryByUsernameOrEmail($pattern); @@ -221,7 +221,7 @@ final readonly class UserRepository implements UserRepositoryInterface return $qb->getQuery()->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?User + public function findOneBy(array $criteria, ?array $orderBy = null): ?User { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php b/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php index f05da315d..b7a20f315 100644 --- a/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php +++ b/src/Bundle/ChillMainBundle/Repository/UserRepositoryInterface.php @@ -51,16 +51,16 @@ interface UserRepositoryInterface extends ObjectRepository /** * @return array|User[] */ - public function findByActive(array $orderBy = null, int $limit = null, int $offset = null): array; + public function findByActive(?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; /** * Find users which does not have a key on attribute column. * * @return array|User[] */ - public function findByNotHavingAttribute(string $key, int $limit = null, int $offset = null): array; + public function findByNotHavingAttribute(string $key, ?int $limit = null, ?int $offset = null): array; - public function findByUsernameOrEmail(string $pattern, ?array $orderBy = [], int $limit = null, int $offset = null): array; + public function findByUsernameOrEmail(string $pattern, ?array $orderBy = [], ?int $limit = null, ?int $offset = null): array; public function findOneByUsernameOrEmail(string $pattern): ?User; diff --git a/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowRepository.php b/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowRepository.php index 234ea258e..66b3ab379 100644 --- a/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowRepository.php @@ -105,12 +105,12 @@ class EntityWorkflowRepository implements ObjectRepository * * @return array|EntityWorkflow[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findByCc(User $user, array $orderBy = null, $limit = null, $offset = null): array + public function findByCc(User $user, ?array $orderBy = null, $limit = null, $offset = null): array { $qb = $this->buildQueryByCc($user)->select('ew'); @@ -123,7 +123,7 @@ class EntityWorkflowRepository implements ObjectRepository return $qb->getQuery()->getResult(); } - public function findByDest(User $user, array $orderBy = null, $limit = null, $offset = null): array + public function findByDest(User $user, ?array $orderBy = null, $limit = null, $offset = null): array { $qb = $this->buildQueryByDest($user)->select('ew'); @@ -136,7 +136,7 @@ class EntityWorkflowRepository implements ObjectRepository return $qb->getQuery()->getResult(); } - public function findByPreviousDestWithoutReaction(User $user, array $orderBy = null, $limit = null, $offset = null): array + public function findByPreviousDestWithoutReaction(User $user, ?array $orderBy = null, $limit = null, $offset = null): array { $qb = $this->buildQueryByPreviousDestWithoutReaction($user)->select('ew'); @@ -149,7 +149,7 @@ class EntityWorkflowRepository implements ObjectRepository return $qb->getQuery()->getResult(); } - public function findByPreviousTransitionned(User $user, array $orderBy = null, $limit = null, $offset = null): array + public function findByPreviousTransitionned(User $user, ?array $orderBy = null, $limit = null, $offset = null): array { $qb = $this->buildQueryByPreviousTransitionned($user)->select('ew')->distinct(true); @@ -162,7 +162,7 @@ class EntityWorkflowRepository implements ObjectRepository return $qb->getQuery()->getResult(); } - public function findBySubscriber(User $user, array $orderBy = null, $limit = null, $offset = null): array + public function findBySubscriber(User $user, ?array $orderBy = null, $limit = null, $offset = null): array { $qb = $this->buildQueryBySubscriber($user)->select('ew'); diff --git a/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowStepRepository.php b/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowStepRepository.php index d7e5455ba..545ec2873 100644 --- a/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowStepRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/Workflow/EntityWorkflowStepRepository.php @@ -27,7 +27,7 @@ class EntityWorkflowStepRepository implements ObjectRepository $this->repository = $entityManager->getRepository(EntityWorkflowStep::class); } - public function countUnreadByUser(User $user, array $orderBy = null, $limit = null, $offset = null): int + public function countUnreadByUser(User $user, ?array $orderBy = null, $limit = null, $offset = null): int { $qb = $this->buildQueryByUser($user)->select('count(e)'); @@ -44,7 +44,7 @@ class EntityWorkflowStepRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php index 2989187a8..7431833ab 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuTwig.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuTwig.php @@ -87,7 +87,7 @@ class MenuTwig extends AbstractExtension implements ContainerAwareInterface return 'chill_menu'; } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { $this->container = $container; } diff --git a/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php index b16cec9c5..d7920097c 100644 --- a/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php +++ b/src/Bundle/ChillMainBundle/Search/SearchApiNoQueryException.php @@ -17,7 +17,7 @@ class SearchApiNoQueryException extends \RuntimeException private readonly array $types; - public function __construct(string $pattern = '', array $types = [], private readonly array $parameters = [], $code = 0, \Throwable $previous = null) + public function __construct(string $pattern = '', array $types = [], private readonly array $parameters = [], $code = 0, ?\Throwable $previous = null) { $typesStr = \implode(', ', $types); $message = "No query for this search: pattern : {$pattern}, types: {$typesStr}"; diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php index 7e5d8a325..48c9b836f 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelper.php @@ -61,7 +61,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return User[] */ - public function findUsersReaching(string $role, array|Center $center, array|Scope $scope = null, bool $onlyEnabled = true): array + public function findUsersReaching(string $role, array|Center $center, array|Scope|null $scope = null, bool $onlyEnabled = true): array { return $this->userACLAwareRepository ->findUsersByReachedACL($role, $center, $scope, $onlyEnabled); @@ -86,7 +86,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface * * @return list
*/ - public function getReachableCenters(UserInterface $user, string $role, Scope $scope = null): array + public function getReachableCenters(UserInterface $user, string $role, ?Scope $scope = null): array { if (!$user instanceof User) { return []; diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php index 4bc07f915..0a9d837a6 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUser.php @@ -21,7 +21,7 @@ class AuthorizationHelperForCurrentUser implements AuthorizationHelperForCurrent { } - public function getReachableCenters(string $role, Scope $scope = null): array + public function getReachableCenters(string $role, ?Scope $scope = null): array { if (!$this->security->getUser() instanceof User) { return []; diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUserInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUserInterface.php index 04b34c8e5..d0e0085a5 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUserInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperForCurrentUserInterface.php @@ -22,7 +22,7 @@ interface AuthorizationHelperForCurrentUserInterface * * @return Center[] */ - public function getReachableCenters(string $role, Scope $scope = null): array; + public function getReachableCenters(string $role, ?Scope $scope = null): array; /** * @param list
|Center $center diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php index 5df54a0d6..cea27f1ad 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AuthorizationHelperInterface.php @@ -23,7 +23,7 @@ interface AuthorizationHelperInterface * * @return list
*/ - public function getReachableCenters(UserInterface $user, string $role, Scope $scope = null): array; + public function getReachableCenters(UserInterface $user, string $role, ?Scope $scope = null): array; /** * @param Center|array
$center diff --git a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php index ce1e16862..a61d92b4a 100644 --- a/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php +++ b/src/Bundle/ChillMainBundle/Security/Resolver/ScopeResolverDispatcher.php @@ -37,7 +37,7 @@ final readonly class ScopeResolverDispatcher /** * @return Scope|iterable|Scope|null */ - public function resolveScope(mixed $entity, ?array $options = []): null|iterable|Scope + public function resolveScope(mixed $entity, ?array $options = []): iterable|Scope|null { foreach ($this->resolvers as $resolver) { if ($resolver->supports($entity, $options)) { diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php index e1d692a19..4cf80ccd7 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CommentEmbeddableDocGenNormalizer.php @@ -32,7 +32,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa * * @throws ExceptionInterface */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { if (null === $object || $object->isEmpty()) { return [ @@ -65,7 +65,7 @@ class CommentEmbeddableDocGenNormalizer implements ContextAwareNormalizerInterfa ]; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { if ('docgen' !== $format) { return false; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php index df125994d..83e84f7a0 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowNormalizer.php @@ -32,7 +32,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn * * @return array */ - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, ?string $format = null, array $context = []) { $workflow = $this->registry->get($object, $object->getWorkflowName()); $handler = $this->entityWorkflowManager->getHandler($object); @@ -50,7 +50,7 @@ class EntityWorkflowNormalizer implements NormalizerInterface, NormalizerAwareIn ]; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof EntityWorkflow && 'json' === $format; } diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php index 47ec0427e..46dbd00cc 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/EntityWorkflowStepNormalizer.php @@ -28,7 +28,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz /** * @param EntityWorkflowStep $object */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $data = [ 'type' => 'entity_workflow_step', @@ -77,7 +77,7 @@ class EntityWorkflowStepNormalizer implements NormalizerAwareInterface, Normaliz return $data; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof EntityWorkflowStep && 'json' === $format; } diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php index 50b3e33f6..70cd9a838 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/NotificationNormalizer.php @@ -32,7 +32,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte * * @return array|\ArrayObject|bool|float|int|string|void|null */ - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, ?string $format = null, array $context = []) { $entity = $this->entityManager ->getRepository($object->getRelatedEntityClass()) @@ -53,7 +53,7 @@ class NotificationNormalizer implements NormalizerAwareInterface, NormalizerInte ]; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, ?string $format = null) { return $data instanceof Notification && 'json' === $format; } diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php index 583c8a75b..28d7c623d 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PhonenumberNormalizer.php @@ -50,7 +50,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal } } - public function normalize($object, string $format = null, array $context = []): string + public function normalize($object, ?string $format = null, array $context = []): string { if ('docgen' === $format && null === $object) { return ''; @@ -64,7 +64,7 @@ class PhonenumberNormalizer implements ContextAwareNormalizerInterface, Denormal return 'libphonenumber\PhoneNumber' === $type; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { if ($data instanceof PhoneNumber && 'json' === $format) { return true; diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php index 80407a6b1..1d7ee43ce 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/PrivateCommentEmbeddableNormalizer.php @@ -22,7 +22,7 @@ class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, Denorma { } - public function denormalize($data, string $type, string $format = null, array $context = []): PrivateCommentEmbeddable + public function denormalize($data, string $type, ?string $format = null, array $context = []): PrivateCommentEmbeddable { $comment = new PrivateCommentEmbeddable(); @@ -40,12 +40,12 @@ class PrivateCommentEmbeddableNormalizer implements NormalizerInterface, Denorma return $object->getCommentForUser($this->security->getUser()); } - public function supportsDenormalization($data, string $type, string $format = null): bool + public function supportsDenormalization($data, string $type, ?string $format = null): bool { return PrivateCommentEmbeddable::class === $type; } - public function supportsNormalization($data, string $format = null): bool + public function supportsNormalization($data, ?string $format = null): bool { return $data instanceof PrivateCommentEmbeddable; } diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php index d2c9fc960..0267b126d 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php @@ -41,7 +41,7 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C return 'collate-address'; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { $maxId = ($this->collateAddressWithReferenceOrPostalCode)($lastExecutionData[self::LAST_MAX_ID] ?? 0); diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php index 31982d6eb..46c79a250 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/RefreshAddressToGeographicalUnitMaterializedViewCronJob.php @@ -46,7 +46,7 @@ final readonly class RefreshAddressToGeographicalUnitMaterializedViewCronJob imp return 'refresh-materialized-view-address-to-geog-units'; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { $this->connection->executeQuery('REFRESH MATERIALIZED VIEW view_chill_main_address_geographical_unit'); diff --git a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php index 1eaf42e76..9407bd600 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/AddressReferenceBaseImporter.php @@ -68,9 +68,9 @@ final class AddressReferenceBaseImporter string $street, string $streetNumber, string $source, - float $lat = null, - float $lon = null, - int $srid = null + ?float $lat = null, + ?float $lon = null, + ?int $srid = null ): void { if (!$this->isInitialized) { $this->initialize($source); diff --git a/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php b/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php index 6196f8fad..6b6885ff2 100644 --- a/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php +++ b/src/Bundle/ChillMainBundle/Service/Import/GeographicalUnitBaseImporter.php @@ -66,7 +66,7 @@ final class GeographicalUnitBaseImporter string $unitName, string $unitKey, string $geomAsWKT, - int $srid = null + ?int $srid = null ): void { $this->initialize(); diff --git a/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php b/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php index b0bfae2b3..0d5d6b2d8 100644 --- a/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php +++ b/src/Bundle/ChillMainBundle/Service/Mailer/ChillMailer.php @@ -26,7 +26,7 @@ class ChillMailer implements MailerInterface { } - public function send(RawMessage $message, Envelope $envelope = null): void + public function send(RawMessage $message, ?Envelope $envelope = null): void { if ($message instanceof Email) { $message->subject($this->prefix.$message->getSubject()); diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php index ebce380b0..9f42461c6 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php @@ -76,7 +76,7 @@ final class FilterOrderHelper return $this->entityChoices; } - public function addUserPicker(string $name, string $label = null, array $options = []): self + public function addUserPicker(string $name, ?string $label = null, array $options = []): self { $this->userPickers[$name] = ['label' => $label, 'options' => $options]; @@ -99,7 +99,7 @@ final class FilterOrderHelper return $this; } - public function addDateRange(string $name, string $label = null, \DateTimeImmutable $from = null, \DateTimeImmutable $to = null): self + public function addDateRange(string $name, ?string $label = null, ?\DateTimeImmutable $from = null, ?\DateTimeImmutable $to = null): self { $this->dateRanges[$name] = ['from' => $from, 'to' => $to, 'label' => $label]; diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php index 4bef35046..14189b88d 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelperBuilder.php @@ -65,7 +65,7 @@ class FilterOrderHelperBuilder return $this; } - public function addDateRange(string $name, string $label = null, \DateTimeImmutable $from = null, \DateTimeImmutable $to = null): self + public function addDateRange(string $name, ?string $label = null, ?\DateTimeImmutable $from = null, ?\DateTimeImmutable $to = null): self { $this->dateRanges[$name] = ['from' => $from, 'to' => $to, 'label' => $label]; @@ -79,7 +79,7 @@ class FilterOrderHelperBuilder return $this; } - public function addUserPicker(string $name, string $label = null, ?array $options = []): self + public function addUserPicker(string $name, ?string $label = null, ?array $options = []): self { $this->userPickers[$name] = ['label' => $label, 'options' => $options]; diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php index 594bd6460..38e2c9509 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronJobDatabaseInteractionTest.php @@ -91,7 +91,7 @@ class JobWithReturn implements CronJobInterface return 'with-data'; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { return ['data' => 'test']; } diff --git a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php index 489bab4cb..417e1117b 100644 --- a/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Cron/CronManagerTest.php @@ -175,7 +175,7 @@ class JobCanRun implements CronJobInterface return $this->key; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { return null; } @@ -193,7 +193,7 @@ class JobCannotRun implements CronJobInterface return 'job-b'; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { return null; } diff --git a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php index 44091f38b..8d71a132b 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/ExportManagerTest.php @@ -498,11 +498,11 @@ final class ExportManagerTest extends KernelTestCase * user 'center a_social' from database. */ protected function createExportManager( - LoggerInterface $logger = null, - EntityManagerInterface $em = null, - AuthorizationCheckerInterface $authorizationChecker = null, - AuthorizationHelper $authorizationHelper = null, - UserInterface $user = null, + ?LoggerInterface $logger = null, + ?EntityManagerInterface $em = null, + ?AuthorizationCheckerInterface $authorizationChecker = null, + ?AuthorizationHelper $authorizationHelper = null, + ?UserInterface $user = null, array $exports = [], array $aggregators = [], array $filters = [], diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index d7fdc49c8..a14747c68 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -102,7 +102,7 @@ class SortExportElementTest extends KernelTestCase private function makeTranslator(): TranslatorInterface { return new class () implements TranslatorInterface { - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { return $id; } diff --git a/src/Bundle/ChillMainBundle/Tests/Notification/Email/NotificationMailerTest.php b/src/Bundle/ChillMainBundle/Tests/Notification/Email/NotificationMailerTest.php index 2bd7708b8..fad4a89f5 100644 --- a/src/Bundle/ChillMainBundle/Tests/Notification/Email/NotificationMailerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Notification/Email/NotificationMailerTest.php @@ -113,7 +113,7 @@ class NotificationMailerTest extends TestCase } private function buildNotificationMailer( - MailerInterface $mailer = null, + ?MailerInterface $mailer = null, ): NotificationMailer { return new NotificationMailer( $mailer, diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php index c820b615d..8d80490c1 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/DateNormalizerTest.php @@ -84,7 +84,7 @@ final class DateNormalizerTest extends KernelTestCase $this->assertFalse($this->buildDateNormalizer()->supportsNormalization(new \DateTime(), 'xml')); } - private function buildDateNormalizer(string $locale = null): DateNormalizer + private function buildDateNormalizer(?string $locale = null): DateNormalizer { $requestStack = $this->prophet->prophesize(RequestStack::class); $parameterBag = new ParameterBag(); diff --git a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php index 123f1c3ae..15334298e 100644 --- a/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Serializer/Normalizer/UserNormalizerTest.php @@ -117,19 +117,19 @@ final class UserNormalizerTest extends TestCase * * @throws ExceptionInterface */ - public function testNormalize(null|User $user, mixed $format, mixed $context, mixed $expected) + public function testNormalize(User|null $user, mixed $format, mixed $context, mixed $expected) { $userRender = $this->prophesize(UserRender::class); $userRender->renderString(Argument::type(User::class), Argument::type('array'))->willReturn($user ? $user->getLabel() : ''); $normalizer = new UserNormalizer($userRender->reveal()); $normalizer->setNormalizer(new class () implements NormalizerInterface { - public function normalize($object, string $format = null, array $context = []) + public function normalize($object, ?string $format = null, array $context = []) { return ['context' => $context['docgen:expects'] ?? null]; } - public function supportsNormalization($data, string $format = null) + public function supportsNormalization($data, ?string $format = null) { return true; } diff --git a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php index 821c66e4e..b91d7627a 100644 --- a/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php +++ b/src/Bundle/ChillMainBundle/Util/DateRangeCovering.php @@ -66,7 +66,7 @@ class DateRangeCovering $this->minCover = $minCover; } - public function add(\DateTimeInterface $start, \DateTimeInterface $end = null, $metadata = null): self + public function add(\DateTimeInterface $start, ?\DateTimeInterface $end = null, $metadata = null): self { if ($this->computed) { throw new \LogicException('You cannot add intervals to a computed instance'); @@ -152,7 +152,7 @@ class DateRangeCovering return \count($this->intersections) > 0; } - private function addToSequence($timestamp, int $start = null, int $end = null) + private function addToSequence($timestamp, ?int $start = null, ?int $end = null) { if (!\array_key_exists($timestamp, $this->sequence)) { $this->sequence[$timestamp] = ['s' => [], 'e' => []]; diff --git a/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php b/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php index 05ee58d87..8f0caa62e 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php +++ b/src/Bundle/ChillMainBundle/Workflow/Helper/MetadataExtractor.php @@ -45,7 +45,7 @@ class MetadataExtractor return $workflowsList; } - public function buildArrayPresentationForPlace(EntityWorkflow $entityWorkflow, EntityWorkflowStep $step = null): array + public function buildArrayPresentationForPlace(EntityWorkflow $entityWorkflow, ?EntityWorkflowStep $step = null): array { $workflow = $this->registry->get($entityWorkflow, $entityWorkflow->getWorkflowName()); $step ??= $entityWorkflow->getCurrentStep(); diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php index 2ddf3415c..33d88e7de 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php @@ -39,7 +39,7 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface return 'accompanying-period-step-change'; } - public function run(array $lastExecutionData): null|array + public function run(array $lastExecutionData): array|null { ($this->requestor)(); diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php index b0fe4c5b2..7e9f87939 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php @@ -33,7 +33,7 @@ class AccompanyingPeriodStepChanger ) { } - public function __invoke(AccompanyingPeriod $period, string $transition, string $workflowName = null): void + public function __invoke(AccompanyingPeriod $period, string $transition, ?string $workflowName = null): void { $workflow = $this->workflowRegistry->get($period, $workflowName); diff --git a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php index a83b831f1..f8e305552 100644 --- a/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php +++ b/src/Bundle/ChillPersonBundle/Controller/ReassignAccompanyingPeriodController.php @@ -143,7 +143,7 @@ class ReassignAccompanyingPeriodController extends AbstractController return $builder->getForm(); } - private function buildReassignForm(array $periodIds, User $userFrom = null): FormInterface + private function buildReassignForm(array $periodIds, ?User $userFrom = null): FormInterface { $defaultData = [ 'userFrom' => $userFrom, diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php index 7b1dd4211..316417583 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWork/SocialIssueController.php @@ -18,7 +18,7 @@ use Symfony\Component\HttpFoundation\Request; class SocialIssueController extends CRUDController { - protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface + protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface { if ('new' === $action) { return parent::createFormFor($action, $entity, $formClass, ['step' => 'create']); diff --git a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php index 38d13ea43..229a69f2c 100644 --- a/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php +++ b/src/Bundle/ChillPersonBundle/Doctrine/DQL/AddressPart.php @@ -40,7 +40,7 @@ abstract class AddressPart extends FunctionNode 'country_id', ]; - private null|\Doctrine\ORM\Query\AST\Node|string $date = null; + private \Doctrine\ORM\Query\AST\Node|string|null $date = null; /** * @var \Doctrine\ORM\Query\AST\Node diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 4302a17f4..9c88a4a69 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -479,7 +479,7 @@ class AccompanyingPeriod implements * * @uses AccompanyingPeriod::setClosingDate() */ - public function __construct(\DateTime $dateOpening = null) + public function __construct(?\DateTime $dateOpening = null) { $this->calendars = new ArrayCollection(); // TODO we cannot add a dependency between AccompanyingPeriod and calendars $this->participations = new ArrayCollection(); @@ -575,7 +575,7 @@ class AccompanyingPeriod implements return $this; } - public function addPerson(Person $person = null): self + public function addPerson(?Person $person = null): self { if (null !== $person) { $this->createParticipationFor($person); @@ -829,7 +829,7 @@ class AccompanyingPeriod implements * * @Groups({"read"}) */ - public function getLocation(\DateTimeImmutable $at = null): ?Address + public function getLocation(?\DateTimeImmutable $at = null): ?Address { if ($this->getPersonLocation() instanceof Person) { return $this->getPersonLocation()->getCurrentPersonAddress(); @@ -1029,7 +1029,7 @@ class AccompanyingPeriod implements /** * @Groups({"read"}) */ - public function getRequestor(): null|Person|ThirdParty + public function getRequestor(): Person|ThirdParty|null { return $this->requestorPerson ?? $this->requestorThirdParty; } @@ -1257,7 +1257,7 @@ class AccompanyingPeriod implements /** * @Groups({"write"}) */ - public function setAddressLocation(Address $addressLocation = null): self + public function setAddressLocation(?Address $addressLocation = null): self { if ($this->addressLocation !== $addressLocation) { $this->addressLocation = $addressLocation; @@ -1297,7 +1297,7 @@ class AccompanyingPeriod implements return $this; } - public function setClosingMotive(ClosingMotive $closingMotive = null): self + public function setClosingMotive(?ClosingMotive $closingMotive = null): self { $this->closingMotive = $closingMotive; @@ -1372,7 +1372,7 @@ class AccompanyingPeriod implements /** * @Groups({"write"}) */ - public function setPersonLocation(Person $person = null): self + public function setPersonLocation(?Person $person = null): self { if ($this->personLocation !== $person) { $this->personLocation = $person; @@ -1394,7 +1394,7 @@ class AccompanyingPeriod implements /** * @Groups({"write"}) */ - public function setPinnedComment(Comment $comment = null): self + public function setPinnedComment(?Comment $comment = null): self { if (null !== $this->pinnedComment) { $this->addComment($this->pinnedComment); @@ -1405,7 +1405,7 @@ class AccompanyingPeriod implements return $this; } - public function setRemark(string $remark = null): self + public function setRemark(?string $remark = null): self { $this->remark = (string) $remark; @@ -1566,14 +1566,14 @@ class AccompanyingPeriod implements } while ($steps->valid()); } - private function setRequestorPerson(Person $requestorPerson = null): self + private function setRequestorPerson(?Person $requestorPerson = null): self { $this->requestorPerson = $requestorPerson; return $this; } - private function setRequestorThirdParty(ThirdParty $requestorThirdParty = null): self + private function setRequestorThirdParty(?ThirdParty $requestorThirdParty = null): self { $this->requestorThirdParty = $requestorThirdParty; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php index ab6e66f1c..700076506 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodLocationHistory.php @@ -91,14 +91,14 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface return $this->startDate; } - public function setAddressLocation(?Address $addressLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory + public function setAddressLocation(?Address $addressLocation): AccompanyingPeriodLocationHistory { $this->addressLocation = $addressLocation; return $this; } - public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory + public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriodLocationHistory { $this->endDate = $endDate; @@ -108,21 +108,21 @@ class AccompanyingPeriodLocationHistory implements TrackCreationInterface /** * @internal use AccompanyingPeriod::addLocationHistory */ - public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriod\AccompanyingPeriodLocationHistory + public function setPeriod(AccompanyingPeriod $period): AccompanyingPeriodLocationHistory { $this->period = $period; return $this; } - public function setPersonLocation(?Person $personLocation): AccompanyingPeriod\AccompanyingPeriodLocationHistory + public function setPersonLocation(?Person $personLocation): AccompanyingPeriodLocationHistory { $this->personLocation = $personLocation; return $this; } - public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriod\AccompanyingPeriodLocationHistory + public function setStartDate(?\DateTimeImmutable $startDate): AccompanyingPeriodLocationHistory { $this->startDate = $startDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php index 5a3ed774c..15b2f0d2e 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php @@ -108,7 +108,7 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda return $this; } - public function setStep(string $step): AccompanyingPeriod\AccompanyingPeriodStepHistory + public function setStep(string $step): AccompanyingPeriodStepHistory { $this->step = $step; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index afb4b1c82..77906b1ba 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -255,7 +255,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues $this->referrersHistory = new ArrayCollection(); } - public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self + public function addAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self { if (!$this->accompanyingPeriodWorkEvaluations->contains($evaluation)) { $this->accompanyingPeriodWorkEvaluations[] = $evaluation; @@ -265,7 +265,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function addGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self + public function addGoal(AccompanyingPeriodWorkGoal $goal): self { if (!$this->goals->contains($goal)) { $this->goals[] = $goal; @@ -288,7 +288,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues { if (!$this->getReferrers()->contains($referrer)) { $this->referrersHistory[] = - new AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); + new AccompanyingPeriodWorkReferrerHistory($this, $referrer, new \DateTimeImmutable('today')); } return $this; @@ -393,8 +393,8 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues public function getReferrers(): ReadableCollection { $users = $this->referrersHistory - ->filter(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) - ->map(fn (AccompanyingPeriod\AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) + ->filter(fn (AccompanyingPeriodWorkReferrerHistory $h) => null === $h->getEndDate()) + ->map(fn (AccompanyingPeriodWorkReferrerHistory $h) => $h->getUser()) ->getValues() ; @@ -452,7 +452,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this->updatedBy; } - public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriod\AccompanyingPeriodWorkEvaluation $evaluation): self + public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self { $this->accompanyingPeriodWorkEvaluations ->removeElement($evaluation); @@ -461,7 +461,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function removeGoal(AccompanyingPeriod\AccompanyingPeriodWorkGoal $goal): self + public function removeGoal(AccompanyingPeriodWorkGoal $goal): self { if ($this->goals->removeElement($goal)) { // set the owning side to null (unless already changed) @@ -563,7 +563,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this; } - public function setEndDate(\DateTimeInterface $endDate = null): self + public function setEndDate(?\DateTimeInterface $endDate = null): self { $this->endDate = $endDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php index 99ef4f7da..f0ff1d956 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/Resource.php @@ -107,7 +107,7 @@ class Resource /** * @Groups({"read"}) */ - public function getResource(): null|Person|ThirdParty + public function getResource(): Person|ThirdParty|null { return $this->person ?? $this->thirdParty; } @@ -124,7 +124,7 @@ class Resource return $this; } - public function setComment(string $comment = null): self + public function setComment(?string $comment = null): self { $this->comment = (string) $comment; diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php index 29696cfe1..41b798a3f 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/UserHistory.php @@ -86,7 +86,7 @@ class UserHistory implements TrackCreationInterface return $this->user; } - public function setEndDate(?\DateTimeImmutable $endDate): AccompanyingPeriod\UserHistory + public function setEndDate(?\DateTimeImmutable $endDate): UserHistory { $this->endDate = $endDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/HasPerson.php b/src/Bundle/ChillPersonBundle/Entity/HasPerson.php index ba4f3699d..ab0854a57 100644 --- a/src/Bundle/ChillPersonBundle/Entity/HasPerson.php +++ b/src/Bundle/ChillPersonBundle/Entity/HasPerson.php @@ -18,5 +18,5 @@ interface HasPerson { public function getPerson(): ?Person; - public function setPerson(Person $person = null): HasPerson; + public function setPerson(?Person $person = null): HasPerson; } diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php index 6d5bdf674..cc0ff2d69 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/Household.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/Household.php @@ -214,7 +214,7 @@ class Household * * @Serializer\SerializedName("current_address") */ - public function getCurrentAddress(\DateTime $at = null): ?Address + public function getCurrentAddress(?\DateTime $at = null): ?Address { $at ??= new \DateTime('today'); @@ -234,7 +234,7 @@ class Household * * @Serializer\SerializedName("current_composition") */ - public function getCurrentComposition(\DateTimeImmutable $at = null): ?HouseholdComposition + public function getCurrentComposition(?\DateTimeImmutable $at = null): ?HouseholdComposition { $at ??= new \DateTimeImmutable('today'); $criteria = new Criteria(); @@ -262,12 +262,12 @@ class Household /** * @Serializer\Groups({"docgen:read"}) */ - public function getCurrentMembers(\DateTimeImmutable $now = null): Collection + public function getCurrentMembers(?\DateTimeImmutable $now = null): Collection { return $this->getMembers()->matching($this->buildCriteriaCurrentMembers($now)); } - public function getCurrentMembersByPosition(Position $position, \DateTimeInterface $now = null) + public function getCurrentMembersByPosition(Position $position, ?\DateTimeInterface $now = null) { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -286,7 +286,7 @@ class Household * * @Serializer\SerializedName("current_members_id") */ - public function getCurrentMembersIds(\DateTimeImmutable $now = null): ReadableCollection + public function getCurrentMembersIds(?\DateTimeImmutable $now = null): ReadableCollection { return $this->getCurrentMembers($now)->map( static fn (HouseholdMember $m) => $m->getId() @@ -296,7 +296,7 @@ class Household /** * @return HouseholdMember[] */ - public function getCurrentMembersOrdered(\DateTimeImmutable $now = null): Collection + public function getCurrentMembersOrdered(?\DateTimeImmutable $now = null): Collection { $members = $this->getCurrentMembers($now); @@ -338,7 +338,7 @@ class Household return $members; } - public function getCurrentMembersWithoutPosition(\DateTimeInterface $now = null) + public function getCurrentMembersWithoutPosition(?\DateTimeInterface $now = null) { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -355,7 +355,7 @@ class Household * * @return ReadableCollection<(int|string), Person> */ - public function getCurrentPersons(\DateTimeImmutable $now = null): ReadableCollection + public function getCurrentPersons(?\DateTimeImmutable $now = null): ReadableCollection { return $this->getCurrentMembers($now) ->map(static fn (HouseholdMember $m) => $m->getPerson()); @@ -424,7 +424,7 @@ class Household }); } - public function getNonCurrentMembers(\DateTimeImmutable $now = null): Collection + public function getNonCurrentMembers(?\DateTimeImmutable $now = null): Collection { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -444,7 +444,7 @@ class Household return $this->getMembers()->matching($criteria); } - public function getNonCurrentMembersByPosition(Position $position, \DateTimeInterface $now = null) + public function getNonCurrentMembersByPosition(Position $position, ?\DateTimeInterface $now = null) { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -454,7 +454,7 @@ class Household return $this->getNonCurrentMembers($now)->matching($criteria); } - public function getNonCurrentMembersWithoutPosition(\DateTimeInterface $now = null) + public function getNonCurrentMembersWithoutPosition(?\DateTimeInterface $now = null) { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -644,7 +644,7 @@ class Household } } - private function buildCriteriaCurrentMembers(\DateTimeImmutable $now = null): Criteria + private function buildCriteriaCurrentMembers(?\DateTimeImmutable $now = null): Criteria { $criteria = new Criteria(); $expr = Criteria::expr(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php b/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php index ccce246c8..21c28f52e 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php +++ b/src/Bundle/ChillPersonBundle/Entity/Household/HouseholdMember.php @@ -153,7 +153,7 @@ class HouseholdMember return $this->startDate; } - public function isCurrent(\DateTimeImmutable $at = null): bool + public function isCurrent(?\DateTimeImmutable $at = null): bool { $at ??= new \DateTimeImmutable('now'); @@ -174,7 +174,7 @@ class HouseholdMember return $this; } - public function setEndDate(\DateTimeImmutable $endDate = null): self + public function setEndDate(?\DateTimeImmutable $endDate = null): self { $this->endDate = $endDate; diff --git a/src/Bundle/ChillPersonBundle/Entity/Person.php b/src/Bundle/ChillPersonBundle/Entity/Person.php index 050be3260..cd28da9a7 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person.php @@ -671,7 +671,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @throws \Exception if two lines of the accompanying period are open */ - public function close(AccompanyingPeriod $accompanyingPeriod = null): void + public function close(?AccompanyingPeriod $accompanyingPeriod = null): void { $this->proxyAccompanyingPeriodOpenState = false; } @@ -854,7 +854,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @throws \Exception */ - public function getAddressAt(\DateTimeInterface $at = null): ?Address + public function getAddressAt(?\DateTimeInterface $at = null): ?Address { $at ??= new \DateTime('now'); @@ -1035,7 +1035,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $currentAccompanyingPeriods; } - public function getCurrentHousehold(\DateTimeImmutable $at = null): ?Household + public function getCurrentHousehold(?\DateTimeImmutable $at = null): ?Household { $participation = $this->getCurrentHouseholdParticipationShareHousehold($at); @@ -1050,7 +1050,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * if the given date is 'now', use instead @see{getCurrentPersonAddress}, which is optimized on * database side. */ - public function getCurrentHouseholdAddress(\DateTimeImmutable $at = null): ?Address + public function getCurrentHouseholdAddress(?\DateTimeImmutable $at = null): ?Address { if ( null === $at @@ -1084,7 +1084,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return null; } - public function getCurrentHouseholdParticipationShareHousehold(\DateTimeImmutable $at = null): ?HouseholdMember + public function getCurrentHouseholdParticipationShareHousehold(?\DateTimeImmutable $at = null): ?HouseholdMember { $criteria = new Criteria(); $expr = Criteria::expr(); @@ -1253,7 +1253,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI * * @throws \Exception */ - public function getLastAddress(\DateTime $from = null) + public function getLastAddress(?\DateTime $from = null) { return $this->getCurrentHouseholdAddress( null !== $from ? \DateTimeImmutable::createFromMutable($from) : null @@ -1381,7 +1381,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this->updatedBy; } - public function hasCurrentHouseholdAddress(\DateTimeImmutable $at = null): bool + public function hasCurrentHouseholdAddress(?\DateTimeImmutable $at = null): bool { return null !== $this->getCurrentHouseholdAddress($at); } @@ -1468,7 +1468,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return false; } - public function isSharingHousehold(\DateTimeImmutable $at = null): bool + public function isSharingHousehold(?\DateTimeImmutable $at = null): bool { return null !== $this->getCurrentHousehold($at); } @@ -1619,7 +1619,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this; } - public function setCivility(Civility $civility = null): self + public function setCivility(?Civility $civility = null): self { $this->civility = $civility; @@ -1637,7 +1637,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this; } - public function setCountryOfBirth(Country $countryOfBirth = null): self + public function setCountryOfBirth(?Country $countryOfBirth = null): self { $this->countryOfBirth = $countryOfBirth; @@ -1707,7 +1707,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this; } - public function setMaritalStatus(MaritalStatus $maritalStatus = null): self + public function setMaritalStatus(?MaritalStatus $maritalStatus = null): self { $this->maritalStatus = $maritalStatus; @@ -1748,7 +1748,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI return $this; } - public function setNationality(Country $nationality = null): self + public function setNationality(?Country $nationality = null): self { $this->nationality = $nationality; diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php index 3cc618af4..551f8fd03 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonCenterCurrent.php @@ -63,7 +63,7 @@ class PersonCenterCurrent * * @internal Should not be instantied, unless inside Person entity */ - public function __construct(Person\PersonCenterHistory $history) + public function __construct(PersonCenterHistory $history) { $this->person = $history->getPerson(); $this->center = $history->getCenter(); diff --git a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php index 7f0a3e978..c5c2c8d08 100644 --- a/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php +++ b/src/Bundle/ChillPersonBundle/Entity/Person/PersonResource.php @@ -71,7 +71,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface * * @Groups({"read", "docgen:read"}) */ - private ?Person\PersonResourceKind $kind = null; + private ?PersonResourceKind $kind = null; /** * The person which host the owner of this resource. @@ -127,7 +127,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this->id; } - public function getKind(): ?Person\PersonResourceKind + public function getKind(): ?PersonResourceKind { return $this->kind; } @@ -196,7 +196,7 @@ class PersonResource implements TrackCreationInterface, TrackUpdateInterface return $this; } - public function setKind(?Person\PersonResourceKind $kind): self + public function setKind(?PersonResourceKind $kind): self { $this->kind = $kind; diff --git a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php index 78d820298..c17172882 100644 --- a/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php +++ b/src/Bundle/ChillPersonBundle/Entity/PersonAltName.php @@ -116,7 +116,7 @@ class PersonAltName /** * @return $this */ - public function setPerson(Person $person = null) + public function setPerson(?Person $person = null) { $this->person = $person; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php index ce96c40c9..6a9cce351 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php @@ -48,7 +48,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|string $value): string { + return function (string|null $value): string { if ('_header' === $value) { return 'export.aggregator.course.by_closing_date.header'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php index bb2df08d3..cfb9d53aa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php @@ -84,7 +84,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface public function getLabels($key, array $values, $data): \Closure { - return function (null|int|string $jobId) { + return function (int|string|null $jobId) { if (null === $jobId || '' === $jobId) { return ''; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php index bf71d04d8..6f9ea4859 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php @@ -48,7 +48,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|string $value): string { + return function (string|null $value): string { if ('_header' === $value) { return 'export.aggregator.course.by_opening_date.header'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php index 7248b5b98..23159cae8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php @@ -84,7 +84,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa public function getLabels($key, array $values, $data): \Closure { - return function (null|int|string $scopeId) { + return function (int|string|null $scopeId) { if (null === $scopeId || '' === $scopeId) { return ''; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php index f9b033784..b4bc40c10 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php @@ -42,7 +42,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac public function getLabels($key, array $values, $data): \Closure { - return function (null|int|string $userId) { + return function (int|string|null $userId) { if (null === $userId || '' === $userId) { return ''; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index 4b13bd477..750841337 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -72,7 +72,7 @@ class ChildrenNumberAggregator implements AggregatorInterface public function getLabels($key, array $values, $data) { - return static function (null|int|string $value): string { + return static function (int|string|null $value): string { if ('_header' === $value) { return 'Number of children'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php index 79d28c24e..fd48bdb01 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php @@ -46,7 +46,7 @@ final readonly class CenterAggregator implements AggregatorInterface public function getLabels($key, array $values, $data): \Closure { - return function (null|int|string $value) { + return function (int|string|null $value) { if (null === $value || '' === $value) { return ''; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php index abb8b0e27..aa06fff61 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php @@ -44,7 +44,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|int|string $value): string { + return function (int|string|null $value): string { if ('_header' === $value) { return 'export.aggregator.person.by_postal_code.header'; } diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php index 567f2f7e6..2b3c3674e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/LabelPersonHelper.php @@ -22,7 +22,7 @@ class LabelPersonHelper public function getLabel(string $key, array $values, string $header): callable { - return function (null|int|string $value) use ($header): string { + return function (int|string|null $value) use ($header): string { if ('_header' === $value) { return $header; } diff --git a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php index 8031de926..9de66b272 100644 --- a/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php +++ b/src/Bundle/ChillPersonBundle/Form/ChoiceLoader/PersonChoiceLoader.php @@ -27,7 +27,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface public function __construct( protected PersonRepository $personRepository, - array $centers = null + ?array $centers = null ) { if (null !== $centers) { $this->centers = $centers; diff --git a/src/Bundle/ChillPersonBundle/Form/PersonType.php b/src/Bundle/ChillPersonBundle/Form/PersonType.php index c971495b6..21717a25b 100644 --- a/src/Bundle/ChillPersonBundle/Form/PersonType.php +++ b/src/Bundle/ChillPersonBundle/Form/PersonType.php @@ -154,7 +154,7 @@ class PersonType extends AbstractType 'allow_delete' => true, 'by_reference' => false, 'label' => false, - 'delete_empty' => static fn (PersonPhone $pp = null) => null === $pp || $pp->isEmpty(), + 'delete_empty' => static fn (?PersonPhone $pp = null) => null === $pp || $pp->isEmpty(), 'error_bubbling' => false, 'empty_collection_explain' => 'No additional phone numbers', ]); diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php index c4be4ba5e..e61fbe105 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditor.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditor.php @@ -53,7 +53,7 @@ class MembersEditor * If the person is also a member of another household, or the same household at the same position, the person * is not associated any more with the previous household. */ - public function addMovement(\DateTimeImmutable $date, Person $person, ?Position $position, ?bool $holder = false, string $comment = null): self + public function addMovement(\DateTimeImmutable $date, Person $person, ?Position $position, ?bool $holder = false, ?string $comment = null): self { if (null === $this->household) { throw new \LogicException('You must define a household first'); diff --git a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php index 16e25bc63..cb6f7d4ea 100644 --- a/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php +++ b/src/Bundle/ChillPersonBundle/Household/MembersEditorFactory.php @@ -21,7 +21,7 @@ class MembersEditorFactory { } - public function createEditor(Household $household = null): MembersEditor + public function createEditor(?Household $household = null): MembersEditor { return new MembersEditor($this->validator, $household, $this->eventDispatcher); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodInfoRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodInfoRepository.php index 0f68efabb..88c89af7c 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodInfoRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodInfoRepository.php @@ -73,7 +73,7 @@ readonly class AccompanyingPeriodInfoRepository implements AccompanyingPeriodInf return $this->entityRepository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->entityRepository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocumentRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocumentRepository.php index a0364188a..59bb3f915 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocumentRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationDocumentRepository.php @@ -44,7 +44,7 @@ class AccompanyingPeriodWorkEvaluationDocumentRepository implements ObjectReposi * * @return array|object[]|AccompanyingPeriodWorkEvaluationDocument[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php index 840c44304..9c6ed19fc 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkEvaluationRepository.php @@ -53,7 +53,7 @@ class AccompanyingPeriodWorkEvaluationRepository implements ObjectRepository * * @return array|AccompanyingPeriodWorkEvaluation[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php index f0f00183d..95b995e74 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/AccompanyingPeriodWorkRepository.php @@ -52,7 +52,7 @@ final readonly class AccompanyingPeriodWorkRepository implements ObjectRepositor ->select('count(w)')->getQuery()->getSingleScalarResult(); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -67,7 +67,7 @@ final readonly class AccompanyingPeriodWorkRepository implements ObjectRepositor return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php index c60bdf4a7..de5df1347 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriod/ClosingMotiveRepository.php @@ -41,7 +41,7 @@ final readonly class ClosingMotiveRepository implements ClosingMotiveRepositoryI /** * @return array|ClosingMotive[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php index b50a1b18e..e058c4e8d 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepository.php @@ -108,8 +108,8 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin Person $person, string $role, ?array $orderBy = [], - int $limit = null, - int $offset = null + ?int $limit = null, + ?int $offset = null ): array { $qb = $this->accompanyingPeriodRepository->createQueryBuilder('ap'); $scopes = $this->authorizationHelper @@ -138,7 +138,7 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin return $qb->getQuery()->getResult(); } - public function addOrderLimitClauses(QueryBuilder $qb, array $orderBy = null, int $limit = null, int $offset = null): QueryBuilder + public function addOrderLimitClauses(QueryBuilder $qb, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): QueryBuilder { if (null !== $orderBy) { foreach ($orderBy as $field => $order) { @@ -231,7 +231,7 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin return $centerOnScopes; } - public function findByUnDispatched(array $jobs, array $services, array $administrativeAdministrativeLocations, array $orderBy = null, int $limit = null, int $offset = null): array + public function findByUnDispatched(array $jobs, array $services, array $administrativeAdministrativeLocations, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { $qb = $this->buildQueryUnDispatched($jobs, $services, $administrativeAdministrativeLocations); $qb->select('ap'); diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php index 645a4d996..ba3396af8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodACLAwareRepositoryInterface.php @@ -40,8 +40,8 @@ interface AccompanyingPeriodACLAwareRepositoryInterface Person $person, string $role, ?array $orderBy = [], - int $limit = null, - int $offset = null + ?int $limit = null, + ?int $offset = null ): array; /** @@ -51,7 +51,7 @@ interface AccompanyingPeriodACLAwareRepositoryInterface * * @return list */ - public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findByUnDispatched(array $jobs, array $services, array $administrativeLocations, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; /** * @param array|PostalCode[] $postalCodes diff --git a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php index 449df5160..7b681a8f5 100644 --- a/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/AccompanyingPeriodRepository.php @@ -39,7 +39,7 @@ final class AccompanyingPeriodRepository implements ObjectRepository return $qb->select('count(a)')->getQuery()->getSingleScalarResult(); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -57,7 +57,7 @@ final class AccompanyingPeriodRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php index bf9ffb1ff..5a0dee15d 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepository.php @@ -49,7 +49,7 @@ final class HouseholdCompositionRepository implements HouseholdCompositionReposi * * @return array|object[]|HouseholdComposition[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -57,7 +57,7 @@ final class HouseholdCompositionRepository implements HouseholdCompositionReposi /** * @return array|HouseholdComposition[]|object[] */ - public function findByHousehold(Household $household, array $orderBy = null, int $limit = null, int $offset = null): array + public function findByHousehold(Household $household, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->findBy(['household' => $household], $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php index 3fc4bb46f..84c62392b 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionRepositoryInterface.php @@ -32,12 +32,12 @@ interface HouseholdCompositionRepositoryInterface extends ObjectRepository * * @return array|object[]|HouseholdComposition[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; /** * @return array|HouseholdComposition[]|object[] */ - public function findByHousehold(Household $household, array $orderBy = null, int $limit = null, int $offset = null): array; + public function findByHousehold(Household $household, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array; public function findOneBy(array $criteria): ?HouseholdComposition; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepository.php index d13b17fe4..2b748865b 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepository.php @@ -51,7 +51,7 @@ final class HouseholdCompositionTypeRepository implements HouseholdCompositionTy * * @return array|HouseholdCompositionType[]|object[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepositoryInterface.php index 4041430d8..2eea434b8 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdCompositionTypeRepositoryInterface.php @@ -34,7 +34,7 @@ interface HouseholdCompositionTypeRepositoryInterface extends ObjectRepository * * @return array|HouseholdCompositionType[]|object[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; public function findOneBy(array $criteria): ?HouseholdCompositionType; diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php index 5fa3f22de..2904ffb61 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/HouseholdRepository.php @@ -65,7 +65,7 @@ final class HouseholdRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php index 58c89fb7b..ebcfabe4f 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/PersonHouseholdAddressRepository.php @@ -44,12 +44,12 @@ final class PersonHouseholdAddressRepository implements ObjectRepository * * @return PersonHouseholdAddress[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?PersonHouseholdAddress + public function findOneBy(array $criteria, ?array $orderBy = null): ?PersonHouseholdAddress { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php b/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php index b2fc2b2d1..32ca5b8fa 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Household/PositionRepository.php @@ -49,7 +49,7 @@ final class PositionRepository implements ObjectRepository * * @return Position[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php index b2409eace..3324ee444 100644 --- a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepository.php @@ -34,7 +34,7 @@ class MaritalStatusRepository implements MaritalStatusRepositoryInterface return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepositoryInterface.php index 13be6842e..1f51060e9 100644 --- a/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/MaritalStatusRepositoryInterface.php @@ -19,7 +19,7 @@ interface MaritalStatusRepositoryInterface public function findAll(): array; - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; public function findOneBy(array $criteria): ?MaritalStatus; diff --git a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryRepository.php b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryRepository.php index bf8ec9344..b6d80a721 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryRepository.php @@ -40,7 +40,7 @@ class PersonCenterHistoryRepository implements PersonCenterHistoryInterface /** * @return array|PersonCenterHistory[] */ - public function findBy(array $criteria, array $orderBy = null, int $limit = null, int $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php index 7b6010718..f59f843ac 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepository.php @@ -30,16 +30,16 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor } public function buildAuthorizedQuery( - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): SearchApiQuery { $query = $this->createSearchQuery( $default, @@ -58,16 +58,16 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor } public function countBySearchCriteria( - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): int { $query = $this->buildAuthorizedQuery( $default, @@ -92,16 +92,16 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor * @throws ParsingException */ public function createSearchQuery( - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): SearchApiQuery { $query = new SearchApiQuery(); $query @@ -249,16 +249,16 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor int $start, int $limit, bool $simplify = false, - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): array { $query = $this->buildAuthorizedQuery( $default, diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php index b9f62b89f..c327ecd40 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonACLAwareRepositoryInterface.php @@ -17,29 +17,29 @@ use Chill\PersonBundle\Entity\Person; interface PersonACLAwareRepositoryInterface { public function buildAuthorizedQuery( - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): SearchApiQuery; public function countBySearchCriteria( - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ); /** @@ -49,15 +49,15 @@ interface PersonACLAwareRepositoryInterface int $start, int $limit, bool $simplify = false, - string $default = null, - string $firstname = null, - string $lastname = null, - \DateTimeInterface $birthdate = null, - \DateTimeInterface $birthdateBefore = null, - \DateTimeInterface $birthdateAfter = null, - string $gender = null, - string $countryCode = null, - string $phonenumber = null, - string $city = null + ?string $default = null, + ?string $firstname = null, + ?string $lastname = null, + ?\DateTimeInterface $birthdate = null, + ?\DateTimeInterface $birthdateBefore = null, + ?\DateTimeInterface $birthdateAfter = null, + ?string $gender = null, + ?string $countryCode = null, + ?string $phonenumber = null, + ?string $city = null ): array; } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php index 0d951e3bd..b7104a843 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonRepository.php @@ -44,7 +44,7 @@ class PersonRepository implements ObjectRepository return $qb->getQuery()->getSingleScalarResult(); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -59,7 +59,7 @@ class PersonRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/PersonResourceRepository.php b/src/Bundle/ChillPersonBundle/Repository/PersonResourceRepository.php index 04d8d09f9..b2bff2ce5 100644 --- a/src/Bundle/ChillPersonBundle/Repository/PersonResourceRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/PersonResourceRepository.php @@ -26,7 +26,7 @@ final class PersonResourceRepository implements ObjectRepository $this->repository = $entityManager->getRepository(PersonResource::class); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -50,7 +50,7 @@ final class PersonResourceRepository implements ObjectRepository * * @return PersonResource[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php index d66d14572..d3fe813dc 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationRepository.php @@ -35,7 +35,7 @@ class RelationRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php index 26ae266d8..932b872c5 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/Relationships/RelationshipRepository.php @@ -48,7 +48,7 @@ class RelationshipRepository implements ObjectRepository return $this->repository->findAll(); } - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php b/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php index a866d5eec..22556d747 100644 --- a/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/ResidentialAddressRepository.php @@ -41,7 +41,7 @@ class ResidentialAddressRepository extends ServiceEntityRepository ->getSingleScalarResult(); } - public function buildQueryFindCurrentResidentialAddresses(Person $person, \DateTimeImmutable $at = null): QueryBuilder + public function buildQueryFindCurrentResidentialAddresses(Person $person, ?\DateTimeImmutable $at = null): QueryBuilder { $date = $at ?? new \DateTimeImmutable('today'); $qb = $this->createQueryBuilder('ra'); @@ -66,7 +66,7 @@ class ResidentialAddressRepository extends ServiceEntityRepository /** * @return array|ResidentialAddress[]|null */ - public function findCurrentResidentialAddressByPerson(Person $person, \DateTimeImmutable $at = null): array + public function findCurrentResidentialAddressByPerson(Person $person, ?\DateTimeImmutable $at = null): array { return $this->buildQueryFindCurrentResidentialAddresses($person, $at) ->select('ra') diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php index 8391132f1..a7b739f7d 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepository.php @@ -48,12 +48,12 @@ final class EvaluationRepository implements EvaluationRepositoryInterface * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?Evaluation + public function findOneBy(array $criteria, ?array $orderBy = null): ?Evaluation { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepositoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepositoryInterface.php index cba57efe0..aa1de34eb 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepositoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/EvaluationRepositoryInterface.php @@ -34,9 +34,9 @@ interface EvaluationRepositoryInterface extends ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array; + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array; - public function findOneBy(array $criteria, array $orderBy = null): ?Evaluation; + public function findOneBy(array $criteria, ?array $orderBy = null): ?Evaluation; /** * @return class-string diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php index 8a2831996..f99bd54a5 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/GoalRepository.php @@ -56,7 +56,7 @@ final class GoalRepository implements ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -64,7 +64,7 @@ final class GoalRepository implements ObjectRepository /** * @return Goal[] */ - public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], int $limit = null, int $offset = null): array + public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], ?int $limit = null, ?int $offset = null): array { $qb = $this->buildQueryBySocialActionWithDescendants($action); $qb->select('g'); @@ -88,7 +88,7 @@ final class GoalRepository implements ObjectRepository ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?Goal + public function findOneBy(array $criteria, ?array $orderBy = null): ?Goal { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php index 8b8fbfc2b..786c6635a 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/ResultRepository.php @@ -67,7 +67,7 @@ final class ResultRepository implements ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } @@ -75,7 +75,7 @@ final class ResultRepository implements ObjectRepository /** * @return array */ - public function findByGoal(Goal $goal, array $orderBy = null, int $limit = null, int $offset = null): array + public function findByGoal(Goal $goal, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array { $qb = $this->buildQueryByGoal($goal); @@ -96,7 +96,7 @@ final class ResultRepository implements ObjectRepository /** * @return Result[] */ - public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], int $limit = null, int $offset = null): array + public function findBySocialActionWithDescendants(SocialAction $action, array $orderBy = [], ?int $limit = null, ?int $offset = null): array { $qb = $this->buildQueryBySocialActionWithDescendants($action); $qb->select('r'); @@ -112,7 +112,7 @@ final class ResultRepository implements ObjectRepository ->getResult(); } - public function findOneBy(array $criteria, array $orderBy = null): ?Result + public function findOneBy(array $criteria, ?array $orderBy = null): ?Result { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php index 2fc3b35df..da6bfcc46 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialActionRepository.php @@ -26,7 +26,7 @@ final class SocialActionRepository implements ObjectRepository $this->repository = $entityManager->getRepository(SocialAction::class); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -58,12 +58,12 @@ final class SocialActionRepository implements ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?SocialAction + public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialAction { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php index d3e6fa10f..21f06afd1 100644 --- a/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php +++ b/src/Bundle/ChillPersonBundle/Repository/SocialWork/SocialIssueRepository.php @@ -53,12 +53,12 @@ final class SocialIssueRepository implements ObjectRepository * * @return array */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } - public function findOneBy(array $criteria, array $orderBy = null): ?SocialIssue + public function findOneBy(array $criteria, ?array $orderBy = null): ?SocialIssue { return $this->repository->findOneBy($criteria, $orderBy); } diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php index d6cc4c25f..b476c2f5f 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationDocumentNormalizer.php @@ -29,7 +29,7 @@ class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAware { } - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $initial = $this->normalizer->normalize($object, $format, array_merge($context, [ self::SKIP => spl_object_hash($object), @@ -49,7 +49,7 @@ class AccompanyingPeriodWorkEvaluationDocumentNormalizer implements ContextAware return $initial; } - public function supportsNormalization($data, string $format = null, array $context = []) + public function supportsNormalization($data, ?string $format = null, array $context = []) { return $data instanceof AccompanyingPeriodWorkEvaluationDocument && 'json' === $format diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php index 39560883e..016098535 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkEvaluationNormalizer.php @@ -33,7 +33,7 @@ class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormaliz /** * @param AccompanyingPeriodWorkEvaluation $object */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $initial = $this->normalizer->normalize($object, $format, array_merge( $context, @@ -66,7 +66,7 @@ class AccompanyingPeriodWorkEvaluationNormalizer implements ContextAwareNormaliz return $initial; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { return 'json' === $format && $data instanceof AccompanyingPeriodWorkEvaluation diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php index 361321f38..438e89093 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/AccompanyingPeriodWorkNormalizer.php @@ -37,7 +37,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac * * @throws ExceptionInterface */ - public function normalize($object, string $format = null, array $context = []): null|array|\ArrayObject|bool|float|int|string + public function normalize($object, ?string $format = null, array $context = []): array|\ArrayObject|bool|float|int|string|null { $initial = $this->normalizer->normalize($object, $format, array_merge( $context, @@ -78,7 +78,7 @@ class AccompanyingPeriodWorkNormalizer implements ContextAwareNormalizerInterfac return $initial; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { return 'json' === $format && $data instanceof AccompanyingPeriodWork diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php index cfd310013..99314ebdc 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/WorkflowNormalizer.php @@ -36,7 +36,7 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA * * @throws ExceptionInterface */ - public function normalize($object, string $format = null, array $context = []): array + public function normalize($object, ?string $format = null, array $context = []): array { $data = $this->normalizer->normalize($object, $format, array_merge( $context, @@ -53,7 +53,7 @@ class WorkflowNormalizer implements ContextAwareNormalizerInterface, NormalizerA return $data; } - public function supportsNormalization($data, string $format = null, array $context = []): bool + public function supportsNormalization($data, ?string $format = null, array $context = []): bool { return 'json' === $format && $data instanceof EntityWorkflow diff --git a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php index a6f82be91..7d6e199bd 100644 --- a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php +++ b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php @@ -33,7 +33,7 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen ) { } - public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $accompanyingPeriodWorkMetadata = $this->entityManager->getClassMetadata(AccompanyingPeriod\AccompanyingPeriodWork::class); $query = $this->buildBaseQuery(); @@ -52,7 +52,7 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen return $this->security->isGranted(AccompanyingPeriodWorkVoter::SEE, $accompanyingPeriod); } - private function addWhereClausesToQuery(FetchQuery $query, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null): FetchQuery + private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { $classMetadata = $this->entityManager->getClassMetadata(AccompanyingPeriod\AccompanyingPeriodWorkEvaluationDocument::class); $storedObjectMetadata = $this->entityManager->getClassMetadata(StoredObject::class); @@ -84,7 +84,7 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen return $query; } - public function buildFetchQueryForPerson(Person $person, \DateTimeImmutable $startDate = null, \DateTimeImmutable $endDate = null, string $content = null, string $origin = null): FetchQueryInterface + public function buildFetchQueryForPerson(Person $person, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { $storedObjectMetadata = $this->entityManager->getClassMetadata(StoredObject::class); $accompanyingPeriodWorkMetadata = $this->entityManager->getClassMetadata(AccompanyingPeriod\AccompanyingPeriodWork::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php index 021cab706..bb833c96b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Events/PersonMoveEventSubscriberTest.php @@ -244,10 +244,10 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase } private function buildSubscriber( - \Twig\Environment $engine = null, - NotificationPersisterInterface $notificationPersister = null, - Security $security = null, - TranslatorInterface $translator = null + ?\Twig\Environment $engine = null, + ?NotificationPersisterInterface $notificationPersister = null, + ?Security $security = null, + ?TranslatorInterface $translator = null ): PersonAddressMoveEventSubscriber { if (null === $translator) { $double = $this->prophesize(TranslatorInterface::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php index 86796fc3f..a0223e660 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Controller/PersonControllerCreateTest.php @@ -222,7 +222,7 @@ final class PersonControllerCreateTest extends WebTestCase Form &$creationForm, string $firstname = 'God', string $lastname = 'Jesus', - \DateTime $birthdate = null + ?\DateTime $birthdate = null ) { $creationForm->get(self::FIRSTNAME_INPUT)->setValue($firstname.'_'.uniqid()); $creationForm->get(self::LASTNAME_INPUT)->setValue($lastname.'_'.uniqid()); diff --git a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php index 827b2a2e2..99515562c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Household/MembersEditorTest.php @@ -561,8 +561,8 @@ final class MembersEditorTest extends TestCase } private function buildMembersEditorFactory( - EventDispatcherInterface $eventDispatcher = null, - ValidatorInterface $validator = null + ?EventDispatcherInterface $eventDispatcher = null, + ?ValidatorInterface $validator = null ) { if (null === $eventDispatcher) { $double = $this->getProphet()->prophesize(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php index 87c57be86..609ee03fb 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Repository/AccompanyingPeriodACLAwareRepositoryTest.php @@ -521,7 +521,7 @@ class AccompanyingPeriodACLAwareRepositoryTest extends KernelTestCase /** * @param array $scopes */ - private function buildPeriod(Person $person, array $scopes, null|User $creator, bool $confirm): AccompanyingPeriod + private function buildPeriod(Person $person, array $scopes, User|null $creator, bool $confirm): AccompanyingPeriod { $period = new AccompanyingPeriod(); $period->addPerson($person); diff --git a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php index 1dbbceb3e..ec8893ff9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Security/Authorization/PersonVoterTest.php @@ -155,7 +155,7 @@ final class PersonVoterTest extends KernelTestCase * * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface */ - protected function prepareToken(array $permissions = null) + protected function prepareToken(?array $permissions = null) { $token = $this->prophet->prophesize(); $token diff --git a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php index 59bb0a731..70fe30e6a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Serializer/Normalizer/PersonDocGenNormalizerTest.php @@ -237,12 +237,12 @@ final class PersonDocGenNormalizerTest extends KernelTestCase } private function buildNormalizer( - PersonRender $personRender = null, - RelationshipRepository $relationshipRepository = null, - TranslatorInterface $translator = null, - TranslatableStringHelper $translatableStringHelper = null, - NormalizerInterface $normalizer = null, - SummaryBudgetInterface $summaryBudget = null + ?PersonRender $personRender = null, + ?RelationshipRepository $relationshipRepository = null, + ?TranslatorInterface $translator = null, + ?TranslatableStringHelper $translatableStringHelper = null, + ?NormalizerInterface $normalizer = null, + ?SummaryBudgetInterface $summaryBudget = null ): PersonDocGenNormalizer { if (null === $summaryBudget) { $summaryBudget = $this->prophesize(SummaryBudgetInterface::class); @@ -274,11 +274,11 @@ final class PersonDocGenNormalizerTest extends KernelTestCase } private function buildPersonNormalizer( - PersonRender $personRender = null, - RelationshipRepository $relationshipRepository = null, - TranslatorInterface $translator = null, - TranslatableStringHelper $translatableStringHelper = null, - SummaryBudgetInterface $summaryBudget = null + ?PersonRender $personRender = null, + ?RelationshipRepository $relationshipRepository = null, + ?TranslatorInterface $translator = null, + ?TranslatableStringHelper $translatableStringHelper = null, + ?SummaryBudgetInterface $summaryBudget = null ): PersonDocGenNormalizer { if (null === $relationshipRepository) { $relationshipRepository = $this->prophesize(RelationshipRepository::class); diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php index 772e669bb..f6b2bdde9 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/DocGenerator/PersonContextTest.php @@ -341,20 +341,20 @@ final class PersonContextTest extends KernelTestCase } private function buildPersonContext( - AuthorizationHelperInterface $authorizationHelper = null, - BaseContextData $baseContextData = null, - CenterResolverManagerInterface $centerResolverManager = null, - DocumentCategoryRepository $documentCategoryRepository = null, - EntityManagerInterface $em = null, - NormalizerInterface $normalizer = null, - ParameterBagInterface $parameterBag = null, - ScopeRepositoryInterface $scopeRepository = null, - Security $security = null, - TranslatorInterface $translator = null, - TranslatableStringHelperInterface $translatableStringHelper = null, - ThirdPartyRender $thirdPartyRender = null, - ThirdPartyRepository $thirdPartyRepository = null, - ResidentialAddressRepository $residentialAddressRepository = null + ?AuthorizationHelperInterface $authorizationHelper = null, + ?BaseContextData $baseContextData = null, + ?CenterResolverManagerInterface $centerResolverManager = null, + ?DocumentCategoryRepository $documentCategoryRepository = null, + ?EntityManagerInterface $em = null, + ?NormalizerInterface $normalizer = null, + ?ParameterBagInterface $parameterBag = null, + ?ScopeRepositoryInterface $scopeRepository = null, + ?Security $security = null, + ?TranslatorInterface $translator = null, + ?TranslatableStringHelperInterface $translatableStringHelper = null, + ?ThirdPartyRender $thirdPartyRender = null, + ?ThirdPartyRepository $thirdPartyRepository = null, + ?ResidentialAddressRepository $residentialAddressRepository = null ): PersonContext { if (null === $authorizationHelper) { $authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class)->reveal(); diff --git a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php index afbc0b2ab..35617e37a 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProviderTest.php @@ -39,9 +39,9 @@ class AccompanyingPeriodWorkEvaluationGenericDocProviderTest extends KernelTestC * @dataProvider provideSearchArguments */ public function testBuildFetchQueryForAccompanyingPeriod( - \DateTimeImmutable $startDate = null, - \DateTimeImmutable $endDate = null, - string $content = null + ?\DateTimeImmutable $startDate = null, + ?\DateTimeImmutable $endDate = null, + ?string $content = null ): void { $period = $this->entityManager->createQuery('SELECT a FROM '.AccompanyingPeriod::class.' a') ->setMaxResults(1) diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php index 90163fd2e..743d83c8a 100644 --- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php @@ -134,7 +134,7 @@ final class ReportVoterTest extends KernelTestCase Report $report, $action, $message, - User $user = null + ?User $user = null ) { $token = $this->prepareToken($user); $result = $this->voter->vote($token, $report, [$action]); @@ -161,7 +161,7 @@ final class ReportVoterTest extends KernelTestCase * * @return \Symfony\Component\Security\Core\Authentication\Token\TokenInterface */ - protected function prepareToken(User $user = null) + protected function prepareToken(?User $user = null) { $token = $this->prophet->prophesize(); $token diff --git a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php index 268335cbc..c4c261cd3 100644 --- a/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php +++ b/src/Bundle/ChillReportBundle/migrations/Version20150622233319.php @@ -37,7 +37,7 @@ class Version20150622233319 extends AbstractMigration implements ContainerAwareI $this->addSql('ALTER TABLE Report DROP scope_id'); } - public function setContainer(ContainerInterface $container = null) + public function setContainer(?ContainerInterface $container = null) { if (null === $container) { throw new \RuntimeException('Container is not provided. This migration need container to set a default center'); diff --git a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php index 948f9a81a..f9118737f 100644 --- a/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/AbstractTask.php @@ -189,7 +189,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface return $this->closed; } - public function setAssignee(User $assignee = null) + public function setAssignee(?User $assignee = null) { $this->assignee = $assignee; diff --git a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php index f5ed0d3b0..25b5008b0 100644 --- a/src/Bundle/ChillTaskBundle/Entity/SingleTask.php +++ b/src/Bundle/ChillTaskBundle/Entity/SingleTask.php @@ -112,7 +112,7 @@ class SingleTask extends AbstractTask * message="An end date is required if a warning interval is set" * ) */ - private null|\DateInterval $warningInterval = null; + private \DateInterval|null $warningInterval = null; public function __construct() { @@ -122,7 +122,7 @@ class SingleTask extends AbstractTask /** * Get endDate. */ - public function getEndDate(): null|\DateTime + public function getEndDate(): \DateTime|null { return $this->endDate; } @@ -184,7 +184,7 @@ class SingleTask extends AbstractTask /** * Get warningInterval. */ - public function getWarningInterval(): null|\DateInterval + public function getWarningInterval(): \DateInterval|null { return $this->warningInterval; } @@ -234,7 +234,7 @@ class SingleTask extends AbstractTask * * @return SingleTask */ - public function setWarningInterval(null|\DateInterval $warningInterval) + public function setWarningInterval(\DateInterval|null $warningInterval) { $this->warningInterval = $warningInterval; diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php index e55a8f700..d72c23298 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepository.php @@ -28,7 +28,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function buildBaseQuery( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?array $types = [], ?array $users = [] @@ -150,7 +150,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function buildQueryByCourse( AccompanyingPeriod $course, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): QueryBuilder { $qb = $this->buildBaseQuery($pattern, $flags); @@ -162,7 +162,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function buildQueryByPerson( Person $person, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): QueryBuilder { $qb = $this->buildBaseQuery($pattern, $flags); @@ -173,7 +173,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function buildQueryMyTasks( - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): QueryBuilder { $qb = $this->buildBaseQuery($pattern, $flags); @@ -184,7 +184,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function countByAllViewable( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?array $types = [], ?array $users = [] @@ -199,7 +199,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function countByCourse( AccompanyingPeriod $course, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): int { $qb = $this->buildQueryByCourse($course, $pattern, $flags); @@ -211,7 +211,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function countByCurrentUsersTasks( - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): int { return $this->buildQueryMyTasks($pattern, $flags) @@ -221,7 +221,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function countByPerson( Person $person, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): int { $qb = $this->buildQueryByPerson($person, $pattern, $flags); @@ -233,7 +233,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function findByAllViewable( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?array $types = [], ?array $users = [], @@ -249,7 +249,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function findByCourse( AccompanyingPeriod $course, - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, @@ -262,7 +262,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR } public function findByCurrentUsersTasks( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, @@ -275,7 +275,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR public function findByPerson( Person $person, - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php index 2f305ae3e..bb63c0caa 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskAclAwareRepositoryInterface.php @@ -17,7 +17,7 @@ use Chill\PersonBundle\Entity\Person; interface SingleTaskAclAwareRepositoryInterface { public function countByAllViewable( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?array $types = [], ?array $users = [] @@ -25,20 +25,20 @@ interface SingleTaskAclAwareRepositoryInterface public function countByCourse( AccompanyingPeriod $course, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): int; - public function countByCurrentUsersTasks(string $pattern = null, ?array $flags = []): int; + public function countByCurrentUsersTasks(?string $pattern = null, ?array $flags = []): int; public function countByPerson( Person $person, - string $pattern = null, + ?string $pattern = null, ?array $flags = [] ): int; public function findByAllViewable( - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?array $types = [], ?array $users = [], @@ -49,18 +49,18 @@ interface SingleTaskAclAwareRepositoryInterface public function findByCourse( AccompanyingPeriod $course, - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = [] ): array; - public function findByCurrentUsersTasks(string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = []): array; + public function findByCurrentUsersTasks(?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = []): array; public function findByPerson( Person $person, - string $pattern = null, + ?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php index 6260b90c1..c8a84cbf8 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskRepository.php @@ -56,7 +56,7 @@ class SingleTaskRepository extends EntityRepository * * @return int */ - public function countByParameters($params, User $currentUser = null) + public function countByParameters($params, ?User $currentUser = null) { $qb = $this->createQueryBuilder('st') ->select('COUNT(st)'); @@ -175,7 +175,7 @@ class SingleTaskRepository extends EntityRepository $qb->where($where); } - protected function buildQuery(QueryBuilder $qb, $params, User $currentUser = null) + protected function buildQuery(QueryBuilder $qb, $params, ?User $currentUser = null) { if (null !== $currentUser) { $this->buildACLQuery($qb, $currentUser); diff --git a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php index cc65d0215..3b2de6ed5 100644 --- a/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php +++ b/src/Bundle/ChillTaskBundle/Security/Authorization/AuthorizationEvent.php @@ -26,7 +26,7 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event protected $vote; public function __construct( - private readonly null|AbstractTask|AccompanyingPeriod|Person $subject, + private readonly AbstractTask|AccompanyingPeriod|Person|null $subject, private readonly string $attribute, private readonly TokenInterface $token ) { diff --git a/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php b/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php index 878ae43cd..affaab8c7 100644 --- a/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php +++ b/src/Bundle/ChillTaskBundle/Templating/TaskTwigExtension.php @@ -39,7 +39,7 @@ class TaskTwigExtension extends AbstractExtension AbstractTask $task, string $key, $metadataSubject = null, - string $name = null + ?string $name = null ) { return $this->taskWorkflowManager->getWorkflowMetadata($task, $key, $metadataSubject, $name); } diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php index 949786dd5..c0ce60dbe 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php +++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowManager.php @@ -56,7 +56,7 @@ class TaskWorkflowManager implements WorkflowSupportStrategyInterface return $definitions[0]; } - public function getWorkflowMetadata(AbstractTask $task, string $key, $metadataSubject = null, string $name = null) + public function getWorkflowMetadata(AbstractTask $task, string $key, $metadataSubject = null, ?string $name = null) { return $this->getTaskWorkflowDefinition($task) ->getWorkflowMetadata($task, $key, $metadataSubject); diff --git a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php index 214d9ba36..30082d90b 100644 --- a/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php +++ b/src/Bundle/ChillThirdPartyBundle/Controller/ThirdPartyController.php @@ -59,7 +59,7 @@ final class ThirdPartyController extends CRUDController ->build(); } - protected function countEntities(string $action, Request $request, FilterOrderHelper $filterOrder = null): int + protected function countEntities(string $action, Request $request, ?FilterOrderHelper $filterOrder = null): int { if (null === $filterOrder) { throw new \LogicException('filterOrder should not be null'); @@ -71,7 +71,7 @@ final class ThirdPartyController extends CRUDController ); } - protected function createFormFor(string $action, $entity, string $formClass = null, array $formOptions = []): FormInterface + protected function createFormFor(string $action, $entity, ?string $formClass = null, array $formOptions = []): FormInterface { if ('new' === $action) { return parent::createFormFor($action, $entity, $formClass, \array_merge( @@ -90,7 +90,7 @@ final class ThirdPartyController extends CRUDController return parent::createFormFor($action, $entity, $formClass, $formOptions); } - protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, FilterOrderHelper $filterOrder = null) + protected function getQueryResult(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, ?FilterOrderHelper $filterOrder = null) { return $this->thirdPartyACLAwareRepository ->listThirdParties( diff --git a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php index f4ad5293c..721fbcb67 100644 --- a/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php +++ b/src/Bundle/ChillThirdPartyBundle/Entity/ThirdParty.php @@ -655,7 +655,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin throw new \UnexpectedValueException(sprintf('typeAndCategory should be a string or a %s', ThirdPartyCategory::class)); } - public function setAcronym(string $acronym = null): ThirdParty + public function setAcronym(?string $acronym = null): ThirdParty { $this->acronym = (string) $acronym; @@ -679,7 +679,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin /** * @return $this */ - public function setAddress(Address $address = null) + public function setAddress(?Address $address = null) { $this->address = $address; @@ -716,7 +716,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin * * @return ThirdParty */ - public function setComment(string $comment = null) + public function setComment(?string $comment = null) { $this->comment = $comment; @@ -754,7 +754,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin * * @return ThirdParty */ - public function setEmail(string $email = null) + public function setEmail(?string $email = null) { $this->email = trim((string) $email); @@ -806,7 +806,7 @@ class ThirdParty implements TrackCreationInterface, TrackUpdateInterface, \Strin /** * Set telephone. */ - public function setTelephone(PhoneNumber $telephone = null): self + public function setTelephone(?PhoneNumber $telephone = null): self { $this->telephone = $telephone; diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php index 63538cfc2..3538a7877 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyACLAwareRepository.php @@ -21,7 +21,7 @@ final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareR { } - public function buildQuery(string $filterString = null): QueryBuilder + public function buildQuery(?string $filterString = null): QueryBuilder { $qb = $this->thirdPartyRepository->createQueryBuilder('tp'); @@ -53,8 +53,8 @@ final readonly class ThirdPartyACLAwareRepository implements ThirdPartyACLAwareR string $role, ?string $filterString, ?array $orderBy = [], - int $limit = null, - int $offset = null + ?int $limit = null, + ?int $offset = null ): array { $qb = $this->buildQuery($filterString); diff --git a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php index c2e6c74c1..7390808c8 100644 --- a/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php +++ b/src/Bundle/ChillThirdPartyBundle/Repository/ThirdPartyRepository.php @@ -38,7 +38,7 @@ class ThirdPartyRepository implements ObjectRepository return $qb->getQuery()->getSingleScalarResult(); } - public function createQueryBuilder(string $alias, string $indexBy = null): QueryBuilder + public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder { return $this->repository->createQueryBuilder($alias, $indexBy); } @@ -62,7 +62,7 @@ class ThirdPartyRepository implements ObjectRepository * * @return array|ThirdParty[] */ - public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null): array + public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null): array { return $this->repository->findBy($criteria, $orderBy, $limit, $offset); } diff --git a/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php b/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php index 633529d02..b85d1b8b3 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Controller/Responder.php @@ -28,7 +28,7 @@ final readonly class Responder implements ResponderInterface public function file( $file, - string $filename = null, + ?string $filename = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT ): BinaryFileResponse { $response = new BinaryFileResponse($file); diff --git a/src/Bundle/ChillWopiBundle/src/Service/Controller/ResponderInterface.php b/src/Bundle/ChillWopiBundle/src/Service/Controller/ResponderInterface.php index 734a5b5b3..a2d7b5518 100644 --- a/src/Bundle/ChillWopiBundle/src/Service/Controller/ResponderInterface.php +++ b/src/Bundle/ChillWopiBundle/src/Service/Controller/ResponderInterface.php @@ -27,7 +27,7 @@ interface ResponderInterface */ public function file( $file, - string $filename = null, + ?string $filename = null, string $disposition = ResponseHeaderBag::DISPOSITION_ATTACHMENT ): BinaryFileResponse; From f02168950f62be6d1c944c9eeb0ca5699eb1c7ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 10:40:07 +0100 Subject: [PATCH 25/82] Export: group accompanying period by person participating --- .../unreleased/Feature-20240207-103951.yaml | 5 ++ .../PersonParticipatingAggregator.php | 78 +++++++++++++++++++ .../PersonParticipatingAggregatorTest.php | 61 +++++++++++++++ .../services/exports_accompanying_course.yaml | 4 + .../translations/messages.fr.yml | 4 + 5 files changed, 152 insertions(+) create mode 100644 .changes/unreleased/Feature-20240207-103951.yaml create mode 100644 src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php diff --git a/.changes/unreleased/Feature-20240207-103951.yaml b/.changes/unreleased/Feature-20240207-103951.yaml new file mode 100644 index 000000000..b0f71b7cf --- /dev/null +++ b/.changes/unreleased/Feature-20240207-103951.yaml @@ -0,0 +1,5 @@ +kind: Feature +body: 'Export: group accompanying period by person participating' +time: 2024-02-07T10:39:51.97331052+01:00 +custom: + Issue: "253" diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php new file mode 100644 index 000000000..632d0402d --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php @@ -0,0 +1,78 @@ + $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.course.by-user.header'), + default => throw new \UnexpectedValueException('key not supported: '.$key), + }; + } + + public function getQueryKeys($data) + { + return [self::KEY]; + } + + public function getTitle() + { + return 'export.aggregator.course.by-user.title'; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $k = self::KEY; + + if (!in_array('acppart', $qb->getAllAliases(), true)) { + $qb->join('acp.participations', 'acppart'); + } + + $qb->addSelect("IDENTITY(acppart.person) AS {$k}") + ->addGroupBy($k); + } + + public function applyOn() + { + return Declarations::ACP_TYPE; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php new file mode 100644 index 000000000..8e9cdaf6d --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregatorTest.php @@ -0,0 +1,61 @@ +labelPersonHelper = self::$container->get(LabelPersonHelper::class); + } + + public function getAggregator() + { + return new PersonParticipatingAggregator($this->labelPersonHelper); + } + + public function getFormData() + { + return [[]]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + + $em = self::$container->get(EntityManagerInterface::class); + + return [ + $em->createQueryBuilder() + ->select('count(acp.id)') + ->from(AccompanyingPeriod::class, 'acp'), + $em->createQueryBuilder() + ->select('count(acp.id)') + ->from(AccompanyingPeriod::class, 'acp') + ->join('acp.participations', 'acppart'), + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml index 4eaaf67b0..c869a4494 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml @@ -259,3 +259,7 @@ services: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ClosingDateAggregator: tags: - { name: chill.export_aggregator, alias: accompanyingcourse_closing_date_aggregator } + + Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\PersonParticipatingAggregator: + tags: + - { name: chill.export_aggregator, alias: accompanyingcourse_person_part_aggregator } diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 783bc6be0..2b5ce5c97 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1038,6 +1038,10 @@ export: header: Code postal course: + by-user: + title: Grouper les parcours par usager participant + header: Usager participant + by_referrer: Computation date for referrer: Date à laquelle le référent était actif by_user_scope: From 439fecd69f1a66d32deb24a459f9da47860d663f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 13:25:49 +0100 Subject: [PATCH 26/82] fix cs --- .../PersonFilters/WithParticipationBetweenDatesFilter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php index 289af5f07..1df656a00 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/WithParticipationBetweenDatesFilter.php @@ -25,7 +25,8 @@ final readonly class WithParticipationBetweenDatesFilter implements FilterInterf { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) {} + ) { + } public function addRole(): ?string { From 950835c10b117e3439117711a7885bd86026a1d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 11:46:43 +0100 Subject: [PATCH 27/82] Add filter for courses not linked to a reference address This commit introduces a new filter to the Accompanying Course section. It allows users to filter for courses that are not associated with a reference address. The accompanying test and translation changes are also included in this update. --- .../unreleased/Feature-20240207-114629.yaml | 5 + ...tAssociatedWithAReferenceAddressFilter.php | 99 +++++++++++++++++++ ...ociatedWithAReferenceAddressFilterTest.php | 66 +++++++++++++ .../services/exports_accompanying_course.yaml | 4 + .../translations/messages+intl-icu.fr.yaml | 5 + .../translations/messages.fr.yml | 3 + 6 files changed, 182 insertions(+) create mode 100644 .changes/unreleased/Feature-20240207-114629.yaml create mode 100644 src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php diff --git a/.changes/unreleased/Feature-20240207-114629.yaml b/.changes/unreleased/Feature-20240207-114629.yaml new file mode 100644 index 000000000..813d14ba7 --- /dev/null +++ b/.changes/unreleased/Feature-20240207-114629.yaml @@ -0,0 +1,5 @@ +kind: Feature +body: 'Export: add filter for courses not linked to a reference address' +time: 2024-02-07T11:46:29.491027007+01:00 +custom: + Issue: "243" diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php new file mode 100644 index 000000000..72197234c --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilter.php @@ -0,0 +1,99 @@ +add('date_calc', PickRollingDateType::class, [ + 'label' => 'export.filter.course.not_having_address_reference.adress_at', + ]); + } + + public function getFormDefaultData(): array + { + return [ + 'date_calc' => new RollingDate(RollingDate::T_TODAY), + ]; + } + + public function describeAction($data, $format = 'string') + { + return [ + 'exports.filter.course.not_having_address_reference.describe', + [ + 'date_calc' => $this->rollingDateConverter->convert($data['date_calc']), + ], + ]; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $k = 'acp_not_associated_ref_filter'; + + $qb + ->leftJoin( + 'acp.locationHistories', + $k, + Join::WITH, + "{$k}.period = acp AND {$k}.startDate <= :{$k}_date_calc AND ({$k}.endDate IS NULL OR {$k}.endDate > :{$k}_date_calc)" + ) + ->leftJoin( + PersonHouseholdAddress::class, + "{$k}_p_address", + Join::WITH, + "{$k}.personLocation = {$k}_p_address.person AND {$k}_p_address.validFrom <= :{$k}_date_calc AND ({$k}_p_address.validTo IS NULL OR {$k}_p_address.validTo > :{$k}_date_calc)" + ) + ->join( + Address::class, + "{$k}_address", + Join::WITH, + "{$k}_address.id = COALESCE(IDENTITY({$k}_p_address.address), IDENTITY({$k}.addressLocation))" + ) + ; + + $qb->andWhere("{$k}_address.addressReference IS NULL"); + $qb->setParameter("{$k}_date_calc", $this->rollingDateConverter->convert($data['date_calc'])); + } + + public function applyOn() + { + return Declarations::ACP_TYPE; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php new file mode 100644 index 000000000..c71088159 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/NotAssociatedWithAReferenceAddressFilterTest.php @@ -0,0 +1,66 @@ + new RollingDate(RollingDate::T_TODAY)], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + + $em = self::$container->get(EntityManagerInterface::class); + + return [ + $em->createQueryBuilder() + ->select('acp.id') + ->from(AccompanyingPeriod::class, 'acp'), + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml index c869a4494..38b5d5041 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml @@ -147,6 +147,10 @@ services: tags: - { name: chill.export_filter, alias: accompanyingcourse_info_within_filter } + Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\NotAssociatedWithAReferenceAddressFilter: + tags: + - { name: chill.export_filter, alias: accompanyingcourse_not_having_addr_reference_filter } + ## Aggregators chill.person.export.aggregator_referrer_scope: class: Chill\PersonBundle\Export\Aggregator\AccompanyingCourseAggregators\ScopeAggregator diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index a8d2080fb..af85b2217 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -140,6 +140,11 @@ exports: by_treating_agent: Filtered by treating agent at date: >- Les agents traitant au { agent_at, date, medium }, seulement {agents} + course: + not_having_address_reference: + describe: >- + Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} + 'total persons matching the search pattern': >- { total, plural, =0 {Aucun usager ne correspond aux termes de recherche} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 2b5ce5c97..0864875fa 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1153,6 +1153,9 @@ export: 'Filtered by participations during period: between %dateafter% and %datebefore%': 'Filtré par personne concerné par un parcours dans la periode entre: %dateafter% et %datebefore%' course: + not_having_address_reference: + title: Filtrer les parcours non localisés à une adresse de réference + adress_at: Adresse à la date du having_info_within_interval: title: Filtrer les parcours ayant reçu une intervention entre deux dates start_date: Début de la période From 15f8432ce06e24d83b0fa5a4822bed8a17e5997b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 29 Nov 2023 11:30:14 +0100 Subject: [PATCH 28/82] Use PostUpdateEventArgs typing instead of PostPersistEventArgs --- .../Notification/Counter/NotificationByUserCounter.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php index 81a8bb3bb..15a33d836 100644 --- a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php +++ b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php @@ -16,7 +16,7 @@ use Chill\MainBundle\Entity\NotificationComment; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Repository\NotificationRepository; use Chill\MainBundle\Templating\UI\NotificationCounterInterface; -use Doctrine\ORM\Event\PostPersistEventArgs; +use Doctrine\ORM\Event\PostUpdateEventArgs; use Doctrine\ORM\Event\PreFlushEventArgs; use Psr\Cache\CacheItemPoolInterface; use Symfony\Component\Security\Core\User\UserInterface; @@ -62,7 +62,7 @@ final readonly class NotificationByUserCounter implements NotificationCounterInt return 'chill_main_notif_unread_by_'.$user->getId(); } - public function onEditNotificationComment(NotificationComment $notificationComment, PostPersistEventArgs $eventArgs): void + public function onEditNotificationComment(NotificationComment $notificationComment, PostUpdateEventArgs $eventArgs): void { $this->resetCacheForNotification($notificationComment->getNotification()); } From d58c0a867d38887f4524623e9b106fbbdc72d5f6 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 29 Nov 2023 11:31:53 +0100 Subject: [PATCH 29/82] add changie --- .changes/unreleased/Fixed-20231129-113138.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixed-20231129-113138.yaml diff --git a/.changes/unreleased/Fixed-20231129-113138.yaml b/.changes/unreleased/Fixed-20231129-113138.yaml new file mode 100644 index 000000000..efe9b10c1 --- /dev/null +++ b/.changes/unreleased/Fixed-20231129-113138.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix error in logs about wrong typing of eventArgs in onEditNotificationComment + method +time: 2023-11-29T11:31:38.933538592+01:00 +custom: + Issue: "220" From 32ae2f8f0df7ea9de3510a75a41024357b66b90c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 13 Dec 2023 10:12:56 +0100 Subject: [PATCH 30/82] Add a separate method for onPersist, use same private resetCache method --- .../Notification/Counter/NotificationByUserCounter.php | 6 ++++++ .../ChillMainBundle/config/services/notification.yaml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php index 15a33d836..e08543e8c 100644 --- a/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php +++ b/src/Bundle/ChillMainBundle/Notification/Counter/NotificationByUserCounter.php @@ -16,6 +16,7 @@ use Chill\MainBundle\Entity\NotificationComment; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Repository\NotificationRepository; use Chill\MainBundle\Templating\UI\NotificationCounterInterface; +use Doctrine\ORM\Event\PostPersistEventArgs; use Doctrine\ORM\Event\PostUpdateEventArgs; use Doctrine\ORM\Event\PreFlushEventArgs; use Psr\Cache\CacheItemPoolInterface; @@ -62,6 +63,11 @@ final readonly class NotificationByUserCounter implements NotificationCounterInt return 'chill_main_notif_unread_by_'.$user->getId(); } + public function onPersistNotificationComment(NotificationComment $notificationComment, PostPersistEventArgs $eventArgs): void + { + $this->resetCacheForNotification($notificationComment->getNotification()); + } + public function onEditNotificationComment(NotificationComment $notificationComment, PostUpdateEventArgs $eventArgs): void { $this->resetCacheForNotification($notificationComment->getNotification()); diff --git a/src/Bundle/ChillMainBundle/config/services/notification.yaml b/src/Bundle/ChillMainBundle/config/services/notification.yaml index 29cbce946..be3252003 100644 --- a/src/Bundle/ChillMainBundle/config/services/notification.yaml +++ b/src/Bundle/ChillMainBundle/config/services/notification.yaml @@ -41,7 +41,7 @@ services: entity: 'Chill\MainBundle\Entity\NotificationComment' # set the 'lazy' option to TRUE to only instantiate listeners when they are used lazy: true - method: 'onEditNotificationComment' + method: 'onPersistNotificationComment' Chill\MainBundle\Notification\Email\NotificationMailer: autowire: true From 4736fca67959aa836f34f7ae4f4abbfd4ae715dd Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 30 Jan 2024 14:02:02 +0100 Subject: [PATCH 31/82] Fix the conditions upon which social actions should be optional or required in relation to social issues within the activity creation form --- src/Bundle/ChillActivityBundle/Entity/ActivityType.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index c14c8292b..2db0f805d 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -291,7 +291,9 @@ class ActivityType public function checkSocialActionsVisibility(ExecutionContextInterface $context, mixed $payload) { if ($this->socialIssuesVisible !== $this->socialActionsVisible) { - if (!(2 === $this->socialIssuesVisible && 1 === $this->socialActionsVisible)) { + // if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required + if (0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible) + || (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)) { $context ->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value') ->atPath('socialActionsVisible') From 574ad42a76f45fd980a93c9d67b448a42ec70c81 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 30 Jan 2024 14:03:37 +0100 Subject: [PATCH 32/82] Add changie for fix in activity entity/form --- .changes/unreleased/Fixed-20240130-140301.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Fixed-20240130-140301.yaml diff --git a/.changes/unreleased/Fixed-20240130-140301.yaml b/.changes/unreleased/Fixed-20240130-140301.yaml new file mode 100644 index 000000000..45fb94f6a --- /dev/null +++ b/.changes/unreleased/Fixed-20240130-140301.yaml @@ -0,0 +1,6 @@ +kind: Fixed +body: Fix the conditions upon which social actions should be optional or required + in relation to social issues within the activity creation form +time: 2024-01-30T14:03:01.942955636+01:00 +custom: + Issue: "256" From 13854e59de837bf2fc5b9c3834ef7b7dc53fde14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 14:22:18 +0100 Subject: [PATCH 33/82] Add grouping parenthesis on condition about social issue and social action visibility This improve readability and avoid errors with boolean operator precedence --- src/Bundle/ChillActivityBundle/Entity/ActivityType.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php index 2db0f805d..96c369b39 100644 --- a/src/Bundle/ChillActivityBundle/Entity/ActivityType.php +++ b/src/Bundle/ChillActivityBundle/Entity/ActivityType.php @@ -292,8 +292,10 @@ class ActivityType { if ($this->socialIssuesVisible !== $this->socialActionsVisible) { // if social issues are invisible then social actions cannot be optional or required + if social issues are optional then social actions shouldn't be required - if (0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible) - || (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible)) { + if ( + (0 === $this->socialIssuesVisible && (1 === $this->socialActionsVisible || 2 === $this->socialActionsVisible)) + || (1 === $this->socialIssuesVisible && 2 === $this->socialActionsVisible) + ) { $context ->buildViolation('The socialActionsVisible value is not compatible with the socialIssuesVisible value') ->atPath('socialActionsVisible') From e2e0b08210fad2f31d0e4debc379451db012e733 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 22 Jan 2024 11:44:32 +0100 Subject: [PATCH 34/82] Add HasTemporaryLocationFilter test and update filter parameters A new test HasTemporaryLocationFilterTest has been added under ChillPersonBundle. This test mainly focuses on checking the filter functionalities related to temporary locations. In addition, the 'having_temporarily' parameter has been added to 'calc_date' field in HasTemporaryLocationFilter class. --- .../HasTemporaryLocationFilter.php | 2 +- .../HasTemporaryLocationFilterTest.php | 67 +++++++++++++++++++ 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php index ca5ccaf27..3313cb23f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php @@ -70,7 +70,7 @@ class HasTemporaryLocationFilter implements FilterInterface }, ]) ->add('calc_date', PickRollingDateType::class, [ - 'label' => 'export.filter.course.having_temporarily.Calculation date', + 'label' => 'export.filter.course.having_temporarily.Calculation date', 'having_temporarily' => true, ]); } diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php new file mode 100644 index 000000000..5c1b8b9c7 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilterTest.php @@ -0,0 +1,67 @@ +rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); + } + + public function getFilter() + { + return new HasTemporaryLocationFilter($this->rollingDateConverter); + } + + public function getFormData() + { + return [ + [ + 'having_temporarily' => true, + 'calc_date' => new RollingDate(RollingDate::T_TODAY), + ], + [ + 'having_temporarily' => false, + 'calc_date' => new RollingDate(RollingDate::T_TODAY), + ], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + + $em = self::$container->get(EntityManagerInterface::class); + + return [ + $em->createQueryBuilder() + ->from('ChillPersonBundle:AccompanyingPeriod', 'acp') + ->select('acp.id'), + ]; + } +} From c707a34f16742b2b913c48ed0fc491faaf4c3644 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Jan 2024 14:20:27 +0100 Subject: [PATCH 35/82] [export] Add referrer on accompanying course filter between dates feature and relevant tests Implemented a new filter to the software for social workers. This filter, ReferrerFilterBetweenDates, enables filtering of query results based on a range of dates and accepted referrers. Tests for this new functionality have also been added to ensure the feature works as expected. --- .../ReferrerFilterBetweenDates.php | 123 ++++++++++++++++++ .../ReferrerFilterBetweenDatesTest.php | 89 +++++++++++++ .../services/exports_accompanying_course.yaml | 7 +- .../translations/messages+intl-icu.fr.yaml | 6 + .../translations/messages.fr.yml | 4 + 5 files changed, 227 insertions(+), 2 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php new file mode 100644 index 000000000..33a9b4cc3 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php @@ -0,0 +1,123 @@ +join('acp.userHistories', self::A) + ->andWhere( + "OVERLAPSI({$history}.startDate, {$history}.endDate),(:{$start}, :{$end}) = TRUE" + ) + ->andWhere( + "{$history}.user IN (:{$users})", + ) + ->setParameter($users, $data['accepted_referrers']) + ->setParameter($start, $this->rollingDateConverter->convert($data['start_date'])) + ->setParameter($end, $this->rollingDateConverter->convert($data['end_date'])); + } + + public function applyOn(): string + { + return Declarations::ACP_TYPE; + } + + public function buildForm(FormBuilderInterface $builder) + { + $builder + ->add('accepted_referrers', PickUserDynamicType::class, [ + 'multiple' => true, + ]) + ->add('start_date', PickRollingDateType::class, [ + 'label' => 'export.filter.course.by_referrer_between_dates.start date', + 'required' => true, + ]) + ->add('end_date', PickRollingDateType::class, [ + 'label' => 'export.filter.course.by_referrer_between_dates.end date', + 'required' => true, + ]); + } + + public function getFormDefaultData(): array + { + return [ + 'start_date' => new RollingDate(RollingDate::T_YEAR_CURRENT_START), + 'end_date' => new RollingDate(RollingDate::T_TODAY), + 'accepted_referrers' => [], + ]; + } + + public function describeAction($data, $format = 'string'): array + { + $users = []; + + foreach ($data['accepted_referrers'] as $r) { + $users[] = $this->userRender->renderString($r, []); + } + + return [ + 'exports.filter.course.by_referrer_between_dates.description', [ + 'agents' => implode(', ', $users), + 'start_date' => $this->rollingDateConverter->convert($data['start_date']), + 'end_date' => $this->rollingDateConverter->convert($data['end_date']), + ], ]; + } + + public function getTitle(): string + { + return 'export.filter.course.by_referrer_between_dates.title'; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php new file mode 100644 index 000000000..9b0eb4d72 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDatesTest.php @@ -0,0 +1,89 @@ +rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); + $this->userRender = self::$container->get(UserRender::class); + } + + public function getFilter() + { + return new ReferrerFilterBetweenDates($this->rollingDateConverter, $this->userRender); + } + + public function getFormData() + { + self:self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); + + $users = $em->createQueryBuilder() + ->from(User::class, 'u') + ->select('u') + ->getQuery() + ->setMaxResults(1) + ->getResult(); + + return [ + [ + 'accepted_referrers' => $users[0], + 'start_date' => new RollingDate(RollingDate::T_YEAR_PREVIOUS_START), + 'end_date' => new RollingDate(RollingDate::T_TODAY), + ], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + + $em = self::$container->get(EntityManagerInterface::class); + + yield $em->createQueryBuilder() + ->from(AccompanyingPeriod::class, 'acp') + ->select('acp.id'); + + $qb = $em->createQueryBuilder(); + $qb + ->from(AccompanyingPeriod\AccompanyingPeriodWork::class, 'acpw') + ->join('acpw.accompanyingPeriod', 'acp') + ->join('acp.participations', 'acppart') + ->join('acppart.person', 'person') + ; + + $qb->select('COUNT(DISTINCT acpw.id) as export_result'); + + yield $qb; + } +} diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml index 38b5d5041..d488df8d6 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_course.yaml @@ -96,11 +96,14 @@ services: tags: - { name: chill.export_filter, alias: accompanyingcourse_activeonedaybetweendates_filter } - chill.person.export.filter_referrer: - class: Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilter + Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilter: tags: - { name: chill.export_filter, alias: accompanyingcourse_referrer_filter } + Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\ReferrerFilterBetweenDates: + tags: + - { name: chill.export_filter, alias: accompanyingcourse_referrer_filter_between_dates } + chill.person.export.filter_openbetweendates: class: Chill\PersonBundle\Export\Filter\AccompanyingCourseFilters\OpenBetweenDatesFilter tags: diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index af85b2217..f94f9d578 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -145,6 +145,12 @@ exports: describe: >- Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} + Les agents traitants au { agent_at, date, medium }, seulement {agents} + + by_referrer_between_dates: + description: >- + Filtré par référent du parcours, entre deux dates: depuis le {start_date, date, medium}, jusqu'au {end_date, date, medium}, seulement {agents} + 'total persons matching the search pattern': >- { total, plural, =0 {Aucun usager ne correspond aux termes de recherche} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ec6036950..e4995d207 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1191,6 +1191,10 @@ export: "Filtered by user main scope: only %scope%": "Filtré par service du référent: uniquement %scope%" by_referrer: Computation date for referrer: Date à laquelle le référent était actif + by_referrer_between_dates: + title: Filtrer les parcours par référent (entre deux dates) + start date: Le référent était actif après le + end date: Le référent était actif avant le having_temporarily: label: Qualité de la localisation Having a temporarily location: Ayant une localisation temporaire From 4a15a89102e89a89ea168493d16523b7e8b7273b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Jan 2024 14:20:27 +0100 Subject: [PATCH 36/82] [export] Add referrer on accompanying course filter between dates feature and relevant tests Implemented a new filter to the software for social workers. This filter, ReferrerFilterBetweenDates, enables filtering of query results based on a range of dates and accepted referrers. Tests for this new functionality have also been added to ensure the feature works as expected. --- .../AccompanyingCourseFilters/ReferrerFilterBetweenDates.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php index 33a9b4cc3..c58aad3bb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilterBetweenDates.php @@ -30,7 +30,7 @@ use Symfony\Component\Form\FormBuilderInterface; * * @see ReferrerFilterBetweenDatesTest for tests */ -class ReferrerFilterBetweenDates implements FilterInterface +final readonly class ReferrerFilterBetweenDates implements FilterInterface { private const A = 'acp_referrer_filter_uhistory'; @@ -40,7 +40,7 @@ class ReferrerFilterBetweenDates implements FilterInterface private const PU = 'acp_referrer_filter_users'; public function __construct( - private readonly RollingDateConverterInterface $rollingDateConverter, + private RollingDateConverterInterface $rollingDateConverter, private UserRender $userRender ) { } From 813f2f1e12e82c4137b891b2e41a82bf94d5c513 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 15:34:33 +0100 Subject: [PATCH 37/82] Fix call within DI for referrer filter test --- .../Filter/AccompanyingCourseFilters/ReferrerFilterTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php index a56741bd3..52173fe8c 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingCourseFilters/ReferrerFilterTest.php @@ -31,7 +31,7 @@ final class ReferrerFilterTest extends AbstractFilterTest { self::bootKernel(); - $this->filter = self::$container->get('chill.person.export.filter_referrer'); + $this->filter = self::$container->get(ReferrerFilter::class); } public function getFilter() From f8840d89bfcf996ee8060fe3443888766ecdec3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 23 Jan 2024 21:56:17 +0100 Subject: [PATCH 38/82] Add capability to store closing motive when closing accompanying period The commit introduces new functionality in the bundle that allows storing the closing motive when a course is closed. This is achieved by modifying the model and database schema to include a new `closingMotive` field in AccompanyingPeriodStepHistory entity. --- .../AccompanyingCourseController.php | 2 +- .../Entity/AccompanyingPeriod.php | 9 ++-- .../AccompanyingPeriodStepHistory.php | 19 +++++++ .../Tests/Entity/AccompanyingPeriodTest.php | 30 +++++++++++ .../migrations/Version20240123161457.php | 52 +++++++++++++++++++ 5 files changed, 108 insertions(+), 4 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20240123161457.php diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php index a2ced7fee..6acca44e3 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseController.php @@ -62,7 +62,7 @@ class AccompanyingCourseController extends \Symfony\Bundle\FrameworkBundle\Contr $workflow = $this->registry->get($accompanyingCourse); if ($workflow->can($accompanyingCourse, 'close')) { - $workflow->apply($accompanyingCourse, 'close'); + $workflow->apply($accompanyingCourse, 'close', ['closing_motive' => $form['closingMotive']->getData()]); $em->flush(); diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php index 9c88a4a69..4f9c480d0 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod.php @@ -1449,7 +1449,7 @@ class AccompanyingPeriod implements return $this; } - public function setStep(string $step): self + public function setStep(string $step, array $context = []): self { $previous = $this->step; @@ -1464,7 +1464,7 @@ class AccompanyingPeriod implements $history = new AccompanyingPeriodStepHistory(); $history->setStep($this->step)->setStartDate(new \DateTimeImmutable('now')); - $this->addStepHistory($history); + $this->addStepHistory($history, $context); } return $this; @@ -1507,11 +1507,14 @@ class AccompanyingPeriod implements return $this; } - private function addStepHistory(AccompanyingPeriodStepHistory $stepHistory): self + private function addStepHistory(AccompanyingPeriodStepHistory $stepHistory, array $context = []): self { if (!$this->stepHistories->contains($stepHistory)) { $this->stepHistories[] = $stepHistory; $stepHistory->setPeriod($this); + if (($context['closing_motive'] ?? null) instanceof ClosingMotive) { + $stepHistory->setClosingMotive($context['closing_motive']); + } $this->ensureStepContinuity(); } diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php index 15b2f0d2e..fd4d573ce 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php @@ -59,6 +59,13 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda */ private string $step; + /** + * @ORM\ManyToOne(targetEntity=ClosingMotive::class) + * + * @ORM\JoinColumn(nullable=true) + */ + private ?AccompanyingPeriod\ClosingMotive $closingMotive = null; + public function getEndDate(): ?\DateTimeImmutable { return $this->endDate; @@ -114,4 +121,16 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda return $this; } + + public function getClosingMotive(): ?AccompanyingPeriod\ClosingMotive + { + return $this->closingMotive; + } + + public function setClosingMotive(?AccompanyingPeriod\ClosingMotive $closingMotive): self + { + $this->closingMotive = $closingMotive; + + return $this; + } } diff --git a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php index 5fdb51c15..9e383b789 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Entity/AccompanyingPeriodTest.php @@ -312,4 +312,34 @@ final class AccompanyingPeriodTest extends \PHPUnit\Framework\TestCase $this->assertNull($period->getRequestorPerson()); $this->assertNull($period->getRequestor()); } + + public function testSetStep(): void + { + $period = new AccompanyingPeriod(); + + $period->setStep(AccompanyingPeriod::STEP_CONFIRMED); + + self::assertEquals(AccompanyingPeriod::STEP_CONFIRMED, $period->getStep()); + self::assertCount(1, $period->getStepHistories()); + + $period->setStep(AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT); + + self::assertEquals(AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT, $period->getStep()); + self::assertCount(2, $period->getStepHistories()); + + $periodInactiveSteps = $period->getStepHistories()->filter(fn (AccompanyingPeriod\AccompanyingPeriodStepHistory $h) => AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_SHORT === $h->getStep()); + self::assertCount(1, $periodInactiveSteps); + + $period->setStep(AccompanyingPeriod::STEP_CLOSED, ['closing_motive' => $closingMotive = new AccompanyingPeriod\ClosingMotive()]); + + self::assertEquals(AccompanyingPeriod::STEP_CLOSED, $period->getStep()); + self::assertCount(3, $period->getStepHistories()); + + $periodClosedSteps = $period->getStepHistories()->filter(fn (AccompanyingPeriod\AccompanyingPeriodStepHistory $h) => AccompanyingPeriod::STEP_CLOSED === $h->getStep()); + self::assertCount(1, $periodClosedSteps); + + $periodClosedStep = $periodClosedSteps->first(); + + self::assertSame($closingMotive, $periodClosedStep->getClosingMotive()); + } } diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20240123161457.php b/src/Bundle/ChillPersonBundle/migrations/Version20240123161457.php new file mode 100644 index 000000000..4c19e6c8f --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20240123161457.php @@ -0,0 +1,52 @@ +addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD closingMotive_id INT DEFAULT NULL'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD CONSTRAINT FK_84D514AC504CB38D FOREIGN KEY (closingMotive_id) REFERENCES chill_person_accompanying_period_closingmotive (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_step_history ADD CONSTRAINT FK_84D514AC65FF1AEC FOREIGN KEY (updatedBy_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); + $this->addSql(<<<'EOF' + WITH last_step AS ( + SELECT * FROM ( + SELECT *, rank() OVER (partition by period_id ORDER BY startdate DESC, id DESC) AS r FROM chill_person_accompanying_period_step_history cpapsh + ) as sq + WHERE r = 1 + ) + UPDATE chill_person_accompanying_period_step_history + SET closingMotive_id = chill_person_accompanying_period.closingmotive_id + FROM last_step, chill_person_accompanying_period + WHERE last_step.period_id = chill_person_accompanying_period_step_history.period_id AND chill_person_accompanying_period.id = chill_person_accompanying_period_step_history.period_id + AND last_step.step = 'CLOSED'; + EOF); + $this->addSql('CREATE INDEX IDX_84D514AC504CB38D ON chill_person_accompanying_period_step_history (closingMotive_id)'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period_step_history DROP CONSTRAINT FK_84D514AC504CB38D'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_step_history DROP CONSTRAINT FK_84D514AC65FF1AEC'); + $this->addSql('DROP INDEX IDX_84D514AC504CB38D'); + $this->addSql('ALTER TABLE chill_person_accompanying_period_step_history DROP closingMotive_id'); + } +} From b6ea857389c14cb4d601cf3aba3e3d005911baab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 09:55:02 +0100 Subject: [PATCH 39/82] Add AccompanyingCourseStepHistory counting capabilities The newly created CountAccompanyingCourseStepHistory class counts changes in AccompanyingPeriod status. Corresponding test file ensures the correct functionality. Supporting translations and necessary export declarations have been added to facilitate this change. --- exports_alias_conventions.md | 140 +++++++++--------- .../ChillPersonBundle/Export/Declarations.php | 2 + .../CountAccompanyingCourseStepHistory.php | 139 +++++++++++++++++ ...CountAccompanyingCourseStepHistoryTest.php | 48 ++++++ .../translations/messages.fr.yml | 3 + 5 files changed, 263 insertions(+), 69 deletions(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseStepHistoryTest.php diff --git a/exports_alias_conventions.md b/exports_alias_conventions.md index eb0545702..d4d034314 100644 --- a/exports_alias_conventions.md +++ b/exports_alias_conventions.md @@ -5,72 +5,74 @@ Add condition with distinct alias on each export join clauses (Indicators + Filt These are alias conventions : -| Entity | Join | Attribute | Alias | -|:----------------------------------------|:----------------------------------------|:-------------------------------------------|:---------------------------------------| -| AccompanyingPeriod::class | | | acp | -| | AccompanyingPeriodWork::class | acp.works | acpw | -| | AccompanyingPeriodParticipation::class | acp.participations | acppart | -| | Location::class | acp.administrativeLocation | acploc | -| | ClosingMotive::class | acp.closingMotive | acpmotive | -| | UserJob::class | acp.job | acpjob | -| | Origin::class | acp.origin | acporigin | -| | Scope::class | acp.scopes | acpscope | -| | SocialIssue::class | acp.socialIssues | acpsocialissue | -| | User::class | acp.user | acpuser | -| | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories | -| | AccompanyingPeriodInfo::class | not existing (using custom WITH clause) | acpinfo | -| AccompanyingPeriodWork::class | | | acpw | -| | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval | -| | SocialAction::class | acpw.socialAction | acpwsocialaction | -| | Goal::class | acpw.goals | goal | -| | Result::class | acpw.results | result | -| AccompanyingPeriodParticipation::class | | | acppart | -| | Person::class | acppart.person | partperson | -| AccompanyingPeriodWorkEvaluation::class | | | workeval | -| | Evaluation::class | workeval.evaluation | eval | -| AccompanyingPeriodInfo::class | | | acpinfo | -| | User::class | acpinfo.user | acpinfo_user | -| Goal::class | | | goal | -| | Result::class | goal.results | goalresult | -| Person::class | | | person | -| | Center::class | person.center | center | -| | HouseholdMember::class | partperson.householdParticipations | householdmember | -| | MaritalStatus::class | person.maritalStatus | personmarital | -| | VendeePerson::class | | vp | -| | VendeePersonMineur::class | | vpm | -| | CurrentPersonAddress::class | person.currentPersonAddress | currentPersonAddress (on a given date) | -| ResidentialAddress::class | | | resaddr | -| | ThirdParty::class | resaddr.hostThirdParty | tparty | -| ThirdParty::class | | | tparty | -| | ThirdPartyCategory::class | tparty.categories | tpartycat | -| HouseholdMember::class | | | householdmember | -| | Household::class | householdmember.household | household | -| | Person::class | householdmember.person | memberperson | -| | | memberperson.center | membercenter | -| Household::class | | | household | -| | HouseholdComposition::class | household.compositions | composition | -| Activity::class | | | activity | -| | Person::class | activity.person | actperson | -| | AccompanyingPeriod::class | activity.accompanyingPeriod | acp | -| | Person::class | activity\_person\_having\_activity.person | person\_person\_having\_activity | -| | ActivityReason::class | activity\_person\_having\_activity.reasons | reasons\_person\_having\_activity | -| | ActivityType::class | activity.activityType | acttype | -| | Location::class | activity.location | actloc | -| | SocialAction::class | activity.socialActions | actsocialaction | -| | SocialIssue::class | activity.socialIssues | actsocialssue | -| | ThirdParty::class | activity.thirdParties | acttparty | -| | User::class | activity.user | actuser | -| | User::class | activity.users | actusers | -| | ActivityReason::class | activity.reasons | actreasons | -| | Center::class | actperson.center | actcenter | -| | Person::class | activity.createdBy | actcreator | -| ActivityReason::class | | | actreasons | -| | ActivityReasonCategory::class | actreason.category | actreasoncat | -| Calendar::class | | | cal | -| | CancelReason::class | cal.cancelReason | calcancel | -| | Location::class | cal.location | calloc | -| | User::class | cal.user | caluser | -| VendeePerson::class | | | vp | -| | SituationProfessionelle::class | vp.situationProfessionelle | vpprof | -| | StatutLogement::class | vp.statutLogement | vplog | -| | TempsDeTravail::class | vp.tempsDeTravail | vptt | +| Entity | Join | Attribute | Alias | +|:----------------------------------------|:----------------------------------------|:-------------------------------------------|:-------------------------------------------| +| AccompanyingPeriodStepHistory::class | | | acpstephistory (contexte ACP_STEP_HISTORY) | +| | AccompanyingPeriod::class | acpstephistory.period | acp | +| AccompanyingPeriod::class | | | acp | +| | AccompanyingPeriodWork::class | acp.works | acpw | +| | AccompanyingPeriodParticipation::class | acp.participations | acppart | +| | Location::class | acp.administrativeLocation | acploc | +| | ClosingMotive::class | acp.closingMotive | acpmotive | +| | UserJob::class | acp.job | acpjob | +| | Origin::class | acp.origin | acporigin | +| | Scope::class | acp.scopes | acpscope | +| | SocialIssue::class | acp.socialIssues | acpsocialissue | +| | User::class | acp.user | acpuser | +| | AccompanyingPeriopStepHistory::class | acp.stepHistories | acpstephistories | +| | AccompanyingPeriodInfo::class | not existing (using custom WITH clause) | acpinfo | +| AccompanyingPeriodWork::class | | | acpw | +| | AccompanyingPeriodWorkEvaluation::class | acpw.accompanyingPeriodWorkEvaluations | workeval | +| | SocialAction::class | acpw.socialAction | acpwsocialaction | +| | Goal::class | acpw.goals | goal | +| | Result::class | acpw.results | result | +| AccompanyingPeriodParticipation::class | | | acppart | +| | Person::class | acppart.person | partperson | +| AccompanyingPeriodWorkEvaluation::class | | | workeval | +| | Evaluation::class | workeval.evaluation | eval | +| AccompanyingPeriodInfo::class | | | acpinfo | +| | User::class | acpinfo.user | acpinfo_user | +| Goal::class | | | goal | +| | Result::class | goal.results | goalresult | +| Person::class | | | person | +| | Center::class | person.center | center | +| | HouseholdMember::class | partperson.householdParticipations | householdmember | +| | MaritalStatus::class | person.maritalStatus | personmarital | +| | VendeePerson::class | | vp | +| | VendeePersonMineur::class | | vpm | +| | CurrentPersonAddress::class | person.currentPersonAddress | currentPersonAddress (on a given date) | +| ResidentialAddress::class | | | resaddr | +| | ThirdParty::class | resaddr.hostThirdParty | tparty | +| ThirdParty::class | | | tparty | +| | ThirdPartyCategory::class | tparty.categories | tpartycat | +| HouseholdMember::class | | | householdmember | +| | Household::class | householdmember.household | household | +| | Person::class | householdmember.person | memberperson | +| | | memberperson.center | membercenter | +| Household::class | | | household | +| | HouseholdComposition::class | household.compositions | composition | +| Activity::class | | | activity | +| | Person::class | activity.person | actperson | +| | AccompanyingPeriod::class | activity.accompanyingPeriod | acp | +| | Person::class | activity\_person\_having\_activity.person | person\_person\_having\_activity | +| | ActivityReason::class | activity\_person\_having\_activity.reasons | reasons\_person\_having\_activity | +| | ActivityType::class | activity.activityType | acttype | +| | Location::class | activity.location | actloc | +| | SocialAction::class | activity.socialActions | actsocialaction | +| | SocialIssue::class | activity.socialIssues | actsocialssue | +| | ThirdParty::class | activity.thirdParties | acttparty | +| | User::class | activity.user | actuser | +| | User::class | activity.users | actusers | +| | ActivityReason::class | activity.reasons | actreasons | +| | Center::class | actperson.center | actcenter | +| | Person::class | activity.createdBy | actcreator | +| ActivityReason::class | | | actreasons | +| | ActivityReasonCategory::class | actreason.category | actreasoncat | +| Calendar::class | | | cal | +| | CancelReason::class | cal.cancelReason | calcancel | +| | Location::class | cal.location | calloc | +| | User::class | cal.user | caluser | +| VendeePerson::class | | | vp | +| | SituationProfessionelle::class | vp.situationProfessionelle | vpprof | +| | StatutLogement::class | vp.statutLogement | vplog | +| | TempsDeTravail::class | vp.tempsDeTravail | vptt | diff --git a/src/Bundle/ChillPersonBundle/Export/Declarations.php b/src/Bundle/ChillPersonBundle/Export/Declarations.php index 4186861cb..83673234c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Declarations.php +++ b/src/Bundle/ChillPersonBundle/Export/Declarations.php @@ -18,6 +18,8 @@ abstract class Declarations { final public const ACP_TYPE = 'accompanying_period'; + final public const ACP_STEP_HISTORY = 'accompanying_period_step_history'; + final public const EVAL_TYPE = 'evaluation'; final public const HOUSEHOLD_TYPE = 'household'; diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php new file mode 100644 index 000000000..4f620fa34 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourseStepHistory.php @@ -0,0 +1,139 @@ +repository = $em->getRepository(AccompanyingPeriod::class); + $this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center']; + } + + public function buildForm(FormBuilderInterface $builder): void + { + // Nothing to add here + } + + public function getFormDefaultData(): array + { + return []; + } + + public function getAllowedFormattersTypes(): array + { + return [FormatterInterface::TYPE_TABULAR]; + } + + public function getDescription(): string + { + return 'export.export.acp_closing.description'; + } + + public function getGroup(): string + { + return 'Exports of accompanying courses'; + } + + public function getLabels($key, array $values, $data) + { + if ('export_result' !== $key) { + throw new \LogicException("the key {$key} is not used by this export"); + } + + return fn ($value) => '_header' === $value ? $this->getTitle() : $value; + } + + public function getQueryKeys($data): array + { + return ['export_result']; + } + + public function getResult($query, $data) + { + return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); + } + + public function getTitle(): string + { + return 'export.export.acp_closing.title'; + } + + public function getType(): string + { + return Declarations::ACP_TYPE; + } + + public function initiateQuery(array $requiredModifiers, array $acl, array $data = []): QueryBuilder + { + $centers = array_map(static fn ($el) => $el['center'], $acl); + + $qb = $this->em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriod\AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + $qb + ->leftJoin('acp.participations', 'acppart') + ->leftJoin('acppart.person', 'person'); + + if ($this->filterStatsByCenters) { + $qb + ->andWhere( + $qb->expr()->exists( + 'SELECT 1 FROM '.PersonCenterHistory::class.' acl_count_person_history WHERE acl_count_person_history.person = person + AND acl_count_person_history.center IN (:authorized_centers) + ' + ) + ) + ->setParameter('authorized_centers', $centers); + } + + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + + return $qb; + } + + public function requiredRole(): string + { + return AccompanyingPeriodVoter::STATS; + } + + public function supportsModifiers(): array + { + return [ + Declarations::ACP_TYPE, + Declarations::PERSON_TYPE, + Declarations::ACP_STEP_HISTORY, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseStepHistoryTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseStepHistoryTest.php new file mode 100644 index 000000000..19adee99f --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Export/CountAccompanyingCourseStepHistoryTest.php @@ -0,0 +1,48 @@ +get(EntityManagerInterface::class); + + yield new CountAccompanyingCourseStepHistory($em, $this->getParameters(true)); + yield new CountAccompanyingCourseStepHistory($em, $this->getParameters(false)); + } + + public function getFormData(): array + { + return [[]]; + } + + public function getModifiersCombination() + { + return [[Declarations::ACP_TYPE], [Declarations::ACP_TYPE, Declarations::ACP_STEP_HISTORY]]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ec6036950..ce7f06ab1 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -985,6 +985,9 @@ export: YYYY-MM: par mois YYYY: par année export: + acp_closing: + title: Nombre de changements de statuts de parcours + description: Compte le nombre de changements de statuts de parcours. Cet export est indiqué pour obtenir le nombre de parcours ouverts ou fermés pendant une période de temps (un parcours pouvant être clôturé, puis ré-ouvert pendant la période de temps indiquée) acp_stats: avg_duration: Moyenne de la durée de participation de chaque usager concerné count_participations: Nombre de participations distinctes From 44ccfe92b61229804bd4268087aa180e8923dbb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 11:13:38 +0100 Subject: [PATCH 40/82] Add ByDateFilter and its test for AccompanyingPeriodStepHistoryFilters A new filter called ByDateFilter has been added under AccompanyingPeriodStepHistoryFilters. This filter allows users to filter data based on a date range on the start date. Corresponding unit tests for ByDateFilter are included in this commit. Both English and French translations for the new filter are also added. --- .../ByDateFilter.php | 96 +++++++++++++++++++ .../ByDateFilterTest.php | 67 +++++++++++++ .../translations/messages+intl-icu.fr.yaml | 7 +- .../translations/messages.fr.yml | 7 ++ 4 files changed, 176 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php new file mode 100644 index 000000000..8026f4573 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilter.php @@ -0,0 +1,96 @@ +add('start_date', PickRollingDateType::class, [ + 'label' => 'export.filter.step_history.by_date.start_date_label', + ]) + ->add('end_date', PickRollingDateType::class, [ + 'label' => 'export.filter.step_history.by_date.end_date_label', + ]); + } + + public function getFormDefaultData(): array + { + return [ + 'start_date' => new RollingDate(RollingDate::T_YEAR_CURRENT_START), + 'end_date' => new RollingDate(RollingDate::T_TODAY), + ]; + } + + public function describeAction($data, $format = 'string') + { + return [ + 'exports.filter.step_history.by_date.description', + [ + 'start_date' => $this->rollingDateConverter->convert($data['start_date']), + 'end_date' => $this->rollingDateConverter->convert($data['end_date']), + ], + ]; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $startDate = 'acp_step_history_by_date_start_filter'; + $endDate = 'acp_step_history_by_date_end_filter'; + + $qb + ->andWhere( + "acpstephistory.startDate >= :{$startDate} AND (acpstephistory.endDate < :{$endDate} OR acpstephistory.endDate IS NULL)" + ) + ->setParameter($startDate, $this->rollingDateConverter->convert($data['start_date'])) + ->setParameter($endDate, $this->rollingDateConverter->convert($data['end_date'])); + } + + public function applyOn() + { + return Declarations::ACP_STEP_HISTORY; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php new file mode 100644 index 000000000..978bf9488 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByDateFilterTest.php @@ -0,0 +1,67 @@ +rollingDateConverter = self::$container->get(RollingDateConverterInterface::class); + } + + public function getFilter() + { + return new ByDateFilter($this->rollingDateConverter); + } + + public function getFormData() + { + return [ + [ + 'start_date' => new RollingDate(RollingDate::T_YEAR_CURRENT_START), + 'end_date' => new RollingDate(RollingDate::T_TODAY), + ], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); + + $qb = $em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + return [ + $qb, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index af85b2217..52acb0d80 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -140,7 +140,12 @@ exports: by_treating_agent: Filtered by treating agent at date: >- Les agents traitant au { agent_at, date, medium }, seulement {agents} - course: + + step_history: + by_date: + description: >- + Changements de statuts filtrés par date: après le { start_date, date, medium } (inclus), avant le { end_date, date, medium } + not_having_address_reference: describe: >- Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index ce7f06ab1..206664b63 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1131,6 +1131,13 @@ export: by_geog_unit: Filtered by person's geographical unit (based on address) computed at %datecalc%, only %units%: Filtré par unité géographique (sur base de l'adresse), calculé le %datecalc%, seulement %units% + step_history: + by_closing_motive + by_date: + title: Filtrer les changements de statut du parcours par date + start_date_label: Changements après le + end_date_label: Changements avant le + person: by_composition: Filter by household composition: Filtrer les usagers par composition du ménage From 97d401b7f67289ec4dc2eefcffc577c6e60a8777 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 11:37:59 +0100 Subject: [PATCH 41/82] Implement ByStepFilter for AccompanyingPeriodStepHistoryFilters and its tests A new feature has been added, the ByStepFilter, to the Chill project. The ByStepFilter provides a way to filter data in AccompanyingPeriodStepHistoryFilters based on certain steps. In addition, a new test suite has been introduced to ensure the correct functionality of this filter. The necessary translations for completing this feature have also been included. --- .../ByStepFilter.php | 87 +++++++++++++++++++ .../ByStepFilterTest.php | 66 ++++++++++++++ .../translations/messages.fr.yml | 7 +- 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php new file mode 100644 index 000000000..337b27e8a --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilter.php @@ -0,0 +1,87 @@ +add('steps', ChoiceType::class, [ + 'choices' => array_combine( + array_map(static fn (string $step): string => 'accompanying_period.'.$step, $steps), + $steps + ), + 'label' => 'export.filter.step_history.by_step.pick_steps', + 'multiple' => true, + 'expanded' => true, + ]); + } + + public function getFormDefaultData(): array + { + return [ + 'steps' => [], + ]; + } + + public function describeAction($data, $format = 'string') + { + return [ + 'export.filter.step_history.by_step.description', + [ + '%steps%' => implode(', ', array_map(fn (string $step) => $this->translator->trans('accompanying_period.'.$step), $data['steps'])), + ], + ]; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb + ->andWhere('acpstephistory.step IN (:acpstephistory_by_step_filter_steps)') + ->setParameter('acpstephistory_by_step_filter_steps', $data['steps']); + } + + public function applyOn() + { + return Declarations::ACP_STEP_HISTORY; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php new file mode 100644 index 000000000..a603bd219 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php @@ -0,0 +1,66 @@ + [AccompanyingPeriod::STEP_CONFIRMED, AccompanyingPeriod::STEP_CONFIRMED_INACTIVE_LONG], + ], + [ + 'steps' => [AccompanyingPeriod::STEP_CLOSED], + ], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); + + $qb = $em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + return [ + $qb, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 206664b63..e865cab76 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -786,6 +786,8 @@ accompanying_period: DRAFT: Brouillon CONFIRMED: Confirmé CLOSED: Clotûré + CONFIRMED_INACTIVE_SHORT: Hors file active + CONFIRMED_INACTIVE_LONG: Pré-archivé emergency: Urgent occasional: ponctuel regular: régulier @@ -1132,7 +1134,10 @@ export: Filtered by person's geographical unit (based on address) computed at %datecalc%, only %units%: Filtré par unité géographique (sur base de l'adresse), calculé le %datecalc%, seulement %units% step_history: - by_closing_motive + by_step: + title: Filtrer les changements de statut du parcours par étape + pick_steps: Nouvelles étapes + description: "Filtré par étape: seulement %steps%" by_date: title: Filtrer les changements de statut du parcours par date start_date_label: Changements après le From 01785ed49416dad42597c9c46589794528dd7d7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 12:13:23 +0100 Subject: [PATCH 42/82] Add ByStepAggregator to AccompanyingPeriodStepHistoryAggregators Added a new ByStepAggregator to the AccompanyingPeriodStepHistoryAggregators, allowing to group status changes in the course by step. The corresponding test suite ensures the correct operation of this new class. Updates in the translations file have also been made as part of this addition. --- .../ByStepAggregator.php | 86 +++++++++++++++++++ .../ByStepAggregatorTest.php | 58 +++++++++++++ .../translations/messages.fr.yml | 5 ++ 3 files changed, 149 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php new file mode 100644 index 000000000..005d012f9 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php @@ -0,0 +1,86 @@ +translator->trans('accompanying_period.'.$step); + }; + } + + public function getQueryKeys($data) + { + return [ + self::KEY, + ]; + } + + public function getTitle() + { + return 'export.aggregator.step_history.by_step.title'; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb + ->addSelect('acpstephistory.step AS '.self::KEY) + ->addGroupBy(self::KEY); + } + + public function applyOn() + { + return Declarations::ACP_STEP_HISTORY; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php new file mode 100644 index 000000000..f71b06351 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php @@ -0,0 +1,58 @@ +get(EntityManagerInterface::class); + + $qb = $em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + return [ + $qb, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index e865cab76..8614a00db 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1042,6 +1042,11 @@ export: at_date: Date de calcul de l'adresse header: Code postal + step_history: + by_step: + title: Grouper les changements de statut du parcours par étape + header: Nouveau statut du parcours + course: by-user: title: Grouper les parcours par usager participant From bf97b2a50cff31abd657102a19e4f4b66e9d0472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 12:31:57 +0100 Subject: [PATCH 43/82] Add ByDateAggregator to AccompanyingPeriodStepHistoryAggregators Implemented a new ByDateAggregator in the AccompanyingPeriodStepHistoryAggregators for grouping status changes by date. A corresponding test suite has been included to verify its function. Necessary translations have also been updated. --- .../ByDateAggregator.php | 90 +++++++++++++++++++ .../ByDateAggregatorTest.php | 61 +++++++++++++ .../translations/messages.fr.yml | 5 +- 3 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php new file mode 100644 index 000000000..fbd80c7a5 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php @@ -0,0 +1,90 @@ +add('frequency', ChoiceType::class, [ + 'choices' => array_combine( + array_map(fn (DateGroupingChoiceEnum $c) => 'export.enum.frequency.'.$c->value, DateGroupingChoiceEnum::cases()), + array_map(fn (DateGroupingChoiceEnum $c) => $c->value, DateGroupingChoiceEnum::cases()), + ), + 'label' => 'export.aggregator.course.by_opening_date.frequency', + 'multiple' => false, + 'expanded' => true, + ]); + } + + public function getFormDefaultData(): array + { + return ['frequency' => DateGroupingChoiceEnum::YEAR->value]; + } + + public function getLabels($key, array $values, mixed $data) + { + return function (?string $value): string { + if ('_header' === $value) { + return 'export.aggregator.step_history.by_date.header'; + } + + if (null === $value || '' === $value) { + return ''; + } + + return $value; + }; + } + + public function getQueryKeys($data) + { + return [self::KEY]; + } + + public function getTitle() + { + return 'export.aggregator.step_history.by_date.title'; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $p = self::KEY; + + $qb->addSelect(sprintf("TO_CHAR(acpstephistory.startDate, '%s') AS {$p}", $data['frequency'])); + $qb->addGroupBy($p); + $qb->addOrderBy($p, 'DESC'); + } + + public function applyOn() + { + return Declarations::ACP_STEP_HISTORY; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php new file mode 100644 index 000000000..74a30d1a6 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregatorTest.php @@ -0,0 +1,61 @@ + DateGroupingChoiceEnum::YEAR->value, + ], + [ + 'frequency' => DateGroupingChoiceEnum::WEEK->value, + ], + [ + 'frequency' => DateGroupingChoiceEnum::MONTH->value, + ], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); + + $qb = $em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + return [ + $qb, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 8614a00db..e751dd538 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1046,7 +1046,10 @@ export: by_step: title: Grouper les changements de statut du parcours par étape header: Nouveau statut du parcours - + by_date: + title: Grouper les changement de statut du parcours par date + header: Date du changement de statut du parcours + date_grouping_label: Grouper par course: by-user: title: Grouper les parcours par usager participant From 568ee079b54f94edee44abe6c4ab22feaae108fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 12:54:44 +0100 Subject: [PATCH 44/82] Add ByClosingMotiveAggregator on AccompanyingPeriodStepHistory exports and corresponding tests Added a new class ByClosingMotiveAggregator to the AccompanyingPeriodStepHistoryAggregators for grouping status changes by closing motive. This also includes a corresponding test class. Additionally, updated relevant translations in the messages.fr.yml file. --- .../ByClosingMotiveAggregator.php | 84 +++++++++++++++++++ .../ByClosingMotiveAggregatorTest.php | 68 +++++++++++++++ .../translations/messages.fr.yml | 6 +- 3 files changed, 157 insertions(+), 1 deletion(-) create mode 100644 src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php create mode 100644 src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php new file mode 100644 index 000000000..f999a44db --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php @@ -0,0 +1,84 @@ +closingMotiveRepository->find((int) $value)) { + return ''; + } + + return $this->closingMotiveRender->renderString($closingMotive, []); + }; + } + + public function getQueryKeys($data) + { + return [ + self::KEY, + ]; + } + + public function getTitle() + { + return 'export.aggregator.step_history.by_closing_motive.title'; + } + + public function addRole(): ?string + { + return null; + } + + public function alterQuery(QueryBuilder $qb, $data) + { + $qb + ->addSelect('IDENTITY(acpstephistory.closingMotive) AS '.self::KEY) + ->addGroupBy(self::KEY); + } + + public function applyOn() + { + return Declarations::ACP_STEP_HISTORY; + } +} diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php new file mode 100644 index 000000000..2ce63af34 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregatorTest.php @@ -0,0 +1,68 @@ +closingMotiveRender = self::$container->get(ClosingMotiveRender::class); + $this->closingMotiveRepository = self::$container->get(ClosingMotiveRepositoryInterface::class); + } + + public function getAggregator() + { + return new ByClosingMotiveAggregator( + $this->closingMotiveRepository, + $this->closingMotiveRender + ); + } + + public function getFormData() + { + return [ + [], + ]; + } + + public function getQueryBuilders() + { + self::bootKernel(); + $em = self::$container->get(EntityManagerInterface::class); + + $qb = $em->createQueryBuilder() + ->select('COUNT(DISTINCT acpstephistory.id) As export_result') + ->from(AccompanyingPeriodStepHistory::class, 'acpstephistory') + ->join('acpstephistory.period', 'acp'); + + return [ + $qb, + ]; + } +} diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index e751dd538..4b3094add 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -1047,9 +1047,13 @@ export: title: Grouper les changements de statut du parcours par étape header: Nouveau statut du parcours by_date: - title: Grouper les changement de statut du parcours par date + title: Grouper les changements de statut du parcours par date header: Date du changement de statut du parcours date_grouping_label: Grouper par + by_closing_motive: + title: Grouper les changements de statut du parcours par motif de clôture + header: Motif de clôture + course: by-user: title: Grouper les parcours par usager participant From 5849d8d670b78ea51f645d656649d4c829792846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 13:29:42 +0100 Subject: [PATCH 45/82] fix typo --- src/Bundle/ChillPersonBundle/translations/messages.fr.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml index 4b3094add..ec6dae622 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillPersonBundle/translations/messages.fr.yml @@ -785,7 +785,7 @@ accompanying_period: dates_from_%opening_date%_to_%closing_date%: Ouvert du %opening_date% au %closing_date% DRAFT: Brouillon CONFIRMED: Confirmé - CLOSED: Clotûré + CLOSED: Clôturé CONFIRMED_INACTIVE_SHORT: Hors file active CONFIRMED_INACTIVE_LONG: Pré-archivé emergency: Urgent From 21bd6478adb3b60f07ec5d37f239fdf62bfb0ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 13:30:37 +0100 Subject: [PATCH 46/82] Add DI configuration for the export of period step history data within the ChillPersonBundle This commit adds dependency injection configuration for the export of period step history data within the ChillPersonBundle. It specifically configures exports, filters, and aggregators, all related to the accompanying period step history. Additionally, it updates ChillPersonExtension to load this newly created configuration. --- .../ChillPersonExtension.php | 1 + ...orts_accompanying_period_step_history.yaml | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period_step_history.yaml diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index 3d5c0bc64..ebbfedeb3 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -98,6 +98,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac $loader->load('services/exports_accompanying_course.yaml'); $loader->load('services/exports_social_actions.yaml'); $loader->load('services/exports_evaluation.yaml'); + $loader->load('services/exports_accompanying_period_step_history.yaml'); } $loader->load('services/exports_household.yaml'); diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period_step_history.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period_step_history.yaml new file mode 100644 index 000000000..09da707c9 --- /dev/null +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period_step_history.yaml @@ -0,0 +1,31 @@ +services: + _defaults: + autowire: true + autoconfigure: true + + # exports + Chill\PersonBundle\Export\Export\CountAccompanyingCourseStepHistory: + tags: + - { name: chill.export, alias: count_acpstephistory } + + # filters + Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters\ByDateFilter: + tags: + - { name: chill.export_filter, alias: acpstephistory_filter_by_date } + + Chill\PersonBundle\Export\Filter\AccompanyingPeriodStepHistoryFilters\ByStepFilter: + tags: + - { name: chill.export_filter, alias: acpstephistory_filter_by_step } + + # aggregators + Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByClosingMotiveAggregator: + tags: + - { name: chill.export_aggregator, alias: acpstephistory_agg_by_closing_motive } + + Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByDateAggregator: + tags: + - { name: chill.export_aggregator, alias: acpstephistory_agg_by_date } + + Chill\PersonBundle\Export\Aggregator\AccompanyingPeriodStepHistoryAggregators\ByStepAggregator: + tags: + - { name: chill.export_aggregator, alias: acpstephistory_agg_by_step } From 86613a9be93b2238bf874cb0431cc8242f434248 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 29 Jan 2024 13:34:07 +0100 Subject: [PATCH 47/82] Add changie for the whole feature --- .changes/unreleased/Feature-20240129-133319.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/unreleased/Feature-20240129-133319.yaml diff --git a/.changes/unreleased/Feature-20240129-133319.yaml b/.changes/unreleased/Feature-20240129-133319.yaml new file mode 100644 index 000000000..ff2b96ebf --- /dev/null +++ b/.changes/unreleased/Feature-20240129-133319.yaml @@ -0,0 +1,5 @@ +kind: Feature +body: 'Add capability to generate export about change of steps of accompanying period, and generate exports for this' +time: 2024-01-29T13:33:19.190365565+01:00 +custom: + Issue: "244" From 4bbad4fc61af62643f011e2df0807e62375dcb36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 15:38:56 +0100 Subject: [PATCH 48/82] fix cs with php-cs-fixer 3.49 --- .../AccompanyingPeriod/AccompanyingPeriodStepHistory.php | 6 +++--- .../ByClosingMotiveAggregator.php | 2 +- .../ByStepAggregatorTest.php | 2 +- .../ByStepFilterTest.php | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php index fd4d573ce..c25c11e69 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodStepHistory.php @@ -64,7 +64,7 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda * * @ORM\JoinColumn(nullable=true) */ - private ?AccompanyingPeriod\ClosingMotive $closingMotive = null; + private ?ClosingMotive $closingMotive = null; public function getEndDate(): ?\DateTimeImmutable { @@ -122,12 +122,12 @@ class AccompanyingPeriodStepHistory implements TrackCreationInterface, TrackUpda return $this; } - public function getClosingMotive(): ?AccompanyingPeriod\ClosingMotive + public function getClosingMotive(): ?ClosingMotive { return $this->closingMotive; } - public function setClosingMotive(?AccompanyingPeriod\ClosingMotive $closingMotive): self + public function setClosingMotive(?ClosingMotive $closingMotive): self { $this->closingMotive = $closingMotive; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php index f999a44db..b5776ebeb 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php @@ -40,7 +40,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface public function getLabels($key, array $values, mixed $data) { - return function (null|int|string $value): string { + return function (int|string|null $value): string { if ('_header' === $value) { return 'export.aggregator.step_history.by_closing_motive.header'; } diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php index f71b06351..65752fea2 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregatorTest.php @@ -27,7 +27,7 @@ class ByStepAggregatorTest extends AbstractAggregatorTest public function getAggregator() { $translator = new class () implements TranslatorInterface { - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { return $id; } diff --git a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php index a603bd219..2924be7e7 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Export/Filter/AccompanyingPeriodStepHistoryFilters/ByStepFilterTest.php @@ -28,7 +28,7 @@ class ByStepFilterTest extends AbstractFilterTest public function getFilter() { $translator = new class () implements TranslatorInterface { - public function trans(string $id, array $parameters = [], string $domain = null, string $locale = null) + public function trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) { return $id; } From f5f6eb78a2a8608109386cc1cd486758aac098f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 16:00:55 +0100 Subject: [PATCH 49/82] fix incorrect merge of messages+intl-icu.fr.yaml --- .../translations/messages+intl-icu.fr.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index 52acb0d80..28d3d1274 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -136,6 +136,10 @@ exports: Filtered by person\'s geographical unit (based on address) computed at date, only units: "Filtré par zone géographique sur base de l'adresse, calculé à {datecalc, date, short}, seulement les zones suivantes: {units}" filter: + course: + not_having_address_reference: + describe: >- + Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} work: by_treating_agent: Filtered by treating agent at date: >- @@ -146,9 +150,6 @@ exports: description: >- Changements de statuts filtrés par date: après le { start_date, date, medium } (inclus), avant le { end_date, date, medium } - not_having_address_reference: - describe: >- - Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} 'total persons matching the search pattern': >- { total, plural, From c05451bfe924ff08cbc21fe39f4ed5d814db32e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 16:38:41 +0100 Subject: [PATCH 50/82] Update 'calc_date' field option in HasTemporaryLocationFilter.php This commit makes the 'calc_date' field in HasTemporaryLocationFilter.php required. This field was previously optional; this change ensures that a calculation date is always provided when filtering accompanying courses by temporary location. --- .../AccompanyingCourseFilters/HasTemporaryLocationFilter.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php index 3313cb23f..741a19961 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HasTemporaryLocationFilter.php @@ -70,7 +70,8 @@ class HasTemporaryLocationFilter implements FilterInterface }, ]) ->add('calc_date', PickRollingDateType::class, [ - 'label' => 'export.filter.course.having_temporarily.Calculation date', 'having_temporarily' => true, + 'label' => 'export.filter.course.having_temporarily.Calculation date', + 'required' => true, ]); } From 67c3de733faad7dcc8ce09ff36afe8b9a15da11b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 16:40:03 +0100 Subject: [PATCH 51/82] Refactor ActivityReasonAggregator: can be applied also on export for Activities linked with accompanying period This commit renames the ActivityReasonAggregator's namespace from PersonAggregators to Aggregator and modifies its methods. The join method in the query builder has been changed from innerJoin to leftJoin, 'group by' part is simplified, and the applyOn method now returns Declarations::ACTIVITY instead of Declarations::ACTIVITY_PERSON. Further modifications apply to the getFormDefaultData method and the corresponding test. --- .../unreleased/Feature-20240207-164038.yaml | 5 ++++ .../ActivityReasonAggregator.php | 26 +++++++++---------- .../ActivityReasonAggregatorTest.php | 23 +++++++++------- .../config/services/export.yaml | 2 +- 4 files changed, 32 insertions(+), 24 deletions(-) create mode 100644 .changes/unreleased/Feature-20240207-164038.yaml rename src/Bundle/ChillActivityBundle/Export/Aggregator/{PersonAggregators => }/ActivityReasonAggregator.php (86%) rename src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/{PersonAggregators => }/ActivityReasonAggregatorTest.php (69%) diff --git a/.changes/unreleased/Feature-20240207-164038.yaml b/.changes/unreleased/Feature-20240207-164038.yaml new file mode 100644 index 000000000..ff5096036 --- /dev/null +++ b/.changes/unreleased/Feature-20240207-164038.yaml @@ -0,0 +1,5 @@ +kind: Feature +body: Allow to group activities linked with accompanying period by reason +time: 2024-02-07T16:40:38.408575109+01:00 +custom: + Issue: "229" diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php similarity index 86% rename from src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php rename to src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php index 569c4ca9a..9945fd80a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php @@ -9,7 +9,7 @@ declare(strict_types=1); * the LICENSE file that was distributed with this source code. */ -namespace Chill\ActivityBundle\Export\Aggregator\PersonAggregators; +namespace Chill\ActivityBundle\Export\Aggregator; use Chill\ActivityBundle\Export\Declarations; use Chill\ActivityBundle\Repository\ActivityReasonCategoryRepository; @@ -25,8 +25,11 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class ActivityReasonAggregator implements AggregatorInterface, ExportElementValidatedInterface { - public function __construct(protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, protected ActivityReasonRepository $activityReasonRepository, protected TranslatableStringHelper $translatableStringHelper) - { + public function __construct( + protected ActivityReasonCategoryRepository $activityReasonCategoryRepository, + protected ActivityReasonRepository $activityReasonRepository, + protected TranslatableStringHelper $translatableStringHelper + ) { } public function addRole(): ?string @@ -51,7 +54,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali // make a jointure only if needed if (!\in_array('actreasons', $qb->getAllAliases(), true)) { - $qb->innerJoin('activity.reasons', 'actreasons'); + $qb->leftJoin('activity.reasons', 'actreasons'); } // join category if necessary @@ -62,19 +65,12 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali } } - // add the "group by" part - $groupBy = $qb->getDQLPart('groupBy'); - - if (\count($groupBy) > 0) { - $qb->addGroupBy($alias); - } else { - $qb->groupBy($alias); - } + $qb->addGroupBy($alias); } public function applyOn(): string { - return Declarations::ACTIVITY_PERSON; + return Declarations::ACTIVITY; } public function buildForm(FormBuilderInterface $builder) @@ -96,7 +92,9 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali public function getFormDefaultData(): array { - return []; + return [ + 'level' => 'reasons', + ]; } public function getLabels($key, array $values, $data) diff --git a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php similarity index 69% rename from src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php rename to src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php index 004de0b99..3e1d473f0 100644 --- a/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/PersonAggregators/ActivityReasonAggregatorTest.php +++ b/src/Bundle/ChillActivityBundle/Tests/Export/Aggregator/ActivityReasonAggregatorTest.php @@ -9,10 +9,10 @@ declare(strict_types=1); * the LICENSE file that was distributed with this source code. */ -namespace Chill\ActivityBundle\Tests\Export\Aggregator\PersonAggregators; +namespace Chill\ActivityBundle\Tests\Export\Aggregator; use Chill\ActivityBundle\Entity\Activity; -use Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator; +use Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator; use Chill\MainBundle\Test\Export\AbstractAggregatorTest; use Doctrine\ORM\EntityManagerInterface; use Prophecy\PhpUnit\ProphecyTrait; @@ -33,14 +33,14 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest self::bootKernel(); $this->aggregator = self::$container->get(ActivityReasonAggregator::class); + /* + $request = $this->prophesize() + ->willExtend(\Symfony\Component\HttpFoundation\Request::class); - $request = $this->prophesize() - ->willExtend(\Symfony\Component\HttpFoundation\Request::class); + $request->getLocale()->willReturn('fr'); - $request->getLocale()->willReturn('fr'); - - self::$container->get('request_stack') - ->push($request->reveal()); + self::$container->get('request_stack') + ->push($request->reveal());*/ } public function getAggregator() @@ -65,7 +65,12 @@ final class ActivityReasonAggregatorTest extends AbstractAggregatorTest return [ $em->createQueryBuilder() ->select('count(activity.id)') - ->from(Activity::class, 'activity'), + ->from(Activity::class, 'activity') + ->join('activity.person', 'person'), + $em->createQueryBuilder() + ->select('count(activity.id)') + ->from(Activity::class, 'activity') + ->join('activity.accompanyingPeriod', 'accompanyingPeriod'), $em->createQueryBuilder() ->select('count(activity.id)') ->from(Activity::class, 'activity') diff --git a/src/Bundle/ChillActivityBundle/config/services/export.yaml b/src/Bundle/ChillActivityBundle/config/services/export.yaml index ef691ba0d..b52911295 100644 --- a/src/Bundle/ChillActivityBundle/config/services/export.yaml +++ b/src/Bundle/ChillActivityBundle/config/services/export.yaml @@ -153,7 +153,7 @@ services: ## Aggregators - Chill\ActivityBundle\Export\Aggregator\PersonAggregators\ActivityReasonAggregator: + Chill\ActivityBundle\Export\Aggregator\ActivityReasonAggregator: tags: - { name: chill.export_aggregator, alias: activity_reason_aggregator } From f1fa4d415e7bf2ad1dda42f3f53763bb263dd98d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Wed, 7 Feb 2024 21:28:18 +0100 Subject: [PATCH 52/82] Fix messages+intl-icu.fr.yaml file, which was altered during multiple git merge --- .../translations/messages+intl-icu.fr.yaml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml index 95cfe5b8e..a268ac6c4 100644 --- a/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml +++ b/src/Bundle/ChillPersonBundle/translations/messages+intl-icu.fr.yaml @@ -140,23 +140,18 @@ exports: not_having_address_reference: describe: >- Uniquement les parcours qui ne sont pas localisés à une adresse de référence, à la date du {date_calc, date, medium} + by_referrer_between_dates: + description: >- + Filtré par référent du parcours, entre deux dates: depuis le {start_date, date, medium}, jusqu'au {end_date, date, medium}, seulement {agents} work: by_treating_agent: Filtered by treating agent at date: >- Les agents traitant au { agent_at, date, medium }, seulement {agents} - step_history: by_date: description: >- Changements de statuts filtrés par date: après le { start_date, date, medium } (inclus), avant le { end_date, date, medium } - - Les agents traitants au { agent_at, date, medium }, seulement {agents} - - by_referrer_between_dates: - description: >- - Filtré par référent du parcours, entre deux dates: depuis le {start_date, date, medium}, jusqu'au {end_date, date, medium}, seulement {agents} - 'total persons matching the search pattern': >- { total, plural, =0 {Aucun usager ne correspond aux termes de recherche} From 2b968b9a5bbfd240332995da267b9f639c261975 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 8 Feb 2024 11:20:21 +0100 Subject: [PATCH 53/82] order centers dropdown alphabetically --- .../Form/Type/ComposedGroupCenterType.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php index 1f6e08571..92a1e43e5 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/ComposedGroupCenterType.php @@ -13,6 +13,7 @@ namespace Chill\MainBundle\Form\Type; use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\PermissionsGroup; +use Doctrine\ORM\EntityRepository; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -27,7 +28,13 @@ class ComposedGroupCenterType extends AbstractType 'choice_label' => static fn (PermissionsGroup $group) => $group->getName(), ])->add('center', EntityType::class, [ 'class' => Center::class, - 'choice_label' => static fn (Center $center) => $center->getName(), + 'query_builder' => static function (EntityRepository $er) { + $qb = $er->createQueryBuilder('c'); + $qb->where($qb->expr()->eq('c.isActive', 'TRUE')) + ->orderBy('c.name', 'ASC'); + + return $qb; + }, ]); } From 458df45fa5e2b3ddc1350971fff45bd2a6e8ed4a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 8 Feb 2024 11:22:48 +0100 Subject: [PATCH 54/82] Add changie --- .changes/unreleased/UX-20240208-112235.yaml | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changes/unreleased/UX-20240208-112235.yaml diff --git a/.changes/unreleased/UX-20240208-112235.yaml b/.changes/unreleased/UX-20240208-112235.yaml new file mode 100644 index 000000000..429e71f3c --- /dev/null +++ b/.changes/unreleased/UX-20240208-112235.yaml @@ -0,0 +1,5 @@ +kind: UX +body: Order list of centers alphabetically in dropdown 'user' section admin. +time: 2024-02-08T11:22:35.5079313+01:00 +custom: + Issue: "260" From 1d21499eab651edd33e2566c9724444f5059cf6c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 29 Nov 2023 14:04:19 +0100 Subject: [PATCH 55/82] add version property to accompanyingperiodwork for optimistic locking --- .../AccompanyingPeriodWork.php | 19 ++++++++++++++ .../migrations/Version20231129113816.php | 26 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 src/Bundle/ChillPersonBundle/migrations/Version20231129113816.php diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index 77906b1ba..8531d7157 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -244,6 +244,13 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues */ private ?User $updatedBy = null; + /** + * @ORM\Column(type="integer", nullable=false, options={"default": 1}) + * + * @Serializer\Groups({"read", "read:accompanyingPeriodWork:light", "read:evaluation:include-work"}) + */ + private int $version = 1; + public function __construct() { $this->goals = new ArrayCollection(); @@ -452,6 +459,18 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues return $this->updatedBy; } + public function getVersion(): int + { + return $this->version; + } + + public function setVersion(int $version): self + { + $this->version = $version; + + return $this; + } + public function removeAccompanyingPeriodWorkEvaluation(AccompanyingPeriodWorkEvaluation $evaluation): self { $this->accompanyingPeriodWorkEvaluations diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20231129113816.php b/src/Bundle/ChillPersonBundle/migrations/Version20231129113816.php new file mode 100644 index 000000000..51731db8a --- /dev/null +++ b/src/Bundle/ChillPersonBundle/migrations/Version20231129113816.php @@ -0,0 +1,26 @@ +addSql('ALTER TABLE chill_person_accompanying_period_work ADD version INT DEFAULT 1 NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE chill_person_accompanying_period_work DROP version'); + } +} From 09882bb4be80320401a1a1554102cf475f12a7bd Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 29 Nov 2023 14:25:04 +0100 Subject: [PATCH 56/82] Add translations that were missing according to console error --- .../Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index ad386992e..f99ee53c5 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -348,6 +348,9 @@ import { makeFetch } from 'ChillMainAssets/lib/api/apiMethods'; const i18n = { messages: { fr: { + action: { + save: "Enregistrer" + }, action_title: "Action d'accompagnement", comments: "Commentaire", startDate: "Date de début", @@ -378,6 +381,7 @@ const i18n = { no_evaluations_available: "Aucune évaluation disponible", no_goals_available: "Aucun objectif disponible", referrers: "Agents traitants", + add_referrers: "Ajouter des agents traitants", no_referrers: "Aucun agent traitant", choose_referrers: "Choisir des agents traitants", remove_referrer: "Enlever l'agent", From f00b39980c5bd53640fb9f791a18ec5bba4d8380 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 29 Nov 2023 14:25:36 +0100 Subject: [PATCH 57/82] Add version of the social action to the state put correct serialization groups --- .../Entity/AccompanyingPeriod/AccompanyingPeriodWork.php | 2 +- .../public/vuejs/AccompanyingCourseWorkEdit/App.vue | 5 +++-- .../public/vuejs/AccompanyingCourseWorkEdit/store.js | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php index 8531d7157..be385c664 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodWork.php @@ -247,7 +247,7 @@ class AccompanyingPeriodWork implements AccompanyingPeriodLinkedWithSocialIssues /** * @ORM\Column(type="integer", nullable=false, options={"default": 1}) * - * @Serializer\Groups({"read", "read:accompanyingPeriodWork:light", "read:evaluation:include-work"}) + * @Serializer\Groups({"read", "accompanying_period_work:edit"}) */ private int $version = 1; diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue index f99ee53c5..dd4ddb664 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/AccompanyingCourseWorkEdit/App.vue @@ -297,7 +297,7 @@ @go-to-generate-workflow="goToGenerateWorkflow" > - +
  • - +
  • + + {{ form_end(eventForms[e.id]) }} + + + #} +
    +
    +
    +
    +
      + {% if is_granted('CHILL_EVENT_UPDATE', e) %} +
    • + {% endif %} + {% if is_granted('CHILL_EVENT_UPDATE', e) %} +
    • + {% endif %} +
    • +
    +
    +
    + + {% endfor %} + + {% endif %} + + {{ chill_pagination(pagination) }} + +{% endblock %} diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/EventListControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/EventListControllerTest.php new file mode 100644 index 000000000..a7814dd84 --- /dev/null +++ b/src/Bundle/ChillEventBundle/Tests/Controller/EventListControllerTest.php @@ -0,0 +1,42 @@ +getClientAuthenticated(); + + $client->request('GET', '/fr/event/event/list'); + self::assertResponseIsSuccessful(); + } +} diff --git a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php index 6532f76ac..dbc9d574b 100644 --- a/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php +++ b/src/Bundle/ChillEventBundle/Tests/Controller/ParticipationControllerTest.php @@ -11,6 +11,11 @@ declare(strict_types=1); namespace Chill\EventBundle\Tests\Controller; +use Chill\EventBundle\Entity\Event; +use Chill\EventBundle\Repository\EventRepository; +use Chill\MainBundle\Test\PrepareClientTrait; +use Chill\PersonBundle\DataFixtures\Helper\PersonRandomHelper; +use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use function count; @@ -23,15 +28,12 @@ use function count; */ final class ParticipationControllerTest extends WebTestCase { - /** - * @var \Symfony\Component\BrowserKit\AbstractBrowser - */ - protected $client; + use PersonRandomHelper; + use PrepareClientTrait; - /** - * @var \Doctrine\ORM\EntityManagerInterface - */ - protected $em; + private EntityManagerInterface $em; + + private EventRepository $eventRepository; /** * Keep a cache for each person id given by the function getRandomPerson. @@ -44,23 +46,21 @@ final class ParticipationControllerTest extends WebTestCase */ private array $personsIdsCache = []; - protected function setUp(): void + protected function prepareDI(): void { - self::bootKernel(); - - $this->client = self::createClient([], [ - 'PHP_AUTH_USER' => 'center a_social', - 'PHP_AUTH_PW' => 'password', - 'HTTP_ACCEPT_LANGUAGE' => 'fr_FR', - ]); - - $container = self::$kernel->getContainer(); - - $this->em = $container->get('doctrine.orm.entity_manager'); + $this->em = self::$container->get(EntityManagerInterface::class); + $this->eventRepository = self::$container->get(EventRepository::class); $this->personsIdsCache = []; } + protected function tearDown(): void + { + parent::tearDown(); + + self::ensureKernelShutdown(); + } + /** * This method test participation creation with wrong parameters. * @@ -68,11 +68,13 @@ final class ParticipationControllerTest extends WebTestCase */ public function testCreateActionWrongParameters() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEvent(); - $person = $this->getRandomPerson(); + $person = $this->getRandomPerson($this->em); // missing person_id or persons_ids - $this->client->request( + $client->request( 'GET', '/fr/event/participation/create', [ @@ -81,33 +83,33 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/create fail if ' .'both person_id and persons_ids are missing' ); // having both person_id and persons_ids - $this->client->request( + $client->request( 'GET', '/fr/event/participation/create', [ 'event_id' => $event->getId(), 'persons_ids' => implode(',', [ - $this->getRandomPerson()->getId(), - $this->getRandomPerson()->getId(), + $this->getRandomPerson($this->em)->getId(), + $this->getRandomPerson($this->em)->getId(), ]), 'person_id' => $person->getId(), ] ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/create fail if both person_id and ' .'persons_ids are set' ); // missing event_id - $this->client->request( + $client->request( 'GET', '/fr/event/participation/create', [ @@ -116,12 +118,12 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/create fails if event_id is missing' ); // persons_ids with wrong content - $this->client->request( + $client->request( 'GET', '/fr/event/participation/create', [ @@ -131,42 +133,47 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/create fails if persons_ids has wrong content' ); } public function testEditMultipleAction() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); + /** @var \Chill\EventBundle\Entity\Event $event */ $event = $this->getRandomEventWithMultipleParticipations(); - $crawler = $this->client->request('GET', '/fr/event/participation/'.$event->getId(). + $crawler = $client->request('GET', '/fr/event/participation/'.$event->getId(). '/edit_multiple'); - $this->assertEquals(200, $this->client->getResponse()->getStatusCode()); + $this->assertEquals(200, $client->getResponse()->getStatusCode()); $button = $crawler->selectButton('Mettre à jour'); $this->assertEquals(1, $button->count(), "test the form with button 'mettre à jour' exists "); - $this->client->submit($button->form(), [ + $client->submit($button->form(), [ 'form[participations][0][role]' => $event->getType()->getRoles()->first()->getId(), 'form[participations][0][status]' => $event->getType()->getStatuses()->first()->getId(), 'form[participations][1][role]' => $event->getType()->getRoles()->last()->getId(), 'form[participations][1][status]' => $event->getType()->getStatuses()->last()->getId(), ]); - $this->assertTrue($this->client->getResponse() + $this->assertTrue($client->getResponse() ->isRedirect('/fr/event/event/'.$event->getId().'/show')); } public function testNewActionWrongParameters() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEvent(); - $person = $this->getRandomPerson(); + $person = $this->getRandomPerson($this->em); // missing person_id or persons_ids - $this->client->request( + $client->request( 'GET', '/fr/event/participation/new', [ @@ -175,33 +182,33 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/new fail if ' .'both person_id and persons_ids are missing' ); // having both person_id and persons_ids - $this->client->request( + $client->request( 'GET', '/fr/event/participation/new', [ 'event_id' => $event->getId(), 'persons_ids' => implode(',', [ - $this->getRandomPerson()->getId(), - $this->getRandomPerson()->getId(), + $this->getRandomPerson($this->em)->getId(), + $this->getRandomPerson($this->em)->getId(), ]), 'person_id' => $person->getId(), ] ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/new fail if both person_id and ' .'persons_ids are set' ); // missing event_id - $this->client->request( + $client->request( 'GET', '/fr/event/participation/new', [ @@ -210,12 +217,12 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/new fails if event_id is missing' ); // persons_ids with wrong content - $this->client->request( + $client->request( 'GET', '/fr/event/participation/new', [ @@ -225,13 +232,15 @@ final class ParticipationControllerTest extends WebTestCase ); $this->assertEquals( 400, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'Test that /fr/event/participation/new fails if persons_ids has wrong content' ); } public function testNewMultipleAction() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEvent(); // record the number of participation for the event (used later in this test) $nbParticipations = $event->getParticipations()->count(); @@ -244,10 +253,10 @@ final class ParticipationControllerTest extends WebTestCase ->toArray() ); // get some random people - $person1 = $this->getRandomPerson(); - $person2 = $this->getRandomPerson(); + $person1 = $this->getRandomPerson($this->em); + $person2 = $this->getRandomPerson($this->em); - $crawler = $this->client->request( + $crawler = $client->request( 'GET', '/fr/event/participation/new', [ @@ -258,7 +267,7 @@ final class ParticipationControllerTest extends WebTestCase $this->assertEquals( 200, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/new is successful' ); @@ -266,7 +275,7 @@ final class ParticipationControllerTest extends WebTestCase $this->assertNotNull($button, "test the form with button 'Créer' exists"); - $this->client->submit($button->form(), [ + $client->submit($button->form(), [ 'form' => [ 'participations' => [ 0 => [ @@ -281,8 +290,8 @@ final class ParticipationControllerTest extends WebTestCase ], ]); - $this->assertTrue($this->client->getResponse()->isRedirect()); - $crawler = $this->client->followRedirect(); + $this->assertTrue($client->getResponse()->isRedirect()); + $crawler = $client->followRedirect(); $span1 = $crawler->filter('table td span.entity-person a:contains("' .$person1->getFirstName().'"):contains("'.$person1->getLastname().'")'); @@ -300,13 +309,15 @@ final class ParticipationControllerTest extends WebTestCase public function testNewMultipleWithAllPeopleParticipating() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEventWithMultipleParticipations(); $persons_id = implode(',', $event->getParticipations()->map( static fn ($p) => $p->getPerson()->getId() )->toArray()); - $crawler = $this->client->request( + $crawler = $client->request( 'GET', '/fr/event/participation/new', [ @@ -317,13 +328,15 @@ final class ParticipationControllerTest extends WebTestCase $this->assertEquals( 302, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/new is redirecting' ); } public function testNewMultipleWithSomePeopleParticipating() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEventWithMultipleParticipations(); // record the number of participation for the event (used later in this test) $nbParticipations = $event->getParticipations()->count(); @@ -335,12 +348,12 @@ final class ParticipationControllerTest extends WebTestCase $this->personsIdsCache = array_merge($this->personsIdsCache, $persons_id); // get a random person - $newPerson = $this->getRandomPerson(); + $newPerson = $this->getRandomPerson($this->em); // build the `persons_ids` parameter $persons_ids_string = implode(',', [...$persons_id, $newPerson->getId()]); - $crawler = $this->client->request( + $crawler = $client->request( 'GET', '/fr/event/participation/new', [ @@ -351,7 +364,7 @@ final class ParticipationControllerTest extends WebTestCase $this->assertEquals( 200, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/new is successful' ); @@ -377,12 +390,12 @@ final class ParticipationControllerTest extends WebTestCase $this->assertNotNull($button, "test the form with button 'Créer' exists"); // submit the form - $this->client->submit($button->form(), [ + $client->submit($button->form(), [ 'participation[role]' => $event->getType()->getRoles()->first()->getId(), 'participation[status]' => $event->getType()->getStatuses()->first()->getId(), ]); - $this->assertTrue($this->client->getResponse()->isRedirect()); + $this->assertTrue($client->getResponse()->isRedirect()); // reload the event and test there is a new participation $event = $this->em->getRepository(\Chill\EventBundle\Entity\Event::class) @@ -398,12 +411,14 @@ final class ParticipationControllerTest extends WebTestCase public function testNewSingleAction() { + $client = $this->getClientAuthenticated(); + $this->prepareDI(); $event = $this->getRandomEvent(); // record the number of participation for the event $nbParticipations = $event->getParticipations()->count(); - $person = $this->getRandomPerson(); + $person = $this->getRandomPerson($this->em); - $crawler = $this->client->request( + $crawler = $client->request( 'GET', '/fr/event/participation/new', [ @@ -414,7 +429,7 @@ final class ParticipationControllerTest extends WebTestCase $this->assertEquals( 200, - $this->client->getResponse()->getStatusCode(), + $client->getResponse()->getStatusCode(), 'test that /fr/event/participation/new is successful' ); @@ -422,13 +437,13 @@ final class ParticipationControllerTest extends WebTestCase $this->assertNotNull($button, "test the form with button 'Créer' exists"); - $this->client->submit($button->form(), [ + $client->submit($button->form(), [ 'participation[role]' => $event->getType()->getRoles()->first()->getId(), 'participation[status]' => $event->getType()->getStatuses()->first()->getId(), ]); - $this->assertTrue($this->client->getResponse()->isRedirect()); - $crawler = $this->client->followRedirect(); + $this->assertTrue($client->getResponse()->isRedirect()); + $crawler = $client->followRedirect(); $span = $crawler->filter('table td span.entity-person a:contains("' .$person->getFirstName().'"):contains("'.$person->getLastname().'")'); @@ -442,23 +457,17 @@ final class ParticipationControllerTest extends WebTestCase $this->assertEquals($nbParticipations + 1, $event->getParticipations()->count()); } - /** - * @return \Chill\EventBundle\Entity\Event - */ - protected function getRandomEvent(mixed $centerName = 'Center A', mixed $circleName = 'social') + private function getRandomEvent(string $centerName = 'Center A', string $circleName = 'social'): Event { - $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) - ->findByName($centerName); + $dql = 'FROM '.Event::class.' e JOIN e.center center JOIN e.circle scope WHERE center.name LIKE :cname AND JSON_EXTRACT(scope.name, \'fr\') LIKE :sname'; - $circles = $this->em->getRepository(\Chill\MainBundle\Entity\Scope::class) - ->findAll(); - array_filter($circles, static fn ($circle) => \in_array($circleName, $circle->getName(), true)); - $circle = $circles[0]; + $ids = $this->em->createQuery( + 'SELECT DISTINCT e.id '.$dql + ) + ->setParameters(['cname' => $centerName, 'sname' => $circleName]) + ->getResult(); - $events = $this->em->getRepository(\Chill\EventBundle\Entity\Event::class) - ->findBy(['center' => $center, 'circle' => $circle]); - - return $events[array_rand($events)]; + return $this->eventRepository->find($ids[array_rand($ids)]['id']); } /** @@ -479,35 +488,4 @@ final class ParticipationControllerTest extends WebTestCase $event : $this->getRandomEventWithMultipleParticipations($centerName, $circleName); } - - /** - * Returns a person randomly. - * - * This function does not give the same person twice - * for each test. - * - * You may ask to ignore some people by adding their id to the property - * `$this->personsIdsCache` - * - * @param string $centerName - * - * @return \Chill\PersonBundle\Entity\Person - */ - protected function getRandomPerson($centerName = 'Center A') - { - $center = $this->em->getRepository(\Chill\MainBundle\Entity\Center::class) - ->findByName($centerName); - - $persons = $this->em->getRepository(\Chill\PersonBundle\Entity\Person::class) - ->findBy(['center' => $center]); - - $person = $persons[array_rand($persons)]; - - if (\in_array($person->getId(), $this->personsIdsCache, true)) { - return $this->getRandomPerson($centerName); // we try another time - } - $this->personsIdsCache[] = $person->getId(); - - return $person; - } } diff --git a/src/Bundle/ChillEventBundle/Tests/Repository/EventACLAwareRepositoryTest.php b/src/Bundle/ChillEventBundle/Tests/Repository/EventACLAwareRepositoryTest.php new file mode 100644 index 000000000..f489f6cd4 --- /dev/null +++ b/src/Bundle/ChillEventBundle/Tests/Repository/EventACLAwareRepositoryTest.php @@ -0,0 +1,97 @@ +buildEventACLAwareRepository(); + + $this->assertGreaterThanOrEqual(0, $repository->countAllViewable($filters)); + } + + /** + * @dataProvider generateFilters + */ + public function testFindAllViewable(array $filters): void + { + $repository = $this->buildEventACLAwareRepository(); + + $this->assertIsArray($repository->findAllViewable($filters)); + } + + public function generateFilters(): iterable + { + yield [[]]; + } + + public function buildEventACLAwareRepository(): EventACLAwareRepository + { + $em = self::$container->get(EntityManagerInterface::class); + $user = $em->createQuery('SELECT u FROM '.User::class.' u') + ->setMaxResults(1) + ->getSingleResult() + ; + + $scopes = $em->createQuery('SELECT s FROM '.Scope::class.' s') + ->setMaxResults(3) + ->getResult(); + + $centers = $em->createQuery('SELECT c FROM '.Center::class.' c') + ->setMaxResults(3) + ->getResult(); + + $security = $this->prophesize(Security::class); + $security->getUser()->willReturn($user); + + $authorizationHelper = $this->prophesize(AuthorizationHelperForCurrentUserInterface::class); + $authorizationHelper->getReachableCenters(EventVoter::SEE)->willReturn($centers); + $authorizationHelper->getReachableScopes(EventVoter::SEE, Argument::type(Center::class))->willReturn($scopes); + + return new EventACLAwareRepository( + $authorizationHelper->reveal(), + $em, + $security->reveal() + ); + } +} diff --git a/src/Bundle/ChillEventBundle/config/services/menu.yaml b/src/Bundle/ChillEventBundle/config/services/menu.yaml deleted file mode 100644 index 6f49c02f0..000000000 --- a/src/Bundle/ChillEventBundle/config/services/menu.yaml +++ /dev/null @@ -1,7 +0,0 @@ -services: - Chill\EventBundle\Menu\PersonMenuBuilder: - arguments: - $authorizationChecker: '@Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface' - $translator: '@Symfony\Contracts\Translation\TranslatorInterface' - tags: - - { name: 'chill.menu_builder' } \ No newline at end of file diff --git a/src/Bundle/ChillEventBundle/translations/messages+int-icu.fr.yml b/src/Bundle/ChillEventBundle/translations/messages+intl-icu.fr.yml similarity index 69% rename from src/Bundle/ChillEventBundle/translations/messages+int-icu.fr.yml rename to src/Bundle/ChillEventBundle/translations/messages+intl-icu.fr.yml index 1dac8969e..5c2a5b7c9 100644 --- a/src/Bundle/ChillEventBundle/translations/messages+int-icu.fr.yml +++ b/src/Bundle/ChillEventBundle/translations/messages+intl-icu.fr.yml @@ -11,3 +11,11 @@ count participations to this event: >- one {Un participant à l'événement} other {# participants à l'événement} } + +events: + and_other_count_participants: >- + { count, plural, + =0 {Aucun autre participant} + one {et un autre participant} + other {et # autres participants} + } diff --git a/src/Bundle/ChillEventBundle/translations/messages.fr.yml b/src/Bundle/ChillEventBundle/translations/messages.fr.yml index 9be54f11d..0e87e30ad 100644 --- a/src/Bundle/ChillEventBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillEventBundle/translations/messages.fr.yml @@ -107,3 +107,8 @@ csv: csv Create a new role: Créer un nouveau rôle Create a new type: Créer un nouveau type Create a new status: Créer un nouveau statut + +event: + filter: + event_types: Par types d'événement + event_dates: Par date d'événement diff --git a/src/Bundle/ChillMainBundle/Test/DummyPaginator.php b/src/Bundle/ChillMainBundle/Test/DummyPaginator.php index 4457868ef..7e1442ce3 100644 --- a/src/Bundle/ChillMainBundle/Test/DummyPaginator.php +++ b/src/Bundle/ChillMainBundle/Test/DummyPaginator.php @@ -20,9 +20,9 @@ use Symfony\Component\Routing\Generator\UrlGeneratorInterface; class DummyPaginator implements PaginatorFactoryInterface { public function __construct( - private UrlGeneratorInterface $urlGenerator, - private string $route, - private array $routeParameters = [] + private readonly UrlGeneratorInterface $urlGenerator, + private readonly string $route, + private readonly array $routeParameters = [] ) {} public function create(int $totalItems, string $route = null, array $routeParameters = null): PaginatorInterface From 9b9c2774addb8b672b5233381a9056505b1968c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 28 Nov 2023 12:35:19 +0100 Subject: [PATCH 67/82] Allow Pick*Type to submit the form when selection an entity, and apply inside Event --- .../Controller/EventController.php | 15 ++++++--------- .../Controller/EventListController.php | 7 ++++++- .../Resources/views/Event/page_list.html.twig | 5 ----- .../Resources/views/Event/show.html.twig | 5 +---- .../Form/Type/PickUserDynamicType.php | 5 ++++- .../Resources/public/module/pick-entity/index.js | 15 ++++++++++++--- .../public/vuejs/PickEntity/PickEntity.vue | 8 ++++++++ .../Resources/views/Form/fields.html.twig | 4 +++- .../Form/Type/PickPersonDynamicType.php | 5 ++++- .../Form/Type/PickThirdpartyDynamicType.php | 5 ++++- 10 files changed, 48 insertions(+), 26 deletions(-) diff --git a/src/Bundle/ChillEventBundle/Controller/EventController.php b/src/Bundle/ChillEventBundle/Controller/EventController.php index 9d4352a02..367c6c334 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventController.php @@ -411,20 +411,17 @@ final class EventController extends AbstractController ] ); - $builder->add('person_id', PickPersonDynamicType::class, ['as_id' => true, 'multiple' => false]); + $builder->add('person_id', PickPersonDynamicType::class, [ + 'as_id' => true, + 'multiple' => false, + 'submit_on_adding_new_entity' => true, + 'label' => 'Add a participation', + ]); $builder->add('event_id', HiddenType::class, [ 'data' => $event->getId(), ]); - $builder->add( - 'submit', - SubmitType::class, - [ - 'label' => 'Add a participation', - ] - ); - return $builder->getForm(); } diff --git a/src/Bundle/ChillEventBundle/Controller/EventListController.php b/src/Bundle/ChillEventBundle/Controller/EventListController.php index ffdc9c804..60df81240 100644 --- a/src/Bundle/ChillEventBundle/Controller/EventListController.php +++ b/src/Bundle/ChillEventBundle/Controller/EventListController.php @@ -101,7 +101,12 @@ final readonly class EventListController ] ); - $builder->add('person_id', PickPersonDynamicType::class, ['as_id' => true, 'multiple' => false]); + $builder->add('person_id', PickPersonDynamicType::class, [ + 'as_id' => true, + 'multiple' => false, + 'submit_on_adding_new_entity' => true, + 'label' => 'Add a participation', + ]); $builder->add('event_id', HiddenType::class, [ 'data' => $event->getId(), diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig index 24b7c08a8..f22b56c05 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/page_list.html.twig @@ -60,18 +60,13 @@ {% endif %} {% endif %} - {#
    {{ form_start(eventForms[e.id]) }} {{ form_widget(eventForms[e.id].person_id) }} -
      -
    • -
    {{ form_end(eventForms[e.id]) }}
    - #}
    diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig index b7e3b7d10..3156c61d8 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/show.html.twig @@ -136,11 +136,8 @@ 'class' : 'custom-select', 'style': 'min-width: 15em; max-width: 18em; display: inline-block;' }} ) }} -
    - {{ form_widget(form_add_participation_by_person.submit, { 'attr' : { 'class' : 'btn btn-create' } } ) }} -
    - {{ form_rest(form_add_participation_by_person) }} + {{ form_end(form_add_participation_by_person) }} diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php index 5272b4aad..ad23e5655 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickUserDynamicType.php @@ -43,6 +43,7 @@ class PickUserDynamicType extends AbstractType $view->vars['uniqid'] = uniqid('pick_user_dyn'); $view->vars['suggested'] = []; $view->vars['as_id'] = true === $options['as_id'] ? '1' : '0'; + $view->vars['submit_on_adding_new_entity'] = true === $options['submit_on_adding_new_entity'] ? '1' : '0'; foreach ($options['suggested'] as $user) { $view->vars['suggested'][] = $this->normalizer->normalize($user, 'json', ['groups' => 'read']); @@ -58,7 +59,9 @@ class PickUserDynamicType extends AbstractType ->setDefault('suggested', []) // if set to true, only the id will be set inside the content. The denormalization will not work. ->setDefault('as_id', false) - ->setAllowedTypes('as_id', ['bool']); + ->setAllowedTypes('as_id', ['bool']) + ->setDefault('submit_on_adding_new_entity', false) + ->setAllowedTypes('submit_on_adding_new_entity', ['bool']); } public function getBlockPrefix() diff --git a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js index 6e939734e..6b33c0f52 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js +++ b/src/Bundle/ChillMainBundle/Resources/public/module/pick-entity/index.js @@ -25,7 +25,9 @@ function loadDynamicPicker(element) { null : [ JSON.parse(input.value) ] ) suggested = JSON.parse(el.dataset.suggested), - as_id = parseInt(el.dataset.asId) === 1; + as_id = parseInt(el.dataset.asId) === 1, + submit_on_adding_new_entity = parseInt(el.dataset.submitOnAddingNewEntity) === 1 + label = el.dataset.label; if (!isMultiple) { if (input.value === '[]'){ @@ -40,6 +42,7 @@ function loadDynamicPicker(element) { ':picked="picked" ' + ':uniqid="uniqid" ' + ':suggested="notPickedSuggested" ' + + ':label="label" ' + '@addNewEntity="addNewEntity" ' + '@removeEntity="removeEntity">', components: { @@ -51,8 +54,10 @@ function loadDynamicPicker(element) { types: JSON.parse(el.dataset.types), picked: picked === null ? [] : picked, uniqid: el.dataset.uniqid, - suggested: suggested, - as_id: as_id, + suggested, + as_id, + submit_on_adding_new_entity, + label, } }, computed: { @@ -92,6 +97,10 @@ function loadDynamicPicker(element) { } } } + + if (this.submit_on_adding_new_entity) { + input.form.submit(); + } }, removeEntity({entity}) { if (-1 === this.suggested.findIndex(e => e.type === entity.type && e.id === entity.id)) { diff --git a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue index 0a39718e2..75abc4fdd 100644 --- a/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue +++ b/src/Bundle/ChillMainBundle/Resources/public/vuejs/PickEntity/PickEntity.vue @@ -56,6 +56,10 @@ export default { suggested: { type: Array, default: [] + }, + label: { + type: String, + required: false, } }, emits: ['addNewEntity', 'removeEntity'], @@ -80,6 +84,10 @@ export default { }; }, translatedListOfTypes() { + if (this.label !== '') { + return this.label; + } + let trans = []; this.types.forEach(t => { if (this.$props.multiple) { diff --git a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig index 1ff92fd5f..9c60028ad 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Form/fields.html.twig @@ -257,7 +257,9 @@ data-multiple="{{ form.vars['multiple'] }}" data-uniqid="{{ form.vars['uniqid'] }}" data-suggested="{{ form.vars['suggested']|json_encode|escape('html_attr') }}" - data-as-id="{{ form.vars['as_id'] }}"> + data-as-id="{{ form.vars['as_id'] }}" + data-submit-on-adding-new-entity="{{ form.vars['submit_on_adding_new_entity'] }}" + data-label="{{ form.vars['label']|trans|escape('html_attr') }}"> {% endblock %} {% block pick_postal_code_widget %} diff --git a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php index 94c625a38..71fd36225 100644 --- a/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php +++ b/src/Bundle/ChillPersonBundle/Form/Type/PickPersonDynamicType.php @@ -42,6 +42,7 @@ class PickPersonDynamicType extends AbstractType $view->vars['uniqid'] = uniqid('pick_user_dyn'); $view->vars['suggested'] = []; $view->vars['as_id'] = true === $options['as_id'] ? '1' : '0'; + $view->vars['submit_on_adding_new_entity'] = true === $options['submit_on_adding_new_entity'] ? '1' : '0'; foreach ($options['suggested'] as $person) { $view->vars['suggested'][] = $this->normalizer->normalize($person, 'json', ['groups' => 'read']); @@ -56,7 +57,9 @@ class PickPersonDynamicType extends AbstractType ->setDefault('compound', false) ->setDefault('suggested', []) ->setDefault('as_id', false) - ->setAllowedTypes('as_id', ['bool']); + ->setAllowedTypes('as_id', ['bool']) + ->setDefault('submit_on_adding_new_entity', false) + ->setAllowedTypes('submit_on_adding_new_entity', ['bool']); } public function getBlockPrefix() diff --git a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php index de233c360..e46e4544e 100644 --- a/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php +++ b/src/Bundle/ChillThirdPartyBundle/Form/Type/PickThirdpartyDynamicType.php @@ -42,6 +42,7 @@ class PickThirdpartyDynamicType extends AbstractType $view->vars['uniqid'] = uniqid('pick_user_dyn'); $view->vars['suggested'] = []; $view->vars['as_id'] = true === $options['as_id'] ? '1' : '0'; + $view->vars['submit_on_adding_new_entity'] = true === $options['submit_on_adding_new_entity'] ? '1' : '0'; foreach ($options['suggested'] as $tp) { $view->vars['suggested'][] = $this->normalizer->normalize($tp, 'json', ['groups' => 'read']); @@ -56,7 +57,9 @@ class PickThirdpartyDynamicType extends AbstractType ->setDefault('compound', false) ->setDefault('suggested', []) ->setDefault('as_id', false) - ->setAllowedTypes('as_id', ['bool']); + ->setAllowedTypes('as_id', ['bool']) + ->setDefault('submit_on_adding_new_entity', false) + ->setAllowedTypes('submit_on_adding_new_entity', ['bool']); } public function getBlockPrefix() From 6b7b2ae52225a831512561d0c4796ce3db4867cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 28 Nov 2023 12:36:44 +0100 Subject: [PATCH 68/82] fixup! Fix migrations to take into account the change in table name for Person's entity --- .../ChillEventBundle/migrations/Version20160318111334.php | 4 ---- .../ChillEventBundle/migrations/Version20190110140538.php | 4 ---- .../ChillEventBundle/migrations/Version20190115140042.php | 4 ---- .../ChillEventBundle/migrations/Version20190201143121.php | 4 ---- 4 files changed, 16 deletions(-) diff --git a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php index 908f2bfea..1b74e297f 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20160318111334.php @@ -27,8 +27,6 @@ class Version20160318111334 extends AbstractMigration public function down(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_role DROP CONSTRAINT FK_AA714E54C54C8C93'); $this->addSql('ALTER TABLE chill_event_status DROP CONSTRAINT FK_A6CC85D0C54C8C93'); $this->addSql('ALTER TABLE chill_event_participation DROP CONSTRAINT FK_4E7768ACD60322AC'); @@ -55,8 +53,6 @@ class Version20160318111334 extends AbstractMigration public function up(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('CREATE SEQUENCE chill_event_event_type_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_event_role_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); $this->addSql('CREATE SEQUENCE chill_event_status_id_seq INCREMENT BY 1 MINVALUE 1 START 1'); diff --git a/src/Bundle/ChillEventBundle/migrations/Version20190110140538.php b/src/Bundle/ChillEventBundle/migrations/Version20190110140538.php index d83e1b397..3c8b587ca 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20190110140538.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20190110140538.php @@ -27,16 +27,12 @@ final class Version20190110140538 extends AbstractMigration public function down(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event ALTER date TYPE DATE'); $this->addSql('ALTER TABLE chill_event_event ALTER date DROP DEFAULT'); } public function up(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event ALTER date TYPE TIMESTAMP(0) WITHOUT TIME ZONE'); $this->addSql('ALTER TABLE chill_event_event ALTER date DROP DEFAULT'); } diff --git a/src/Bundle/ChillEventBundle/migrations/Version20190115140042.php b/src/Bundle/ChillEventBundle/migrations/Version20190115140042.php index 4ef21a834..63ae29ee0 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20190115140042.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20190115140042.php @@ -27,8 +27,6 @@ final class Version20190115140042 extends AbstractMigration public function down(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC8D0AFA354'); $this->addSql('DROP INDEX IDX_FA320FC8D0AFA354'); $this->addSql('ALTER TABLE chill_event_event DROP moderator_id'); @@ -36,8 +34,6 @@ final class Version20190115140042 extends AbstractMigration public function up(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event ADD moderator_id INT DEFAULT NULL'); $this->addSql('ALTER TABLE chill_event_event ADD CONSTRAINT FK_FA320FC8D0AFA354 FOREIGN KEY (moderator_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('CREATE INDEX IDX_FA320FC8D0AFA354 ON chill_event_event (moderator_id)'); diff --git a/src/Bundle/ChillEventBundle/migrations/Version20190201143121.php b/src/Bundle/ChillEventBundle/migrations/Version20190201143121.php index cc8445f95..5640bc07b 100644 --- a/src/Bundle/ChillEventBundle/migrations/Version20190201143121.php +++ b/src/Bundle/ChillEventBundle/migrations/Version20190201143121.php @@ -27,16 +27,12 @@ final class Version20190201143121 extends AbstractMigration public function down(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT fk_fa320fc8d0afa354'); $this->addSql('ALTER TABLE chill_event_event ADD CONSTRAINT fk_fa320fc8d0afa354 FOREIGN KEY (moderator_id) REFERENCES chill_person_person (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } public function up(Schema $schema): void { - $this->abortIf($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform, 'Migration can only be executed safely on \'postgresql\'.'); - $this->addSql('ALTER TABLE chill_event_event DROP CONSTRAINT FK_FA320FC8D0AFA354'); $this->addSql('ALTER TABLE chill_event_event ADD CONSTRAINT FK_FA320FC8D0AFA354 FOREIGN KEY (moderator_id) REFERENCES users (id) NOT DEFERRABLE INITIALLY IMMEDIATE'); } From 6d04e477f810598d8e2001fa81cb6139c8bdfabc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 28 Nov 2023 13:00:04 +0100 Subject: [PATCH 69/82] Clean database, to avoid double participations on event --- .../ChillEventBundle/Entity/Participation.php | 37 ++++++------------- .../Resources/views/Event/edit.html.twig | 10 ++--- .../migrations/Version20231128114959.php | 33 +++++++++++++++++ .../translations/messages.fr.yml | 1 + 4 files changed, 48 insertions(+), 33 deletions(-) create mode 100644 src/Bundle/ChillEventBundle/migrations/Version20231128114959.php diff --git a/src/Bundle/ChillEventBundle/Entity/Participation.php b/src/Bundle/ChillEventBundle/Entity/Participation.php index 1f7040c05..8076e8f5f 100644 --- a/src/Bundle/ChillEventBundle/Entity/Participation.php +++ b/src/Bundle/ChillEventBundle/Entity/Participation.php @@ -22,6 +22,7 @@ use Chill\MainBundle\Entity\Scope; use Chill\PersonBundle\Entity\Person; use DateTime; use Doctrine\ORM\Mapping as ORM; +use Symfony\Component\Validator\Constraints as Assert; use Symfony\Component\Validator\Context\ExecutionContextInterface; /** @@ -30,7 +31,9 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; * @ORM\Entity( * repositoryClass="Chill\EventBundle\Repository\ParticipationRepository") * - * @ORM\Table(name="chill_event_participation") + * @ORM\Table(name="chill_event_participation", uniqueConstraints={ + * @ORM\UniqueConstraint(name="chill_event_participation_event_person_unique_idx", columns={"event_id", "person_id"}) + * }) * * @ORM\HasLifecycleCallbacks */ @@ -55,30 +58,28 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ private ?int $id = null; - /** - * @ORM\Column(type="datetime") - */ - private ?\DateTime $lastUpdate = null; - /** * @ORM\ManyToOne(targetEntity="Chill\PersonBundle\Entity\Person") + * @Assert\NotNull() */ private ?Person $person = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Role") + * @Assert\NotNull() */ private ?Role $role = null; /** * @ORM\ManyToOne(targetEntity="Chill\EventBundle\Entity\Status") + * @Assert\NotNull() */ private ?Status $status = null; /** * @return Center */ - public function getCenter() + public function getCenter(): null|Center { if (null === $this->getEvent()) { throw new \RuntimeException('The event is not linked with this instance. You should initialize the event with a valid center before.'); @@ -100,7 +101,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * * @return int */ - public function getId() + public function getId(): int { return $this->id; } @@ -112,7 +113,7 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ public function getLastUpdate() { - return $this->lastUpdate; + return $this->getUpdatedAt(); } /** @@ -242,10 +243,6 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ public function setEvent(?Event $event = null) { - if ($this->event !== $event) { - $this->update(); - } - $this->event = $event; return $this; @@ -258,10 +255,6 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ public function setPerson(?Person $person = null) { - if ($person !== $this->person) { - $this->update(); - } - $this->person = $person; return $this; @@ -274,9 +267,6 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ public function setRole(?Role $role = null) { - if ($role !== $this->role) { - $this->update(); - } $this->role = $role; return $this; @@ -289,10 +279,6 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa */ public function setStatus(?Status $status = null) { - if ($this->status !== $status) { - $this->update(); - } - $this->status = $status; return $this; @@ -302,11 +288,10 @@ class Participation implements \ArrayAccess, HasCenterInterface, HasScopeInterfa * Set lastUpdate. * * @return Participation + * @deprecated */ protected function update() { - $this->lastUpdate = new \DateTime('now'); - return $this; } } diff --git a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig index a528f1f5c..af1e32cec 100644 --- a/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig +++ b/src/Bundle/ChillEventBundle/Resources/views/Event/edit.html.twig @@ -15,14 +15,10 @@ {{ form_row(edit_form.type, { 'label': 'Event type' }) }} {{ form_row(edit_form.moderator) }} -