From 75bdc335e59f030fa175d683883a2e555dd61d40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Mon, 5 Sep 2022 17:26:36 +0200 Subject: [PATCH] remove usage of deprecated Role into Export --- .../Aggregator/ACPAggregators/BySocialActionAggregator.php | 2 +- .../Aggregator/ACPAggregators/BySocialIssueAggregator.php | 2 +- .../Aggregator/ACPAggregators/ByThirdpartyAggregator.php | 2 +- .../Export/Aggregator/ACPAggregators/ByUserAggregator.php | 2 +- .../Export/Aggregator/ACPAggregators/DateAggregator.php | 2 +- .../Aggregator/ACPAggregators/LocationTypeAggregator.php | 2 +- .../Aggregator/ACPAggregators/UserScopeAggregator.php | 2 +- .../Export/Aggregator/ActivityTypeAggregator.php | 4 ++-- .../Export/Aggregator/ActivityUserAggregator.php | 4 ++-- .../PersonAggregators/ActivityReasonAggregator.php | 4 ++-- .../Export/Export/LinkedToACP/AvgActivityDuration.php | 4 ++-- .../Export/Export/LinkedToACP/AvgActivityVisitDuration.php | 4 ++-- .../Export/Export/LinkedToACP/CountActivity.php | 4 ++-- .../Export/Export/LinkedToACP/SumActivityDuration.php | 4 ++-- .../Export/Export/LinkedToACP/SumActivityVisitDuration.php | 4 ++-- .../Export/Export/LinkedToPerson/CountActivity.php | 4 ++-- .../Export/Export/LinkedToPerson/ListActivity.php | 4 ++-- .../Export/Export/LinkedToPerson/StatActivityDuration.php | 4 ++-- .../Export/Filter/ACPFilters/BySocialActionFilter.php | 2 +- .../Export/Filter/ACPFilters/BySocialIssueFilter.php | 2 +- .../Export/Filter/ACPFilters/ByUserFilter.php | 2 +- .../Export/Filter/ACPFilters/EmergencyFilter.php | 2 +- .../Export/Filter/ACPFilters/LocationTypeFilter.php | 2 +- .../Export/Filter/ACPFilters/SentReceivedFilter.php | 2 +- .../Export/Filter/ACPFilters/UserFilter.php | 2 +- .../Export/Filter/ACPFilters/UserScopeFilter.php | 2 +- .../Export/Filter/ActivityDateFilter.php | 2 +- .../Export/Filter/ActivityTypeFilter.php | 4 ++-- .../Export/Filter/PersonFilters/ActivityReasonFilter.php | 4 ++-- .../PersonFilters/PersonHavingActivityBetweenDateFilter.php | 2 +- .../Export/Aggregator/AgentAggregator.php | 2 +- .../Export/Aggregator/CancelReasonAggregator.php | 2 +- .../ChillCalendarBundle/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 +- .../ChillCalendarBundle/Export/Export/CountAppointments.php | 4 ++-- .../Export/Export/StatAppointmentAvgDuration.php | 4 ++-- .../Export/Export/StatAppointmentSumDuration.php | 4 ++-- .../ChillCalendarBundle/Export/Filter/AgentFilter.php | 2 +- .../Export/Filter/BetweenDatesFilter.php | 2 +- src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php | 2 +- .../ChillCalendarBundle/Export/Filter/ScopeFilter.php | 2 +- src/Bundle/ChillMainBundle/Export/ExportInterface.php | 4 +--- src/Bundle/ChillMainBundle/Export/ExportManager.php | 2 +- src/Bundle/ChillMainBundle/Export/ModifierInterface.php | 4 ++-- .../AdministrativeLocationAggregator.php | 2 +- .../ClosingMotiveAggregator.php | 2 +- .../ConfidentialAggregator.php | 2 +- .../AccompanyingCourseAggregators/DurationAggregator.php | 2 +- .../AccompanyingCourseAggregators/EmergencyAggregator.php | 2 +- .../AccompanyingCourseAggregators/EvaluationAggregator.php | 2 +- .../AccompanyingCourseAggregators/IntensityAggregator.php | 2 +- .../AccompanyingCourseAggregators/JobAggregator.php | 2 +- .../AccompanyingCourseAggregators/OriginAggregator.php | 2 +- .../AccompanyingCourseAggregators/ReferrerAggregator.php | 2 +- .../AccompanyingCourseAggregators/ScopeAggregator.php | 2 +- .../SocialActionAggregator.php | 2 +- .../AccompanyingCourseAggregators/SocialIssueAggregator.php | 2 +- .../AccompanyingCourseAggregators/StepAggregator.php | 2 +- .../EvaluationAggregators/EvaluationTypeAggregator.php | 2 +- .../HouseholdAggregators/ChildrenNumberAggregator.php | 2 +- .../HouseholdAggregators/CompositionAggregator.php | 2 +- .../Export/Aggregator/PersonAggregators/AgeAggregator.php | 2 +- .../PersonAggregators/CountryOfBirthAggregator.php | 2 +- .../Aggregator/PersonAggregators/GenderAggregator.php | 2 +- .../PersonAggregators/HouseholdPositionAggregator.php | 2 +- .../PersonAggregators/MaritalStatusAggregator.php | 2 +- .../Aggregator/PersonAggregators/NationalityAggregator.php | 2 +- .../SocialWorkAggregators/ActionTypeAggregator.php | 2 +- .../Aggregator/SocialWorkAggregators/GoalAggregator.php | 2 +- .../Aggregator/SocialWorkAggregators/JobAggregator.php | 2 +- .../Aggregator/SocialWorkAggregators/ReferrerAggregator.php | 2 +- .../Aggregator/SocialWorkAggregators/ResultAggregator.php | 2 +- .../Aggregator/SocialWorkAggregators/ScopeAggregator.php | 2 +- .../Export/Export/CountAccompanyingCourse.php | 4 ++-- .../ChillPersonBundle/Export/Export/CountEvaluation.php | 4 ++-- .../ChillPersonBundle/Export/Export/CountHousehold.php | 6 +++--- src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php | 4 ++-- .../Export/Export/CountPersonWithAccompanyingCourse.php | 4 ++-- .../Export/Export/CountSocialWorkActions.php | 5 ++--- src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php | 4 ++-- .../Export/Export/StatAccompanyingCourseDuration.php | 4 ++-- .../Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php | 2 +- .../ActiveOneDayBetweenDatesFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/ActivityTypeFilter.php | 2 +- .../AdministrativeLocationFilter.php | 2 +- .../AccompanyingCourseFilters/ClosingMotiveFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/ConfidentialFilter.php | 2 +- .../AccompanyingCourseFilters/CurrentUserJobFilter.php | 2 +- .../AccompanyingCourseFilters/CurrentUserScopeFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/EmergencyFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/EvaluationFilter.php | 2 +- .../GeographicalUnitStatFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/IntensityFilter.php | 2 +- .../AccompanyingCourseFilters/OpenBetweenDatesFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/OriginFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/ReferrerFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/RequestorFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/SocialActionFilter.php | 2 +- .../Filter/AccompanyingCourseFilters/SocialIssueFilter.php | 2 +- .../Export/Filter/AccompanyingCourseFilters/StepFilter.php | 2 +- .../Filter/EvaluationFilters/EvaluationTypeFilter.php | 2 +- .../Export/Filter/EvaluationFilters/MaxDateFilter.php | 2 +- .../Export/Filter/HouseholdFilters/CompositionFilter.php | 2 +- .../PersonFilters/AccompanyingPeriodClosingFilter.php | 2 +- .../Filter/PersonFilters/AccompanyingPeriodFilter.php | 2 +- .../PersonFilters/AccompanyingPeriodOpeningFilter.php | 2 +- .../Export/Filter/PersonFilters/AgeFilter.php | 2 +- .../Export/Filter/PersonFilters/BirthdateFilter.php | 2 +- .../Export/Filter/PersonFilters/DeadOrAliveFilter.php | 2 +- .../Export/Filter/PersonFilters/DeathdateFilter.php | 2 +- .../Export/Filter/PersonFilters/FamilySituationFilter.php | 2 +- .../Export/Filter/PersonFilters/GenderFilter.php | 2 +- .../Export/Filter/PersonFilters/NationalityFilter.php | 2 +- .../PersonFilters/ResidentialAddressAtThirdpartyFilter.php | 2 +- .../Filter/PersonFilters/ResidentialAddressAtUserFilter.php | 2 +- .../Export/Filter/SocialWorkFilters/JobFilter.php | 2 +- .../Export/Filter/SocialWorkFilters/ReferrerFilter.php | 2 +- .../Export/Filter/SocialWorkFilters/ScopeFilter.php | 2 +- .../Filter/SocialWorkFilters/SocialWorkTypeFilter.php | 2 +- .../Security/Authorization/HouseholdVoter.php | 2 ++ src/Bundle/ChillReportBundle/Export/Export/ReportList.php | 4 ++-- .../ChillReportBundle/Export/Filter/ReportDateFilter.php | 2 +- 125 files changed, 153 insertions(+), 154 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php index 62b160bc1..19299eb6a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialActionAggregator.php @@ -33,7 +33,7 @@ class BySocialActionAggregator implements AggregatorInterface $this->actionRepository = $actionRepository; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php index ff70e54b9..672076693 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/BySocialIssueAggregator.php @@ -33,7 +33,7 @@ class BySocialIssueAggregator implements AggregatorInterface $this->issueRender = $issueRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php index ce70a9ddb..81822e801 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByThirdpartyAggregator.php @@ -33,7 +33,7 @@ class ByThirdpartyAggregator implements AggregatorInterface $this->thirdPartyRender = $thirdPartyRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php index d57410c4b..55df3febd 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/ByUserAggregator.php @@ -33,7 +33,7 @@ class ByUserAggregator implements AggregatorInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php index 3463b1c59..87af1629a 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/DateAggregator.php @@ -38,7 +38,7 @@ class DateAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php index c5f43cc64..9664060da 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/LocationTypeAggregator.php @@ -33,7 +33,7 @@ class LocationTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php index 67c2d8db1..c05196375 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ACPAggregators/UserScopeAggregator.php @@ -33,7 +33,7 @@ class UserScopeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php index 3637d70c6..a85fb5908 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityTypeAggregator.php @@ -39,9 +39,9 @@ class ActivityTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php index 6d6d3a837..6edafba66 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/ActivityUserAggregator.php @@ -37,9 +37,9 @@ class ActivityUserAggregator implements AggregatorInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) diff --git a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php index 8db93265d..e65d4586b 100644 --- a/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php +++ b/src/Bundle/ChillActivityBundle/Export/Aggregator/PersonAggregators/ActivityReasonAggregator.php @@ -48,9 +48,9 @@ class ActivityReasonAggregator implements AggregatorInterface, ExportElementVali $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index d06116787..abcb40327 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -92,9 +92,9 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php index 535fe3d85..e247ba820 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityVisitDuration.php @@ -92,9 +92,9 @@ class AvgActivityVisitDuration implements ExportInterface, GroupedExportInterfac return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index cefb5e0e9..792659633 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -93,9 +93,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php index 7ba914ee5..8c417769d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityDuration.php @@ -92,9 +92,9 @@ class SumActivityDuration implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php index c3f7ef243..197020f3e 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/SumActivityVisitDuration.php @@ -92,9 +92,9 @@ class SumActivityVisitDuration implements ExportInterface, GroupedExportInterfac return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index 84baf657a..f920fcb27 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -97,9 +97,9 @@ class CountActivity implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers() diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php index 387ea8821..601188fae 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/ListActivity.php @@ -275,9 +275,9 @@ class ListActivity implements ListInterface, GroupedExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::LISTS); + return ActivityStatsVoter::LISTS; } public function supportsModifiers() diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index ebba5ad82..a628f6706 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -127,9 +127,9 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface ->setParameter(':centers', $centers); } - public function requiredRole() + public function requiredRole(): string { - return new Role(ActivityStatsVoter::STATS); + return ActivityStatsVoter::STATS; } public function supportsModifiers() diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php index d110a829f..7c3508674 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialActionFilter.php @@ -30,7 +30,7 @@ class BySocialActionFilter implements FilterInterface $this->actionRender = $actionRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php index 66fa92dd4..a1b5ad1ba 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/BySocialIssueFilter.php @@ -30,7 +30,7 @@ class BySocialIssueFilter implements FilterInterface $this->issueRender = $issueRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php index 512dce874..75e9dfa16 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/ByUserFilter.php @@ -30,7 +30,7 @@ class ByUserFilter implements FilterInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php index 612ef3d3d..63650b452 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/EmergencyFilter.php @@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php index 4519dd63a..def2ac84d 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/LocationTypeFilter.php @@ -30,7 +30,7 @@ class LocationTypeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php index 7c878ac75..98cb50e89 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/SentReceivedFilter.php @@ -36,7 +36,7 @@ class SentReceivedFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php index ef865b3a8..b8d6d1a59 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserFilter.php @@ -29,7 +29,7 @@ class UserFilter implements FilterInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php index ae2ad2629..ba0f8cb75 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/UserScopeFilter.php @@ -30,7 +30,7 @@ class UserScopeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php index 65057cb1e..864562cbf 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityDateFilter.php @@ -33,7 +33,7 @@ class ActivityDateFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php index 665515cb1..548b611b0 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ActivityTypeFilter.php @@ -42,9 +42,9 @@ class ActivityTypeFilter implements ExportElementValidatedInterface, FilterInter $this->activityTypeRepository = $activityTypeRepository; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php index c0845573a..38d5f9d5f 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/ActivityReasonFilter.php @@ -44,9 +44,9 @@ class ActivityReasonFilter implements ExportElementValidatedInterface, FilterInt $this->activityReasonRepository = $activityReasonRepository; } - public function addRole() + public function addRole(): ?string { - return new Role(ActivityStatsVoter::STATS); + return null; } public function alterQuery(QueryBuilder $qb, $data) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php index c8c21f385..8db312e35 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/PersonFilters/PersonHavingActivityBetweenDateFilter.php @@ -52,7 +52,7 @@ class PersonHavingActivityBetweenDateFilter implements ExportElementValidatedInt $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php index af96dd474..795c4f3f5 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/AgentAggregator.php @@ -33,7 +33,7 @@ final class AgentAggregator implements AggregatorInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php index 2010fb90c..59e809fa0 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/CancelReasonAggregator.php @@ -33,7 +33,7 @@ class CancelReasonAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php index a2b300f24..fc2b48b12 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/JobAggregator.php @@ -33,7 +33,7 @@ final class JobAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php index 6d5a6476d..943fb0aab 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationAggregator.php @@ -29,7 +29,7 @@ final class LocationAggregator implements AggregatorInterface $this->locationRepository = $locationRepository; } - public function addRole(): ?Role + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php index 4ead075d5..a11060b95 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/LocationTypeAggregator.php @@ -33,7 +33,7 @@ final class LocationTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php index 42bac218d..35b79dcf8 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/MonthYearAggregator.php @@ -20,7 +20,7 @@ use Symfony\Component\Security\Core\Role\Role; class MonthYearAggregator implements AggregatorInterface { - public function addRole(): ?Role + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php index 891837aa7..6da361cb9 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php +++ b/src/Bundle/ChillCalendarBundle/Export/Aggregator/ScopeAggregator.php @@ -33,7 +33,7 @@ final class ScopeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php index 36864e92e..b9da17114 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/CountAppointments.php @@ -103,10 +103,10 @@ class CountAppointments implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { // which role should we give here? - return new Role(PersonVoter::STATS); + return PersonVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php index 1b4af1ce5..800ab1d55 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentAvgDuration.php @@ -97,9 +97,9 @@ class StatAppointmentAvgDuration implements ExportInterface, GroupedExportInterf return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php index 1960af2e4..ac8303abf 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php +++ b/src/Bundle/ChillCalendarBundle/Export/Export/StatAppointmentSumDuration.php @@ -97,9 +97,9 @@ class StatAppointmentSumDuration implements ExportInterface, GroupedExportInterf return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php index ee4e82350..1692e0b3a 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/AgentFilter.php @@ -29,7 +29,7 @@ class AgentFilter implements FilterInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php index 74b481abe..a76160a9b 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/BetweenDatesFilter.php @@ -21,7 +21,7 @@ use Symfony\Component\Form\FormBuilderInterface; class BetweenDatesFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index 562c3281e..ff168d2f8 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -35,7 +35,7 @@ class JobFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index 3ac1d0f1b..fb154bf61 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -35,7 +35,7 @@ class ScopeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillMainBundle/Export/ExportInterface.php b/src/Bundle/ChillMainBundle/Export/ExportInterface.php index 419d9b250..6319fbac9 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ExportInterface.php @@ -139,10 +139,8 @@ interface ExportInterface extends ExportElementInterface /** * Return the required Role to execute the Export. - * - * @return \Symfony\Component\Security\Core\Role\Role */ - public function requiredRole(); + public function requiredRole(): string; /** * Inform which ModifiersInterface (i.e. AggregatorInterface, FilterInterface) diff --git a/src/Bundle/ChillMainBundle/Export/ExportManager.php b/src/Bundle/ChillMainBundle/Export/ExportManager.php index ed24f1661..9ba9bc1a8 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportManager.php +++ b/src/Bundle/ChillMainBundle/Export/ExportManager.php @@ -550,7 +550,7 @@ class ExportManager if (null === $centers) { $centers = $this->authorizationHelper->getReachableCenters( $this->user, - $role->getRole(), + $role ); } diff --git a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php index 1265f52c4..ac8e3e692 100644 --- a/src/Bundle/ChillMainBundle/Export/ModifierInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ModifierInterface.php @@ -26,9 +26,9 @@ interface ModifierInterface extends ExportElementInterface * If null, will used the ExportInterface::requiredRole role from * the current executing export. * - * @return \Symfony\Component\Security\Core\Role\Role|null A role required to execute this ModifiersInterface + * @return string|null A role required to execute this ModifiersInterface */ - public function addRole(); + public function addRole(): ?string; /** * Alter the query initiated by the export, to add the required statements diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php index 69d1b265d..a1cf7160b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/AdministrativeLocationAggregator.php @@ -32,7 +32,7 @@ class AdministrativeLocationAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php index d525f2f9b..b0f8f98f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ClosingMotiveAggregator.php @@ -33,7 +33,7 @@ class ClosingMotiveAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php index 534ef268a..ec9bdd348 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ConfidentialAggregator.php @@ -27,7 +27,7 @@ class ConfidentialAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php index ba6a1d3df..ca09784e4 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/DurationAggregator.php @@ -35,7 +35,7 @@ class DurationAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php index 4bee25a39..f59491ec5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EmergencyAggregator.php @@ -27,7 +27,7 @@ class EmergencyAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php index 4c9fefe31..96c63b9cf 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/EvaluationAggregator.php @@ -33,7 +33,7 @@ final class EvaluationAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php index 5962654c0..711f7ec0d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/IntensityAggregator.php @@ -27,7 +27,7 @@ class IntensityAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php index c5c9c3180..6443cc02e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobAggregator.php @@ -32,7 +32,7 @@ final class JobAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php index 7c4ad76fd..b98edae32 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/OriginAggregator.php @@ -34,7 +34,7 @@ final class OriginAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php index 323a17e26..a1df6b559 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ReferrerAggregator.php @@ -32,7 +32,7 @@ final class ReferrerAggregator implements AggregatorInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php index 46187d558..c7b3142f2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeAggregator.php @@ -32,7 +32,7 @@ final class ScopeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php index f28cd559b..39ad085e3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialActionAggregator.php @@ -33,7 +33,7 @@ final class SocialActionAggregator implements AggregatorInterface $this->actionRepository = $actionRepository; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php index 362d8e666..7cb726673 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/SocialIssueAggregator.php @@ -32,7 +32,7 @@ final class SocialIssueAggregator implements AggregatorInterface $this->issueRender = $issueRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php index 7d3423a04..5c923fdc2 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/StepAggregator.php @@ -33,7 +33,7 @@ final class StepAggregator implements AggregatorInterface //, FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php index 6c20ae548..b4f5e0071 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/EvaluationAggregators/EvaluationTypeAggregator.php @@ -32,7 +32,7 @@ class EvaluationTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php index 417941a04..a4d15b7a5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/ChildrenNumberAggregator.php @@ -30,7 +30,7 @@ class ChildrenNumberAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php index 429431af6..fdb18e951 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/HouseholdAggregators/CompositionAggregator.php @@ -37,7 +37,7 @@ class CompositionAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php index 00dd93a4b..a2cbe3ba3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php @@ -29,7 +29,7 @@ final class AgeAggregator implements AggregatorInterface, ExportElementValidated $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php index f54bffd0b..4fac30f42 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CountryOfBirthAggregator.php @@ -42,7 +42,7 @@ final class CountryOfBirthAggregator implements AggregatorInterface, ExportEleme $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php index 1e0a7082b..0b94cbd4f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php @@ -28,7 +28,7 @@ final class GenderAggregator implements AggregatorInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php index 872b3f9f5..57da680ca 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/HouseholdPositionAggregator.php @@ -37,7 +37,7 @@ final class HouseholdPositionAggregator implements AggregatorInterface, ExportEl $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php index 4a9534a6d..5e39c6310 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/MaritalStatusAggregator.php @@ -30,7 +30,7 @@ final class MaritalStatusAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php index fcae239cb..eb58913c3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/NationalityAggregator.php @@ -41,7 +41,7 @@ final class NationalityAggregator implements AggregatorInterface, ExportElementV $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php index 3ead139ab..1cd7949d0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ActionTypeAggregator.php @@ -30,7 +30,7 @@ final class ActionTypeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php index b39f8bee0..d1f33ca7a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/GoalAggregator.php @@ -30,7 +30,7 @@ final class GoalAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php index c89219f2e..10c588809 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/JobAggregator.php @@ -32,7 +32,7 @@ final class JobAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php index a6ae042e5..efda6b783 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ReferrerAggregator.php @@ -32,7 +32,7 @@ final class ReferrerAggregator implements AggregatorInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php index fa750b486..9bdcebb60 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ResultAggregator.php @@ -30,7 +30,7 @@ final class ResultAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php index 0e1a7a044..ee2509977 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/SocialWorkAggregators/ScopeAggregator.php @@ -32,7 +32,7 @@ final class ScopeAggregator implements AggregatorInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php index 72ef72119..757154fd6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountAccompanyingCourse.php @@ -98,9 +98,9 @@ class CountAccompanyingCourse implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php index a329afee1..e142edd11 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountEvaluation.php @@ -98,9 +98,9 @@ class CountEvaluation implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php index 791c42772..e5f263128 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountHousehold.php @@ -17,6 +17,7 @@ use Chill\MainBundle\Export\GroupedExportInterface; use Chill\PersonBundle\Entity\AccompanyingPeriod; use Chill\PersonBundle\Export\Declarations; use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodVoter; +use Chill\PersonBundle\Security\Authorization\HouseholdVoter; use Doctrine\ORM\EntityManagerInterface; use Doctrine\ORM\EntityRepository; use Doctrine\ORM\Query; @@ -100,10 +101,9 @@ class CountHousehold implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - // TODO HouseholdVoter::STATS !?? - return new Role(AccompanyingPeriodVoter::STATS); + return HouseholdVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php index 729e5a202..44027a1c8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPerson.php @@ -108,9 +108,9 @@ class CountPerson implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(PersonVoter::STATS); + return PersonVoter::STATS; } public function supportsModifiers() diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php index 152793f97..52f558d54 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountPersonWithAccompanyingCourse.php @@ -98,9 +98,9 @@ class CountPersonWithAccompanyingCourse implements ExportInterface, GroupedExpor return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php index e19a40a0f..870077dd6 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/CountSocialWorkActions.php @@ -99,10 +99,9 @@ class CountSocialWorkActions implements ExportInterface, GroupedExportInterface return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - //TODO change to string, but changes needed also in ExportManager and possibly other locations. - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php index 5f519e647..659887b51 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPerson.php @@ -355,9 +355,9 @@ class ListPerson implements ExportElementValidatedInterface, ListInterface, Grou return $qb; } - public function requiredRole() + public function requiredRole(): string { - return new Role(PersonVoter::LISTS); + return PersonVoter::LISTS; } public function supportsModifiers() diff --git a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php index 718d04643..6cdf04924 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/StatAccompanyingCourseDuration.php @@ -110,9 +110,9 @@ class StatAccompanyingCourseDuration implements ExportInterface, GroupedExportIn return $qb; } - public function requiredRole(): Role + public function requiredRole(): string { - return new Role(AccompanyingPeriodVoter::STATS); + return AccompanyingPeriodVoter::STATS; } public function supportsModifiers(): array diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php index 6b1ad6612..b52b8b34a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOnDateFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class ActiveOnDateFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php index c37097d30..6e2fa3288 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActiveOneDayBetweenDatesFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class ActiveOneDayBetweenDatesFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php index 6efe29233..845b318b9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ActivityTypeFilter.php @@ -32,7 +32,7 @@ class ActivityTypeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php index 7bea4eb7f..9b2fd7634 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/AdministrativeLocationFilter.php @@ -30,7 +30,7 @@ class AdministrativeLocationFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php index 150a66ed1..636524d04 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ClosingMotiveFilter.php @@ -30,7 +30,7 @@ class ClosingMotiveFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php index 6fedf37f0..3ebf77182 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ConfidentialFilter.php @@ -35,7 +35,7 @@ class ConfidentialFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php index 76ba40a59..6c098e028 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserJobFilter.php @@ -35,7 +35,7 @@ class CurrentUserJobFilter implements FilterInterface $this->security = $security; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php index 37dcac27c..cbbd9bef5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/CurrentUserScopeFilter.php @@ -35,7 +35,7 @@ class CurrentUserScopeFilter implements FilterInterface $this->security = $security; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php index 6a755638b..b9c835080 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EmergencyFilter.php @@ -35,7 +35,7 @@ class EmergencyFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php index ab47c1cc7..7df43a06f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/EvaluationFilter.php @@ -30,7 +30,7 @@ class EvaluationFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php index 5a1d74c1f..8f6748b70 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/GeographicalUnitStatFilter.php @@ -34,7 +34,7 @@ use Symfony\Component\Form\FormBuilderInterface; */ class GeographicalUnitStatFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php index 22a1e2415..a98a6ec11 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/IntensityFilter.php @@ -35,7 +35,7 @@ class IntensityFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php index 205707831..a782fdb88 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OpenBetweenDatesFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class OpenBetweenDatesFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php index a67a0157c..200d8e8b0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/OriginFilter.php @@ -30,7 +30,7 @@ class OriginFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php index 94bf7a74c..6e680849d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ReferrerFilter.php @@ -29,7 +29,7 @@ class ReferrerFilter implements FilterInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php index 3b9ed950c..240d6c365 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/RequestorFilter.php @@ -44,7 +44,7 @@ class RequestorFilter implements FilterInterface $this->em = $em; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php index 979793def..50889225c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialActionFilter.php @@ -36,7 +36,7 @@ class SocialActionFilter implements FilterInterface $this->actionRender = $actionRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php index f707ab9e2..fdcb15ee7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/SocialIssueFilter.php @@ -43,7 +43,7 @@ class SocialIssueFilter implements FilterInterface $this->socialIssueRender = $socialIssueRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php index a7d218acc..dda95ff74 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/StepFilter.php @@ -40,7 +40,7 @@ class StepFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php index d467679de..74f6fef75 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/EvaluationTypeFilter.php @@ -30,7 +30,7 @@ final class EvaluationTypeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php index 0524e3bba..371955bfa 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/EvaluationFilters/MaxDateFilter.php @@ -33,7 +33,7 @@ class MaxDateFilter implements FilterInterface $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php index 95170cb10..3d00ed36b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/HouseholdFilters/CompositionFilter.php @@ -34,7 +34,7 @@ class CompositionFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodClosingFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodClosingFilter.php index 67ebf137b..e56782847 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodClosingFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodClosingFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class AccompanyingPeriodClosingFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodFilter.php index b92c4cc1d..5a7ccb4a3 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class AccompanyingPeriodFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodOpeningFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodOpeningFilter.php index 398e516d5..33805d392 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodOpeningFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AccompanyingPeriodOpeningFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class AccompanyingPeriodOpeningFilter extends AbstractAccompanyingPeriodExportElement implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php index e07d03e04..bada59a8d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/AgeFilter.php @@ -24,7 +24,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class AgeFilter implements ExportElementValidatedInterface, FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php index 2ab482039..30d0612a0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/BirthdateFilter.php @@ -21,7 +21,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class BirthdateFilter implements ExportElementValidatedInterface, FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php index 457378731..3b15cff7b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeadOrAliveFilter.php @@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface; class DeadOrAliveFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php index e955a33b9..ba8e8c150 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/DeathdateFilter.php @@ -23,7 +23,7 @@ use Symfony\Component\Validator\Context\ExecutionContextInterface; class DeathdateFilter implements ExportElementValidatedInterface, FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php index 895f83e9d..3c2befd75 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/FamilySituationFilter.php @@ -19,7 +19,7 @@ use Symfony\Component\Form\Extension\Core\Type\DateType; class FamilySituationFilter implements FilterInterface { //TODO where to find this property? On VendeePerson rather than Person. Not sure what this refers to exactly... - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php index 373d9798c..02833d14c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/GenderFilter.php @@ -42,7 +42,7 @@ class GenderFilter implements $this->translator = $translator; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php index d10de8f30..eec380170 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/NationalityFilter.php @@ -36,7 +36,7 @@ class NationalityFilter implements $this->translatableStringHelper = $helper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php index b2eef5285..860598927 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtThirdpartyFilter.php @@ -31,7 +31,7 @@ class ResidentialAddressAtThirdpartyFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php index 38825e022..5fd2a718b 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/PersonFilters/ResidentialAddressAtUserFilter.php @@ -18,7 +18,7 @@ use Doctrine\ORM\QueryBuilder; class ResidentialAddressAtUserFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index 8986d4676..386570c8e 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -35,7 +35,7 @@ class JobFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php index efe193a6e..f3fa7e359 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ReferrerFilter.php @@ -29,7 +29,7 @@ class ReferrerFilter implements FilterInterface $this->userRender = $userRender; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index b828a6c47..d707edf7f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -35,7 +35,7 @@ class ScopeFilter implements FilterInterface $this->translatableStringHelper = $translatableStringHelper; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php index 348e1e9b8..e7ae21663 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/SocialWorkTypeFilter.php @@ -44,7 +44,7 @@ class SocialWorkTypeFilter implements FilterInterface $this->socialActionRepository = $socialActionRepository; } - public function addRole() + public function addRole(): ?string { return null; } diff --git a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php index cdc62c2cf..5f6a1c542 100644 --- a/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php +++ b/src/Bundle/ChillPersonBundle/Security/Authorization/HouseholdVoter.php @@ -25,6 +25,8 @@ class HouseholdVoter extends Voter public const SEE = 'CHILL_PERSON_HOUSEHOLD_SEE'; + public const STATS = 'CHILL_PERSON_HOUSEHOLD_STATS'; + /** * @deprecated use @see{self::SEE} instead */ diff --git a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php index b2b436485..3534a5f38 100644 --- a/src/Bundle/ChillReportBundle/Export/Export/ReportList.php +++ b/src/Bundle/ChillReportBundle/Export/Export/ReportList.php @@ -458,9 +458,9 @@ class ReportList implements ExportElementValidatedInterface, ListInterface ->setParameter('authorized_centers', $centers); } - public function requiredRole() + public function requiredRole(): string { - return new Role(ReportVoter::LISTS); + return ReportVoter::LISTS; } public function supportsModifiers() diff --git a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php index 0cdb8e26c..84facc5ba 100644 --- a/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php +++ b/src/Bundle/ChillReportBundle/Export/Filter/ReportDateFilter.php @@ -18,7 +18,7 @@ use Doctrine\ORM\Query\Expr; class ReportDateFilter implements FilterInterface { - public function addRole() + public function addRole(): ?string { return null; }