From a40e2de91d2aed6a2e3d61389173258d3a1fec4a Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 27 Jul 2022 16:02:11 +0200 Subject: [PATCH] rename filters to avoid confusion --- ...{UserJobFilter.php => CurrentUserJobFilter.php} | 14 +++----------- ...rScopeFilter.php => CurrentUserScopeFilter.php} | 2 +- .../services/exports_accompanying_period.yaml | 12 ++++++------ 3 files changed, 10 insertions(+), 18 deletions(-) rename src/Bundle/ChillPersonBundle/Export/Filter/{UserJobFilter.php => CurrentUserJobFilter.php} (88%) rename src/Bundle/ChillPersonBundle/Export/Filter/{UserScopeFilter.php => CurrentUserScopeFilter.php} (97%) diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/UserJobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserJobFilter.php similarity index 88% rename from src/Bundle/ChillPersonBundle/Export/Filter/UserJobFilter.php rename to src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserJobFilter.php index d641d9a74..72dd39a0f 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/UserJobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserJobFilter.php @@ -11,8 +11,6 @@ declare(strict_types=1); namespace Chill\PersonBundle\Export\Filter; -use Chill\CustomFieldsBundle\Form\Type\ChoicesType; -use Chill\MainBundle\Entity\Scope; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\UserJob; use Chill\MainBundle\Export\FilterInterface; @@ -20,23 +18,17 @@ use Chill\MainBundle\Templating\TranslatableStringHelper; use Chill\PersonBundle\Export\Declarations; use Doctrine\ORM\Query\Expr\Andx; use Doctrine\ORM\QueryBuilder; -use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Security; use Symfony\Contracts\Translation\TranslatorInterface; -class UserJobFilter implements FilterInterface +class CurrentUserJobFilter implements FilterInterface { - /** - * @var TranslatorInterface - */ - protected $translator; + + protected TranslatorInterface $translator; private Security $security; - /** - * @var TranslatableStringHelper - */ private TranslatableStringHelper $translatableStringHelper; public function __construct( diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/UserScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserScopeFilter.php similarity index 97% rename from src/Bundle/ChillPersonBundle/Export/Filter/UserScopeFilter.php rename to src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserScopeFilter.php index bc7a1b9d3..aaa38f420 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/UserScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/CurrentUserScopeFilter.php @@ -24,7 +24,7 @@ use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Security\Core\Security; use Symfony\Contracts\Translation\TranslatorInterface; -class UserScopeFilter implements FilterInterface +class CurrentUserScopeFilter implements FilterInterface { /** * @var TranslatorInterface diff --git a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period.yaml b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period.yaml index 72fa1ad80..262d07a82 100644 --- a/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period.yaml +++ b/src/Bundle/ChillPersonBundle/config/services/exports_accompanying_period.yaml @@ -32,19 +32,19 @@ services: - { name: chill.export, alias: avg_accompanyingcourse_duration } ## Filters - chill.person.export.filter_userscope: - class: Chill\PersonBundle\Export\Filter\UserScopeFilter + chill.person.export.filter_current_userscope: + class: Chill\PersonBundle\Export\Filter\CurrentUserScopeFilter autowire: true autoconfigure: true tags: - - { name: chill.export_filter, alias: accompanyingcourse_userscope_filter } + - { name: chill.export_filter, alias: accompanyingcourse_current_userscope_filter } - chill.person.export.filter_userjob: - class: Chill\PersonBundle\Export\Filter\UserJobFilter + chill.person.export.filter_current_userjob: + class: Chill\PersonBundle\Export\Filter\CurrentUserJobFilter autowire: true autoconfigure: true tags: - - { name: chill.export_filter, alias: accompanyingcourse_userjob_filter } + - { name: chill.export_filter, alias: accompanyingcourse_current_userjob_filter } chill.person.export.filter_socialissue: class: Chill\PersonBundle\Export\Filter\SocialIssueFilter