diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index 7fe114401..352a67014 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -31,14 +31,10 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(Activity::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) {} @@ -113,7 +109,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php index dc26dc926..4101408cc 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -31,14 +31,10 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(Activity::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -116,7 +112,7 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index 81077be32..4926ecc33 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -31,14 +31,10 @@ class CountActivity implements ExportInterface, GroupedExportInterface { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(Activity::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) {} @@ -110,7 +106,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb->select('COUNT(DISTINCT activity.id) as export_count_activity'); diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php index 73d98e954..3f8d35e40 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/ListActivity.php @@ -31,18 +31,14 @@ class ListActivity implements ListInterface, GroupedExportInterface private TranslatableStringExportLabelHelper $translatableStringExportLabelHelper; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( ListActivityHelper $helper, EntityManagerInterface $entityManager, TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->helper = $helper; $this->entityManager = $entityManager; $this->translatableStringExportLabelHelper = $translatableStringExportLabelHelper; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -152,7 +148,7 @@ class ListActivity implements ListInterface, GroupedExportInterface ->addSelect('(SELECT AGGREGATE(acpScope.name) FROM ' . Scope::class . ' acpScope WHERE acpScope MEMBER OF acp.scopes) AS scopesNames') ->addGroupBy('scopesNames'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php index f9bb4fa37..d9022f10e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -31,14 +31,10 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(Activity::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -116,7 +112,7 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php index 979974d36..81cbddc8e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -31,14 +31,10 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(Activity::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -116,7 +112,7 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php index 77a2cfbc8..53be661a3 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountCalendars.php @@ -28,14 +28,10 @@ class CountCalendars implements ExportInterface, GroupedExportInterface { private CalendarRepository $calendarRepository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( CalendarRepository $calendarRepository, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->calendarRepository = $calendarRepository; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -106,7 +102,7 @@ class CountCalendars implements ExportInterface, GroupedExportInterface $qb->select('COUNT(cal.id) AS export_result'); $qb->join('cal.accompanyingPeriod', 'acp'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php index 3adfa1727..de9086438 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarAvgDuration.php @@ -27,14 +27,10 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface { private CalendarRepository $calendarRepository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( CalendarRepository $calendarRepository, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->calendarRepository = $calendarRepository; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder): void @@ -100,7 +96,7 @@ class StatCalendarAvgDuration implements ExportInterface, GroupedExportInterface $qb->select('AVG(cal.endDate - cal.startDate) AS export_result'); $qb->join('cal.accompanyingPeriod', 'acp'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php index 856e6996a..0ef11f14d 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatCalendarSumDuration.php @@ -27,14 +27,10 @@ class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface { private CalendarRepository $calendarRepository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( CalendarRepository $calendarRepository, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->calendarRepository = $calendarRepository; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder): void @@ -100,7 +96,7 @@ class StatCalendarSumDuration implements ExportInterface, GroupedExportInterface $qb->select('SUM(cal.endDate - cal.startDate) AS export_result'); $qb->join('cal.accompanyingPeriod', 'acp'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillMainBundle/config/services.yaml b/src/Bundle/ChillMainBundle/config/services.yaml index 501a894e6..5976cb8b0 100644 --- a/src/Bundle/ChillMainBundle/config/services.yaml +++ b/src/Bundle/ChillMainBundle/config/services.yaml @@ -125,7 +125,3 @@ services: Chill\MainBundle\Service\EntityInfo\ViewEntityInfoManager: arguments: $vienEntityInfoProviders: !tagged_iterator chill_main.entity_info_provider - - Chill\MainBundle\Export\AccompanyingCourseExportHelper: - autoconfigure: true - autowire: true diff --git a/src/Bundle/ChillMainBundle/config/services/export.yaml b/src/Bundle/ChillMainBundle/config/services/export.yaml index b0dbf934d..6bae6f9c0 100644 --- a/src/Bundle/ChillMainBundle/config/services/export.yaml +++ b/src/Bundle/ChillMainBundle/config/services/export.yaml @@ -52,3 +52,5 @@ services: $exportManager: '@Chill\MainBundle\Export\ExportManager' tags: - { name: chill.export_formatter, alias: 'csv_pivoted_list' } + + Chill\MainBundle\Export\AccompanyingCourseExportHelper: ~ diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php index cca307694..5e65ba989 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/ClosingMotive.php @@ -70,8 +70,7 @@ class ClosingMotive private ?ClosingMotive $parent = null; /** - * @var bool - * @ORM\Column(type="boolean") + * @ORM\Column(type="boolean", nullable=false, options={"default": false}) */ private bool $isCanceledAccompanyingPeriod = false; diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 6fa24df4e..64a2bf53e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -30,14 +30,10 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface { protected EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(AccompanyingPeriod::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder): void @@ -116,7 +112,7 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface ->setParameter('count_acp_step', AccompanyingPeriod::STEP_DRAFT) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb->select('COUNT(DISTINCT acp.id) AS export_result'); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWork.php index a42c7eb66..236eea3cf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingPeriodWork.php @@ -29,14 +29,10 @@ class CountAccompanyingPeriodWork implements ExportInterface, GroupedExportInter { protected EntityManagerInterface $em; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->em = $em; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder): void @@ -117,7 +113,7 @@ class CountAccompanyingPeriodWork implements ExportInterface, GroupedExportInter $qb->select('COUNT(DISTINCT acpw.id) as export_result'); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index b61d2b5b1..45ffaf1dc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -28,14 +28,10 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface { private EntityManagerInterface $entityManager; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->entityManager = $em; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -115,7 +111,7 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface ) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb->select('COUNT(DISTINCT workeval.id) AS export_result'); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php index 63fa63f46..9a54095e7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php @@ -30,14 +30,10 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor { private EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(AccompanyingPeriod::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -116,7 +112,7 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor ) )->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb->select('COUNT(DISTINCT person.id) AS export_result'); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php index c00e6e602..5595263d6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php @@ -53,7 +53,6 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter, private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) {} public function buildForm(FormBuilderInterface $builder) @@ -134,7 +133,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp $this->listAccompanyingPeriodHelper->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date'])); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb ->addOrderBy('acp.openingDate') diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWork.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWork.php index 9e225a47c..b6a2b7221 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWork.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriodWork.php @@ -101,8 +101,6 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac private UserHelper $userHelper; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $entityManager, DateTimeHelper $dateTimeHelper, @@ -116,7 +114,6 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac RollingDateConverterInterface $rollingDateConverter, AggregateStringHelper $aggregateStringHelper, SocialActionRepository $socialActionRepository, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->entityManager = $entityManager; $this->dateTimeHelper = $dateTimeHelper; @@ -130,7 +127,6 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac $this->rollingDateConverter = $rollingDateConverter; $this->aggregateStringHelper = $aggregateStringHelper; $this->socialActionRepository = $socialActionRepository; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -296,7 +292,7 @@ class ListAccompanyingPeriodWork implements ListInterface, GroupedExportInterfac ->setParameter('authorized_centers', $centers) ->setParameter('calc_date', $this->rollingDateConverter->convert($data['calc_date'])); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date'])); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php index 8a2d6752a..8f9f85ccc 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListEvaluation.php @@ -91,8 +91,6 @@ class ListEvaluation implements ListInterface, GroupedExportInterface private UserHelper $userHelper; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $entityManager, SocialIssueRender $socialIssueRender, @@ -105,7 +103,6 @@ class ListEvaluation implements ListInterface, GroupedExportInterface TranslatableStringExportLabelHelper $translatableStringExportLabelHelper, AggregateStringHelper $aggregateStringHelper, RollingDateConverterInterface $rollingDateConverter, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->entityManager = $entityManager; $this->socialIssueRender = $socialIssueRender; @@ -118,7 +115,6 @@ class ListEvaluation implements ListInterface, GroupedExportInterface $this->translatableStringExportLabelHelper = $translatableStringExportLabelHelper; $this->aggregateStringHelper = $aggregateStringHelper; $this->rollingDateConverter = $rollingDateConverter; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -275,7 +271,7 @@ class ListEvaluation implements ListInterface, GroupedExportInterface ->setParameter('authorized_centers', $centers) ->setParameter('calc_date', $this->rollingDateConverter->convert($data['calc_date'])); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $this->addSelectClauses($qb, $this->rollingDateConverter->convert($data['calc_date'])); diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php index 533f6cd60..26361858b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonHavingAccompanyingPeriod.php @@ -49,18 +49,14 @@ class ListPersonHavingAccompanyingPeriod implements ExportElementValidatedInterf private ListPersonHelper $listPersonHelper; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( ExportAddressHelper $addressHelper, ListPersonHelper $listPersonHelper, EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->addressHelper = $addressHelper; $this->listPersonHelper = $listPersonHelper; $this->entityManager = $em; - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder) @@ -195,7 +191,7 @@ class ListPersonHavingAccompanyingPeriod implements ExportElementValidatedInterf $this->listPersonHelper->addSelect($qb, $fields, $data['address_date']); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb ->addOrderBy('person.lastName') diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php index 0a1819884..958d52111 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php @@ -51,7 +51,6 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter, - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) {} public function buildForm(FormBuilderInterface $builder) @@ -135,7 +134,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte $this->listPersonHelper->addSelect($qb, ListPersonHelper::FIELDS, $this->rollingDateConverter->convert($data['address_date'])); $this->listAccompanyingPeriodHelper->addSelectClauses($qb, $this->rollingDateConverter->convert($data['address_date'])); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); $qb ->addOrderBy('person.lastName') diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index e558163dc..ab12310c2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -32,14 +32,10 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn { private EntityRepository $repository; - private AccompanyingCourseExportHelper $accompanyingCourseExportHelper; - public function __construct( EntityManagerInterface $em, - AccompanyingCourseExportHelper $accompanyingCourseExportHelper ) { $this->repository = $em->getRepository(AccompanyingPeriod::class); - $this->accompanyingCourseExportHelper = $accompanyingCourseExportHelper; } public function buildForm(FormBuilderInterface $builder): void @@ -147,7 +143,7 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn ->setParameter('count_acp_step', AccompanyingPeriod::STEP_DRAFT) ->setParameter('authorized_centers', $centers); - $this->accompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); + AccompanyingCourseExportHelper::addClosingMotiveExclusionClause($qb); return $qb; }