From 0d0a626f50dd23f2a0af6d211f9e921a2affb5eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Tue, 8 Apr 2025 12:38:52 +0200 Subject: [PATCH] Implements return types on aggregators --- .../ACPAggregators/ByActivityNumberAggregator.php | 2 +- .../ACPAggregators/ByActivityTypeAggregator.php | 2 +- .../ACPAggregators/BySocialActionAggregator.php | 2 +- .../ACPAggregators/BySocialIssueAggregator.php | 2 +- .../Aggregator/ActivityLocationAggregator.php | 2 +- .../Aggregator/ActivityPresenceAggregator.php | 2 +- .../Export/Aggregator/ActivityReasonAggregator.php | 2 +- .../Export/Aggregator/ActivityTypeAggregator.php | 2 +- .../Export/Aggregator/ActivityUserAggregator.php | 2 +- .../Export/Aggregator/ActivityUsersAggregator.php | 2 +- .../Aggregator/ActivityUsersJobAggregator.php | 2 +- .../Aggregator/ActivityUsersScopeAggregator.php | 2 +- .../Export/Aggregator/ByCreatorAggregator.php | 2 +- .../Export/Aggregator/ByThirdpartyAggregator.php | 2 +- .../Export/Aggregator/CreatorJobAggregator.php | 2 +- .../Export/Aggregator/CreatorScopeAggregator.php | 2 +- .../Export/Aggregator/DateAggregator.php | 2 +- .../Export/Aggregator/LocationTypeAggregator.php | 2 +- .../PersonAggregators/HouseholdAggregator.php | 2 +- .../PersonAggregators/PersonAggregator.php | 2 +- .../Export/Aggregator/PersonsAggregator.php | 2 +- .../Export/Aggregator/ByActivityTypeAggregator.php | 2 +- .../src/Export/Aggregator/ByLocationAggregator.php | 2 +- .../src/Export/Aggregator/ByUserJobAggregator.php | 2 +- .../src/Export/Aggregator/ByUserScopeAggregator.php | 2 +- .../Export/Aggregator/AgentAggregator.php | 2 +- .../Export/Aggregator/CancelReasonAggregator.php | 2 +- .../Export/Aggregator/JobAggregator.php | 2 +- .../Export/Aggregator/LocationAggregator.php | 2 +- .../Export/Aggregator/LocationTypeAggregator.php | 2 +- .../Export/Aggregator/MonthYearAggregator.php | 2 +- .../Export/Aggregator/ScopeAggregator.php | 2 +- .../Export/Aggregator/UrgencyAggregator.php | 2 +- .../Export/Aggregator/EventDateAggregator.php | 2 +- .../Export/Aggregator/EventTypeAggregator.php | 2 +- .../Export/Aggregator/RoleAggregator.php | 2 +- .../Export/ExportDataNormalizerTrait.php | 2 +- .../Tests/Export/SortExportElementTest.php | 2 +- .../AdministrativeLocationAggregator.php | 2 +- .../ByActionNumberAggregator.php | 2 +- .../ClosingDateAggregator.php | 2 +- .../ClosingMotiveAggregator.php | 2 +- .../ConfidentialAggregator.php | 2 +- .../CreatorJobAggregator.php | 2 +- .../DurationAggregator.php | 2 +- .../EmergencyAggregator.php | 2 +- .../EvaluationAggregator.php | 2 +- .../GeographicalUnitStatAggregator.php | 2 +- .../IntensityAggregator.php | 2 +- .../JobWorkingOnCourseAggregator.php | 2 +- .../OpeningDateAggregator.php | 2 +- .../OriginAggregator.php | 2 +- .../PersonParticipatingAggregator.php | 2 +- .../ReferrerAggregator.php | 2 +- .../ReferrerScopeAggregator.php | 2 +- .../RequestorAggregator.php | 2 +- .../ScopeAggregator.php | 2 +- .../ScopeWorkingOnCourseAggregator.php | 2 +- .../SocialActionAggregator.php | 2 +- .../SocialIssueAggregator.php | 2 +- .../StepAggregator.php | 2 +- .../UserJobAggregator.php | 2 +- .../UserWorkingOnCourseAggregator.php | 2 +- .../ByClosingMotiveAggregator.php | 2 +- .../ByDateAggregator.php | 2 +- .../ByStepAggregator.php | 2 +- .../EvaluationAggregators/ByEndDateAggregator.php | 2 +- .../EvaluationAggregators/ByMaxDateAggregator.php | 2 +- .../EvaluationAggregators/ByStartDateAggregator.php | 2 +- .../EvaluationTypeAggregator.php | 2 +- .../HavingEndDateAggregator.php | 2 +- .../ChildrenNumberAggregator.php | 2 +- .../HouseholdAggregators/CompositionAggregator.php | 2 +- .../AdministrativeStatusAggregator.php | 2 +- .../Aggregator/PersonAggregators/AgeAggregator.php | 2 +- .../ByHouseholdCompositionAggregator.php | 2 +- .../PersonAggregators/CenterAggregator.php | 2 +- .../PersonAggregators/CountryOfBirthAggregator.php | 2 +- .../EmploymentStatusAggregator.php | 2 +- .../PersonAggregators/GenderAggregator.php | 2 +- .../GeographicalUnitAggregator.php | 2 +- .../HouseholdPositionAggregator.php | 2 +- .../PersonAggregators/MaritalStatusAggregator.php | 2 +- .../PersonAggregators/NationalityAggregator.php | 2 +- .../PersonAggregators/PostalCodeAggregator.php | 2 +- .../SocialWorkAggregators/ActionTypeAggregator.php | 2 +- .../SocialWorkAggregators/CreatorAggregator.php | 2 +- .../SocialWorkAggregators/CreatorJobAggregator.php | 2 +- .../CreatorScopeAggregator.php | 2 +- .../CurrentActionAggregator.php | 2 +- .../SocialWorkAggregators/GoalAggregator.php | 2 +- .../SocialWorkAggregators/GoalResultAggregator.php | 2 +- .../HandlingThirdPartyAggregator.php | 2 +- .../SocialWorkAggregators/JobAggregator.php | 2 +- .../SocialWorkAggregators/ReferrerAggregator.php | 2 +- .../SocialWorkAggregators/ResultAggregator.php | 2 +- .../SocialWorkAggregators/ScopeAggregator.php | 2 +- .../Export/Export/CountAccompanyingCourse.php | 5 +++-- .../AccompanyingCourseFilters/CreatorJobFilter.php | 13 +++++++------ .../ChillReportBundle/Export/Export/ReportList.php | 6 ++++-- 100 files changed, 111 insertions(+), 107 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityNumberAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityNumberAggregator.php index 10559aa57..e304a9d7f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityNumberAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityNumberAggregator.php @@ -61,7 +61,7 @@ class ByActivityNumberAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php index d92efc4ee..79af0d8fe 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByActivityTypeAggregator.php @@ -69,7 +69,7 @@ final readonly class ByActivityTypeAggregator implements AggregatorInterface ]; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php index 9ceba56ae..8585f79e5 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -67,7 +67,7 @@ class BySocialActionAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php index 9aaccb39b..8932abaf0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -67,7 +67,7 @@ class BySocialIssueAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php index ff79fc507..007b42fdb 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityLocationAggregator.php @@ -64,7 +64,7 @@ final readonly class ActivityLocationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php index 45a63c767..1a161840a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityPresenceAggregator.php @@ -44,7 +44,7 @@ final readonly class ActivityPresenceAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php index efdcec193..58b8788cc 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityReasonAggregator.php @@ -111,7 +111,7 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali ]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) use ($data) { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index fe53edb68..b7cb73021 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -69,7 +69,7 @@ class ActivityTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index e1219a16a..6a8f1875b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -68,7 +68,7 @@ class ActivityUserAggregator implements AggregatorInterface return []; } - public function getLabels($key, $values, $data): \Closure + public function getLabels($key, $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php index 650b889fd..62594b0c0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersAggregator.php @@ -68,7 +68,7 @@ class ActivityUsersAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php index 09f98b2e2..14ffff521 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersJobAggregator.php @@ -87,7 +87,7 @@ class ActivityUsersJobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php index 7912ab5c7..260f4cd10 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUsersScopeAggregator.php @@ -87,7 +87,7 @@ class ActivityUsersScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php index f467f98a7..8da8019e9 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByCreatorAggregator.php @@ -63,7 +63,7 @@ class ByCreatorAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php index a1ea7bae8..ed4cc699e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ByThirdpartyAggregator.php @@ -67,7 +67,7 @@ class ByThirdpartyAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php index 6c2358959..d42fd48b4 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorJobAggregator.php @@ -87,7 +87,7 @@ class CreatorJobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php index c24a9c466..b50457a02 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/CreatorScopeAggregator.php @@ -87,7 +87,7 @@ class CreatorScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php index 852e71ee2..58321383e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/DateAggregator.php @@ -96,7 +96,7 @@ class DateAggregator implements AggregatorInterface return ['frequency' => self::DEFAULT_CHOICE]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value) use ($data): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php index cae8cf6b6..3497313df 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/LocationTypeAggregator.php @@ -67,7 +67,7 @@ class LocationTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php index 8c30a83d8..8eb3054c7 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/HouseholdAggregator.php @@ -49,7 +49,7 @@ final readonly class HouseholdAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (int|string|null $value): string|int { if ('_header' === $value) { diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php index ee741b87e..cff7e26d2 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/PersonAggregator.php @@ -46,7 +46,7 @@ final readonly class PersonAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.person.by_person.person'); } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php index 29bbd41c9..b9189001c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonsAggregator.php @@ -52,7 +52,7 @@ final readonly class PersonsAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { if ($key !== self::PREFIX.'_pid') { throw new \UnexpectedValueException('this key should not be handled: '.$key); diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php index 4a3bae3de..fff522ef1 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByActivityTypeAggregator.php @@ -66,7 +66,7 @@ class ByActivityTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php index c90ecfdaa..1c9ae467e 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php @@ -46,7 +46,7 @@ class ByLocationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php index 9ad222be7..6a34acf81 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserJobAggregator.php @@ -87,7 +87,7 @@ class ByUserJobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php index f7f69f042..f5d74490a 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByUserScopeAggregator.php @@ -86,7 +86,7 @@ class ByUserScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index 8c109b034..40be6542d 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -67,7 +67,7 @@ final readonly class AgentAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index f2647b23e..718fcd8bd 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -68,7 +68,7 @@ class CancelReasonAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index c5f8c9854..420ff8d2f 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -87,7 +87,7 @@ final readonly class JobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index e0d4e8381..94bc0fdea 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -65,7 +65,7 @@ final readonly class LocationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index 1a11eaf3e..f84c6b3d7 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -67,7 +67,7 @@ final readonly class LocationTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php index 0ce7e71c5..ea899ef54 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -60,7 +60,7 @@ class MonthYearAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return static function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php index 21ed82015..85dac1f3e 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -87,7 +87,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php index d4651c5dc..cc5114a4f 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/UrgencyAggregator.php @@ -69,7 +69,7 @@ class UrgencyAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php index 2cbd78881..bdb28f9c3 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventDateAggregator.php @@ -96,7 +96,7 @@ class EventDateAggregator implements AggregatorInterface return ['frequency' => self::DEFAULT_CHOICE]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value) use ($data): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php index b4ad32770..7aafb3791 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/EventTypeAggregator.php @@ -69,7 +69,7 @@ class EventTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php index 105856391..20f663d4e 100644 --- a/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php +++ b/src/Bundle/ChillEventBundle/Export/Aggregator/RoleAggregator.php @@ -69,7 +69,7 @@ class RoleAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillMainBundle/Export/ExportDataNormalizerTrait.php b/src/Bundle/ChillMainBundle/Export/ExportDataNormalizerTrait.php index 44cdc8310..df15653e4 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportDataNormalizerTrait.php +++ b/src/Bundle/ChillMainBundle/Export/ExportDataNormalizerTrait.php @@ -19,7 +19,7 @@ trait ExportDataNormalizerTrait /** * @param object|list $entity */ - public function normalizeDoctrineEntity(object|array $entity): array|int + public function normalizeDoctrineEntity(object|array|null $entity): array|int { if (is_array($entity)) { return array_values(array_filter(array_map(static fn (object $entity) => $entity->getId(), $entity), fn ($value) => null !== $value)); diff --git a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php index 614e01a25..6719b9699 100644 --- a/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Export/SortExportElementTest.php @@ -141,7 +141,7 @@ class SortExportElementTest extends KernelTestCase return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return fn ($v) => $v; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php index 705cd9584..859e9868b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php @@ -67,7 +67,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ByActionNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ByActionNumberAggregator.php index 1e4172d74..ae0a09930 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ByActionNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ByActionNumberAggregator.php @@ -60,7 +60,7 @@ class ByActionNumberAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php index 51e1a7759..27f0a3351 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingDateAggregator.php @@ -61,7 +61,7 @@ final readonly class ClosingDateAggregator implements AggregatorInterface ]; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (?string $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php index eb2f738d5..f8ded2b9c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php @@ -63,7 +63,7 @@ class ClosingMotiveAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index 7ca6e0de5..dfd125824 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -62,7 +62,7 @@ class ConfidentialAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php index dda30dec2..236504735 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/CreatorJobAggregator.php @@ -100,7 +100,7 @@ class CreatorJobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php index 74942be44..83148ec0b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php @@ -85,7 +85,7 @@ final readonly class DurationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value) use ($data) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index 407055421..557ae37df 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -62,7 +62,7 @@ class EmergencyAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index 69825b9a1..c21e711a9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -71,7 +71,7 @@ final readonly class EvaluationAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php index 64a14eb1c..3bfc6d740 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/GeographicalUnitStatAggregator.php @@ -149,7 +149,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return match ($key) { 'acp_geog_agg_unitname' => static function ($value): string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index f6505a503..4736a8394 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -62,7 +62,7 @@ class IntensityAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php index 708680928..c153d5036 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php @@ -94,7 +94,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $jobId) { if (null === $jobId || '' === $jobId) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php index 3f26fce90..8ed8f9b89 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OpeningDateAggregator.php @@ -61,7 +61,7 @@ final readonly class OpeningDateAggregator implements AggregatorInterface ]; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (?string $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php index 5ae5bab6b..1198cd2d8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php @@ -76,7 +76,7 @@ final readonly class OriginAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php index 0899aa872..1e719a176 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/PersonParticipatingAggregator.php @@ -50,7 +50,7 @@ final readonly class PersonParticipatingAggregator implements AggregatorInterfac return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return match ($key) { self::KEY => $this->labelPersonHelper->getLabel($key, $values, 'export.aggregator.course.by-user.header'), diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index d97df36dc..cd07f0967 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -117,7 +117,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran return $data; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php index 444c4e8a2..8d4f556b6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerScopeAggregator.php @@ -123,7 +123,7 @@ readonly class ReferrerScopeAggregator implements AggregatorInterface, DataTrans return $data; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php index 114c207ce..c71e3e525 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/RequestorAggregator.php @@ -83,7 +83,7 @@ final readonly class RequestorAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index 47adb1747..d28399acd 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -67,7 +67,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php index 020b8559d..3ca9be3c3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php @@ -94,7 +94,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $scopeId) { if (null === $scopeId || '' === $scopeId) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index b22a5610a..a67895b0c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -68,7 +68,7 @@ final readonly class SocialActionAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php index 192ea4a5a..b42dbebc5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php @@ -68,7 +68,7 @@ final readonly class SocialIssueAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index 68a6ab755..3c6f2aaaa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -88,7 +88,7 @@ final readonly class StepAggregator implements AggregatorInterface return ['on_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { switch ($value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php index 8f9b7560f..d8a5fbd22 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserJobAggregator.php @@ -123,7 +123,7 @@ final readonly class UserJobAggregator implements AggregatorInterface, DataTrans return $data; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php index 4d94c2bdf..d257111ce 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php @@ -54,7 +54,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac return []; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): closure { return function (int|string|null $userId) { if (null === $userId || '' === $userId) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php index c15d92067..c17fea02d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByClosingMotiveAggregator.php @@ -52,7 +52,7 @@ final readonly class ByClosingMotiveAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php index 1968e5f1b..20bdec4ec 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByDateAggregator.php @@ -59,7 +59,7 @@ final readonly class ByDateAggregator implements AggregatorInterface return ['frequency' => DateGroupingChoiceEnum::YEAR->value]; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (?string $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php index 95f3dcb58..09924a9e0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingPeriodStepHistoryAggregators/ByStepAggregator.php @@ -54,7 +54,7 @@ final readonly class ByStepAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (?string $step): string { if ('_header' === $step) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php index 29a4284f0..9d9139c43 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByEndDateAggregator.php @@ -81,7 +81,7 @@ final class ByEndDateAggregator implements AggregatorInterface return ['frequency' => self::DEFAULT_CHOICE]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php index bd7309ba0..421632c76 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByMaxDateAggregator.php @@ -81,7 +81,7 @@ final class ByMaxDateAggregator implements AggregatorInterface return ['frequency' => self::DEFAULT_CHOICE]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php index b44c50cc9..d07cd60e9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/ByStartDateAggregator.php @@ -81,7 +81,7 @@ final class ByStartDateAggregator implements AggregatorInterface return ['frequency' => self::DEFAULT_CHOICE]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index 4915d21ed..d4e337581 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -63,7 +63,7 @@ class EvaluationTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php index beeb29fca..1af0e6678 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/HavingEndDateAggregator.php @@ -63,7 +63,7 @@ class HavingEndDateAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index 71dffe74a..f4d2cb5db 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -83,7 +83,7 @@ class ChildrenNumberAggregator implements AggregatorInterface return ['on_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return static function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 2b765c91f..88e68feb3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -85,7 +85,7 @@ class CompositionAggregator implements AggregatorInterface return ['on_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php index 6d185abc4..313d7bcb8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AdministrativeStatusAggregator.php @@ -62,7 +62,7 @@ final readonly class AdministrativeStatusAggregator implements AggregatorInterfa return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php index 966326dbb..dc1913f7d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php @@ -70,7 +70,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement return ['date_age_calculation' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php index d5504361b..763c99088 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/ByHouseholdCompositionAggregator.php @@ -103,7 +103,7 @@ class ByHouseholdCompositionAggregator implements AggregatorInterface return ['date_calc' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php index bd02e6800..6f4082d46 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php @@ -58,7 +58,7 @@ final readonly class CenterAggregator implements AggregatorInterface ]; } - public function getLabels($key, array $values, $data): \Closure + public function getLabels($key, array $values, $data): callable { return function (int|string|null $value) { if (null === $value || '' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index 840af42b1..fbdcb6455 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -112,7 +112,7 @@ final readonly class CountryOfBirthAggregator implements AggregatorInterface, Ex return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { $labels = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php index ef4366e30..caf174cb3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/EmploymentStatusAggregator.php @@ -62,7 +62,7 @@ final readonly class EmploymentStatusAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php index 9913be9c8..4333e7f1d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php @@ -63,7 +63,7 @@ final readonly class GenderAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function (int|string|null $value) { if (null === $value || '' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php index 4f3dd2973..3227099b0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GeographicalUnitAggregator.php @@ -127,7 +127,7 @@ final readonly class GeographicalUnitAggregator implements AggregatorInterface return 'person_geog_agg'; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return match ($key) { 'geog_unit_name' => static function ($value): string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index e5c853c94..f28ccfd61 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -94,7 +94,7 @@ final readonly class HouseholdPositionAggregator implements AggregatorInterface, return ['date_position' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index a0cbf9ad6..4a193fbd7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -67,7 +67,7 @@ final readonly class MaritalStatusAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index af1159933..a7b11f28f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -109,7 +109,7 @@ final readonly class NationalityAggregator implements AggregatorInterface, Expor ]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { $labels = []; diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php index 0cfa5515d..7a0240e9c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/PostalCodeAggregator.php @@ -56,7 +56,7 @@ final readonly class PostalCodeAggregator implements AggregatorInterface return ['calc_date' => new RollingDate(RollingDate::T_TODAY)]; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function (int|string|null $value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php index cdacef278..a667a8a43 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php @@ -76,7 +76,7 @@ final readonly class ActionTypeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return match ($key) { 'action_type_aggregator' => function ($value): string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php index 753296283..6f3faeece 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorAggregator.php @@ -68,7 +68,7 @@ class CreatorAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php index fff458f05..e5f08c03d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorJobAggregator.php @@ -85,7 +85,7 @@ class CreatorJobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php index 48804cd16..1e59ad991 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CreatorScopeAggregator.php @@ -85,7 +85,7 @@ class CreatorScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php index faaa2b815..b6c74c2c4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/CurrentActionAggregator.php @@ -66,7 +66,7 @@ class CurrentActionAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php index d5419da2c..d5be32ca8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php @@ -67,7 +67,7 @@ final readonly class GoalAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php index 2bd457890..befdf8904 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalResultAggregator.php @@ -73,7 +73,7 @@ class GoalResultAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value) use ($key): string { if (null === $value || '' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php index e5f0e4285..d5f335184 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/HandlingThirdPartyAggregator.php @@ -52,7 +52,7 @@ final readonly class HandlingThirdPartyAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, mixed $data) + public function getLabels($key, array $values, mixed $data): callable { return $this->labelThirdPartyHelper->getLabel($key, $values, 'export.aggregator.course_work.by_handling_third_party.header'); } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index fcd6112a2..c795e0193 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -80,7 +80,7 @@ final readonly class JobAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php index c8e431479..de0dceec3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -85,7 +85,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface ]; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php index 54702a935..df856cc56 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php @@ -67,7 +67,7 @@ final readonly class ResultAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index d40f0bb00..9c1e37469 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -80,7 +80,7 @@ final readonly class ScopeAggregator implements AggregatorInterface return []; } - public function getLabels($key, array $values, $data) + public function getLabels($key, array $values, $data): callable { return function ($value): string { if ('_header' === $value) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 40a0a6c40..73055c6a2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -26,6 +26,7 @@ use Doctrine\ORM\Query; use Doctrine\ORM\QueryBuilder; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Translation\TranslatableMessage; class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface { @@ -102,9 +103,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); } - public function getTitle(): string + public function getTitle(): TranslatableMessage { - return 'Count accompanying courses'; + return new TranslatableMessage('Count accompanying courses'); } public function getType(): string diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php index f8bfca0d1..88720573b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CreatorJobFilter.php @@ -21,6 +21,7 @@ use Doctrine\ORM\Query\Expr\Join; use Doctrine\ORM\QueryBuilder; use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; +use Symfony\Component\Translation\TranslatableMessage; final readonly class CreatorJobFilter implements FilterInterface { @@ -114,19 +115,19 @@ final readonly class CreatorJobFilter implements FilterInterface return ['creator_job' => $this->denormalizeDoctrineEntity($formData['creator_job'], $this->userJobRepository)]; } - public function describeAction($data, $format = 'string'): array + public function describeAction($data, $format = 'string'): TranslatableMessage { $creatorJobs = []; foreach ($data['creator_job'] as $j) { $creatorJobs[] = $this->translatableStringHelper->localize( - $j->getLabel() + $j->getLabel(), ); } - return ['export.filter.course.creator_job.Filtered by creator job: only %jobs%', [ + return new TranslatableMessage('export.filter.course.creator_job.Filtered by creator job: only %jobs%', [ '%jobs%' => implode(', ', $creatorJobs), - ]]; + ]); } public function getFormDefaultData(): array @@ -136,8 +137,8 @@ final readonly class CreatorJobFilter implements FilterInterface ]; } - public function getTitle(): string + public function getTitle(): TranslatableMessage { - return 'export.filter.course.creator_job.Filter by creator job'; + return new TranslatableMessage('export.filter.course.creator_job.Filter by creator job'); } } diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php index 75f1d6e8a..974a20cc5 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php @@ -26,7 +26,9 @@ use Chill\PersonBundle\Export\Declarations; use Chill\ReportBundle\Entity\Report; use Chill\ReportBundle\Security\Authorization\ReportVoter; use Doctrine\ORM\EntityManagerInterface; +use Doctrine\ORM\NativeQuery; use Doctrine\ORM\Query; +use Doctrine\ORM\QueryBuilder; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Validator\Constraints\Callback; @@ -34,7 +36,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; use Symfony\Contracts\Translation\TranslatorInterface; /** - * @template-implements ListInterface + * @template-implements ListInterface, address_date: \DateTime}> */ class ReportList implements ExportElementValidatedInterface, ListInterface { @@ -286,7 +288,7 @@ class ReportList implements ExportElementValidatedInterface, ListInterface return [...$fields, ...\array_keys($this->slugs)]; } - public function getResult($query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array + public function getResult(QueryBuilder|NativeQuery $query, $data, \Chill\MainBundle\Export\ExportGenerationContext $context): array { return $query->getQuery()->getResult(Query::HYDRATE_SCALAR); }