From fa47dcd5b616badbdf0f00dc33ae2d7fab3b465b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:50:12 +0200 Subject: [PATCH 01/14] FIX [center][crud] use crud controller for center entity --- .../Controller/CenterController.php | 168 +----------------- .../ChillMainExtension.php | 24 +++ .../ChillMainBundle/Form/CenterType.php | 27 ++- .../views/Admin/Center/edit.html.twig | 11 ++ .../views/Admin/Center/index.html.twig | 39 ++++ .../views/Admin/Center/new.html.twig | 11 ++ .../Resources/views/Center/edit.html.twig | 23 --- .../Resources/views/Center/index.html.twig | 50 ------ .../Resources/views/Center/new.html.twig | 23 --- .../MenuBuilder/AdminUserMenuBuilder.php | 2 +- src/Bundle/ChillMainBundle/config/routes.yaml | 6 +- .../translations/messages.fr.yml | 6 + 12 files changed, 113 insertions(+), 277 deletions(-) create mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/Center/edit.html.twig create mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig create mode 100644 src/Bundle/ChillMainBundle/Resources/views/Admin/Center/new.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig delete mode 100644 src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig diff --git a/src/Bundle/ChillMainBundle/Controller/CenterController.php b/src/Bundle/ChillMainBundle/Controller/CenterController.php index 1cc129e5d..fef36c11b 100644 --- a/src/Bundle/ChillMainBundle/Controller/CenterController.php +++ b/src/Bundle/ChillMainBundle/Controller/CenterController.php @@ -11,178 +11,22 @@ declare(strict_types=1); namespace Chill\MainBundle\Controller; +use Chill\MainBundle\CRUD\Controller\CRUDController; use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Form\CenterType; -use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; +use Chill\MainBundle\Pagination\PaginatorInterface; use Symfony\Component\Form\Extension\Core\Type\SubmitType; use Symfony\Component\HttpFoundation\Request; /** * Class CenterController. */ -class CenterController extends AbstractController +class CenterController extends CRUDController { - /** - * Creates a new Center entity. - */ - public function createAction(Request $request) + protected function orderQuery(string $action, $query, Request $request, PaginatorInterface $paginator) { - $center = new Center(); - $form = $this->createCreateForm($center); - $form->handleRequest($request); + $query->addOrderBy('e.name', 'ASC'); - if ($form->isValid()) { - $em = $this->getDoctrine()->getManager(); - $em->persist($center); - $em->flush(); - - return $this->redirect($this->generateUrl('admin_center')); - } - - return $this->render('@ChillMain/Center/new.html.twig', [ - 'entity' => $center, - 'form' => $form->createView(), - ]); - } - - /** - * Displays a form to edit an existing Center entity. - * - * @param mixed $id - */ - public function editAction($id) - { - $em = $this->getDoctrine()->getManager(); - - $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); - - if (!$center) { - throw $this->createNotFoundException('Unable to find Center entity.'); - } - - $editForm = $this->createEditForm($center); - - return $this->render('@ChillMain/Center/edit.html.twig', [ - 'entity' => $center, - 'edit_form' => $editForm->createView(), - ]); - } - - /** - * Lists all Center entities. - */ - public function indexAction() - { - $em = $this->getDoctrine()->getManager(); - - $entities = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->findAll(); - - usort($entities, fn (Center $a, Center $b) => $a->getName() <=> $b->getName()); - - return $this->render('@ChillMain/Center/index.html.twig', [ - 'entities' => $entities, - ]); - } - - /** - * Displays a form to create a new Center entity. - */ - public function newAction() - { - $center = new Center(); - $form = $this->createCreateForm($center); - - return $this->render('@ChillMain/Center/new.html.twig', [ - 'entity' => $center, - 'form' => $form->createView(), - ]); - } - - /** - * Finds and displays a Center entity. - * - * @param mixed $id - */ - public function showAction($id) - { - $em = $this->getDoctrine()->getManager(); - - $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); - - if (!$center) { - throw $this->createNotFoundException('Unable to find Center entity.'); - } - - return $this->render('@ChillMain/Center/show.html.twig', [ - 'entity' => $center, - ]); - } - - /** - * Edits an existing Center entity. - * - * @param mixed $id - */ - public function updateAction(Request $request, $id) - { - $em = $this->getDoctrine()->getManager(); - - $center = $em->getRepository(\Chill\MainBundle\Entity\Center::class)->find($id); - - if (!$center) { - throw $this->createNotFoundException('Unable to find Center entity.'); - } - - $editForm = $this->createEditForm($center); - $editForm->handleRequest($request); - - if ($editForm->isValid()) { - $em->flush(); - - return $this->redirect($this->generateUrl('admin_center_edit', ['id' => $id])); - } - - return $this->render('@ChillMain/Center/edit.html.twig', [ - 'entity' => $center, - 'edit_form' => $editForm->createView(), - ]); - } - - /** - * Creates a form to create a Center entity. - * - * @param Center $center The entity - * - * @return \Symfony\Component\Form\Form The form - */ - private function createCreateForm(Center $center) - { - $form = $this->createForm(CenterType::class, $center, [ - 'action' => $this->generateUrl('admin_center_create'), - 'method' => 'POST', - ]); - - $form->add('submit', SubmitType::class, ['label' => 'Create']); - - return $form; - } - - /** - * Creates a form to edit a Center entity. - * - * @param Center $center The entity - * - * @return \Symfony\Component\Form\Form The form - */ - private function createEditForm(Center $center) - { - $form = $this->createForm(CenterType::class, $center, [ - 'action' => $this->generateUrl('admin_center_update', ['id' => $center->getId()]), - 'method' => 'PUT', - ]); - - $form->add('submit', SubmitType::class, ['label' => 'Update']); - - return $form; + return parent::orderQuery($action, $query, $request, $paginator); } } diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index c86a69be2..a8ac588f1 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -12,6 +12,7 @@ declare(strict_types=1); namespace Chill\MainBundle\DependencyInjection; use Chill\MainBundle\Controller\AddressApiController; +use Chill\MainBundle\Controller\CenterController; use Chill\MainBundle\Controller\CivilityApiController; use Chill\MainBundle\Controller\CivilityController; use Chill\MainBundle\Controller\CountryController; @@ -44,6 +45,7 @@ use Chill\MainBundle\Doctrine\DQL\Unaccent; use Chill\MainBundle\Doctrine\ORM\Hydration\FlatHierarchyEntityHydrator; use Chill\MainBundle\Doctrine\Type\NativeDateIntervalType; use Chill\MainBundle\Doctrine\Type\PointType; +use Chill\MainBundle\Entity\Center; use Chill\MainBundle\Entity\Civility; use Chill\MainBundle\Entity\Country; use Chill\MainBundle\Entity\GeographicalUnitLayer; @@ -53,6 +55,7 @@ use Chill\MainBundle\Entity\LocationType; use Chill\MainBundle\Entity\Regroupment; use Chill\MainBundle\Entity\User; use Chill\MainBundle\Entity\UserJob; +use Chill\MainBundle\Form\CenterType; use Chill\MainBundle\Form\CivilityType; use Chill\MainBundle\Form\CountryType; use Chill\MainBundle\Form\LanguageType; @@ -524,6 +527,27 @@ class ChillMainExtension extends Extension implements ], ], ], + [ + 'class' => Center::class, + 'name' => 'center', + 'base_path' => '/admin/center', + 'form_class' => CenterType::class, + 'controller' => CenterController::class, + 'actions' => [ + 'index' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillMain/Admin/Center/index.html.twig', + ], + 'new' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillMain/Admin/Center/new.html.twig', + ], + 'edit' => [ + 'role' => 'ROLE_ADMIN', + 'template' => '@ChillMain/Admin/Center/edit.html.twig', + ], + ], + ], ], 'apis' => [ [ diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php index ff758ca49..ed5a496d6 100644 --- a/src/Bundle/ChillMainBundle/Form/CenterType.php +++ b/src/Bundle/ChillMainBundle/Form/CenterType.php @@ -11,7 +11,10 @@ declare(strict_types=1); namespace Chill\MainBundle\Form; +use Chill\MainBundle\Entity\Center; +use Symfony\Bridge\Doctrine\Form\Type\EntityType; use Symfony\Component\Form\AbstractType; +use Symfony\Component\Form\Extension\Core\Type\CheckboxType; use Symfony\Component\Form\Extension\Core\Type\TextType; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\OptionsResolver\OptionsResolver; @@ -21,24 +24,18 @@ class CenterType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder - ->add('name', TextType::class); + ->add('name', TextType::class, [ + 'label' => 'Nom', + ]); +/* ->add('isActive', CheckboxType::class, [ + 'label' => 'Actif ?', + 'required' => false, + ]);*/ } - /** - * @param OptionsResolverInterface $resolver - */ public function configureOptions(OptionsResolver $resolver) { - $resolver->setDefaults([ - 'data_class' => \Chill\MainBundle\Entity\Center::class, - ]); - } - - /** - * @return string - */ - public function getBlockPrefix() - { - return 'chill_mainbundle_center'; + $resolver + ->setDefault('class', Center::class); } } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/edit.html.twig new file mode 100644 index 000000000..4d55c480c --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/edit.html.twig @@ -0,0 +1,11 @@ +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} + +{% block title %} + {% include('@ChillMain/CRUD/_edit_title.html.twig') %} +{% endblock %} + +{% block admin_content %} + {% embed '@ChillMain/CRUD/_edit_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock admin_content %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig new file mode 100644 index 000000000..e5554f6d9 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig @@ -0,0 +1,39 @@ +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} + +{% block admin_content %} + {% embed '@ChillMain/CRUD/_index.html.twig' %} + {% block table_entities_thead_tr %} + {{ 'Label'|trans }} +{# {{ 'Active'|trans }}#} +   + {% endblock %} + + {% block table_entities_tbody %} + {% for entity in entities %} + + {{ entity.name }} +{# #} +{# {% if entity.isActive %}#} +{# #} +{# {% else %}#} +{# #} +{# {% endif %}#} +{# #} + + + + + {% endfor %} + {% endblock %} + + {% block actions_before %} +
  • + {{'Back to the admin'|trans}} +
  • + {% endblock %} + {% endembed %} +{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/new.html.twig new file mode 100644 index 000000000..7c204dddd --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/new.html.twig @@ -0,0 +1,11 @@ +{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} + +{% block title %} + {% include('@ChillMain/CRUD/_new_title.html.twig') %} +{% endblock %} + +{% block admin_content %} + {% embed '@ChillMain/CRUD/_new_content.html.twig' %} + {% block content_form_actions_save_and_show %}{% endblock %} + {% endembed %} +{% endblock admin_content %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig deleted file mode 100644 index 1894a1402..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Center/edit.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %} - -{% block title %}{{ 'Center edit'|trans }}{% endblock %} - -{% block admin_content -%} -

    {{ 'Center edit'|trans }}

    - - {{ form_start(edit_form) }} - {{ form_row(edit_form.name) }} - - - - {{ form_end(edit_form) }} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig deleted file mode 100644 index cb2da8a62..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Center/index.html.twig +++ /dev/null @@ -1,50 +0,0 @@ -{% extends '@ChillMain/CRUD/Admin/index.html.twig' %} - -{% block title %}{{ 'Center list'|trans }}{% endblock %} - -{% block admin_content -%} - {% embed '@ChillMain/CRUD/_index.html.twig' %} - - {% block index_header %} -

    {{ 'Center list'|trans }}

    - {% endblock %} - - {% block filter_order %}{% endblock %} - - {% block table_entities_thead_tr %} - id - {{ 'Name'|trans }} - {{ 'Actions'|trans }} - {% endblock %} - - {% block table_entities_tbody %} - {% for entity in entities %} - - {{ entity.id }} - {{ entity.name }} - - - - - {% endfor %} - {% endblock %} - - {% block pagination %}{% endblock %} - - {% block list_actions %} - - {% endblock list_actions %} - - {% endembed %} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig deleted file mode 100644 index cc64b37c2..000000000 --- a/src/Bundle/ChillMainBundle/Resources/views/Center/new.html.twig +++ /dev/null @@ -1,23 +0,0 @@ -{% extends '@ChillMain/Admin/layoutWithVerticalMenu.html.twig' %} - -{% block title %}{{ 'Center creation'|trans }}{% endblock %} - -{% block admin_content -%} -

    {{ 'Center creation'|trans }}

    - - {{ form_start(form) }} - {{ form_row(form.name) }} - - - - {{ form_end(form) }} -{% endblock %} diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php index 7bd23c81f..8e2ccb7c6 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminUserMenuBuilder.php @@ -49,7 +49,7 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface ]); $menu->addChild('Center list', [ - 'route' => 'admin_center', + 'route' => 'chill_crud_center_index', ])->setExtras(['order' => 1010]); $menu->addChild('Regroupements des centres', [ diff --git a/src/Bundle/ChillMainBundle/config/routes.yaml b/src/Bundle/ChillMainBundle/config/routes.yaml index d25f2aaff..7e2af7a7f 100644 --- a/src/Bundle/ChillMainBundle/config/routes.yaml +++ b/src/Bundle/ChillMainBundle/config/routes.yaml @@ -10,9 +10,9 @@ chill_main_admin_scope: resource: "@ChillMainBundle/config/routes/scope.yaml" prefix: "{_locale}/admin/scope" -chill_main_admin: - resource: "@ChillMainBundle/config/routes/center.yaml" - prefix: "{_locale}/admin/center" +#chill_main_admin: +# resource: "@ChillMainBundle/config/routes/center.yaml" +# prefix: "{_locale}/admin/center" chill_main_exports: resource: "@ChillMainBundle/config/routes/exports.yaml" diff --git a/src/Bundle/ChillMainBundle/translations/messages.fr.yml b/src/Bundle/ChillMainBundle/translations/messages.fr.yml index 6a6136a41..6cbb1fef4 100644 --- a/src/Bundle/ChillMainBundle/translations/messages.fr.yml +++ b/src/Bundle/ChillMainBundle/translations/messages.fr.yml @@ -425,6 +425,12 @@ crud: add_new: Ajouter un regroupement title_new: Nouveau regroupement title_edit: Modifier un regroupement + center: + index: + title: Liste des centres + add_new: Ajouter un centre + title_new: Nouveau centre + title_edit: Modifier un centre No entities: Aucun élément From ba41ab98f7f4982e5c49c322ef5c3112e089114e Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:50:45 +0200 Subject: [PATCH 02/14] FEATURE [isActive][center] add isActive property to the center entity --- src/Bundle/ChillMainBundle/Entity/Center.php | 5 ++++ .../migrations/Version20230906134410.php | 29 +++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 src/Bundle/ChillMainBundle/migrations/Version20230906134410.php diff --git a/src/Bundle/ChillMainBundle/Entity/Center.php b/src/Bundle/ChillMainBundle/Entity/Center.php index 0d5402409..23bd2812d 100644 --- a/src/Bundle/ChillMainBundle/Entity/Center.php +++ b/src/Bundle/ChillMainBundle/Entity/Center.php @@ -48,6 +48,11 @@ class Center implements HasCenterInterface */ private string $name = ''; + /** + * @ORM\Column(type="boolean") + */ + private bool $isActive = true; + /** * @var Collection * @ORM\ManyToMany(targetEntity=Regroupment::class, mappedBy="centers") diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php new file mode 100644 index 000000000..231dffb23 --- /dev/null +++ b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php @@ -0,0 +1,29 @@ +addSql('ALTER TABLE centers ADD isActive BOOLEAN NOT NULL'); + } + + public function down(Schema $schema): void + { + $this->addSql('ALTER TABLE centers DROP isActive'); + } +} From 63015055632ead94ea53c24ceef0ae1b9dc2d9c3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:52:26 +0200 Subject: [PATCH 03/14] DX add changie --- .changes/unreleased/Feature-20230906-155212.yaml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changes/unreleased/Feature-20230906-155212.yaml diff --git a/.changes/unreleased/Feature-20230906-155212.yaml b/.changes/unreleased/Feature-20230906-155212.yaml new file mode 100644 index 000000000..c894bbf72 --- /dev/null +++ b/.changes/unreleased/Feature-20230906-155212.yaml @@ -0,0 +1,6 @@ +kind: Feature +body: Use the CRUD controller for center entity + add the isActive property to be + able to mask instances of Center that are no longer in use. +time: 2023-09-06T15:52:12.561065323+02:00 +custom: + Issue: "" From 7c7c5862c6fe58816de05ae8417d84512e5ff854 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:56:04 +0200 Subject: [PATCH 04/14] FEATURE [center][isActive] add getter and setter + integrate into template --- src/Bundle/ChillMainBundle/Entity/Center.php | 12 ++++++++++++ .../Resources/views/Admin/Center/index.html.twig | 16 ++++++++-------- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Entity/Center.php b/src/Bundle/ChillMainBundle/Entity/Center.php index 23bd2812d..5e72f43a2 100644 --- a/src/Bundle/ChillMainBundle/Entity/Center.php +++ b/src/Bundle/ChillMainBundle/Entity/Center.php @@ -126,6 +126,11 @@ class Center implements HasCenterInterface return $this->regroupments; } + public function getIsActive(): bool + { + return $this->isActive; + } + /** * @param $name * @@ -137,4 +142,11 @@ class Center implements HasCenterInterface return $this; } + + public function setIsActive(bool $isActive): self + { + $this->isActive = $isActive; + + return $this; + } } diff --git a/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig index e5554f6d9..27c19c504 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/Admin/Center/index.html.twig @@ -4,7 +4,7 @@ {% embed '@ChillMain/CRUD/_index.html.twig' %} {% block table_entities_thead_tr %} {{ 'Label'|trans }} -{# {{ 'Active'|trans }}#} + {{ 'Active'|trans }}   {% endblock %} @@ -12,13 +12,13 @@ {% for entity in entities %} {{ entity.name }} -{# #} -{# {% if entity.isActive %}#} -{# #} -{# {% else %}#} -{# #} -{# {% endif %}#} -{# #} + + {% if entity.isActive %} + + {% else %} + + {% endif %} +
    • From 82b30258422caadf6e6ca8813dccd83244491923 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 15:56:48 +0200 Subject: [PATCH 05/14] DX php cs fixer --- src/Bundle/ChillMainBundle/Form/CenterType.php | 8 ++++---- .../ChillMainBundle/migrations/Version20230906134410.php | 7 +++++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php index ed5a496d6..1a106192a 100644 --- a/src/Bundle/ChillMainBundle/Form/CenterType.php +++ b/src/Bundle/ChillMainBundle/Form/CenterType.php @@ -27,10 +27,10 @@ class CenterType extends AbstractType ->add('name', TextType::class, [ 'label' => 'Nom', ]); -/* ->add('isActive', CheckboxType::class, [ - 'label' => 'Actif ?', - 'required' => false, - ]);*/ + /* ->add('isActive', CheckboxType::class, [ + 'label' => 'Actif ?', + 'required' => false, + ]);*/ } public function configureOptions(OptionsResolver $resolver) diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php index 231dffb23..b03af5a5f 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php @@ -2,6 +2,13 @@ declare(strict_types=1); +/* + * Chill is a software for social workers + * + * For the full copyright and license information, please view + * the LICENSE file that was distributed with this source code. + */ + namespace Chill\Migrations\Main; use Doctrine\DBAL\Schema\Schema; From b256c3176ee6317616bb73f1c25a104c198d7555 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 16:05:21 +0200 Subject: [PATCH 06/14] FIX [migration][center] set default value in center migration to add isActive --- src/Bundle/ChillMainBundle/migrations/Version20230906134410.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php index b03af5a5f..ac18c9c29 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20230906134410.php @@ -26,7 +26,7 @@ final class Version20230906134410 extends AbstractMigration public function up(Schema $schema): void { - $this->addSql('ALTER TABLE centers ADD isActive BOOLEAN NOT NULL'); + $this->addSql('ALTER TABLE centers ADD isActive BOOLEAN DEFAULT true NOT NULL'); } public function down(Schema $schema): void From 03baee4286f2eca9a56eb6c9ccae517195872181 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 16:05:59 +0200 Subject: [PATCH 07/14] FIX [repository][center] adjust center repository to find all active entities --- src/Bundle/ChillMainBundle/Repository/CenterRepository.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Bundle/ChillMainBundle/Repository/CenterRepository.php b/src/Bundle/ChillMainBundle/Repository/CenterRepository.php index eaa0a6b1e..f8646811e 100644 --- a/src/Bundle/ChillMainBundle/Repository/CenterRepository.php +++ b/src/Bundle/ChillMainBundle/Repository/CenterRepository.php @@ -29,9 +29,12 @@ final class CenterRepository implements CenterRepositoryInterface return $this->repository->find($id, $lockMode, $lockVersion); } + /** + * @return Center[] + */ public function findActive(): array { - return $this->findAll(); + return $this->repository->findBy(['isActive' => true], ['name' => 'ASC']); } /** From f3a37d435f0abdd53065216b03be652ba4fad042 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 16:21:29 +0200 Subject: [PATCH 08/14] FEATURE [form][isActive] add form field for isActive property --- src/Bundle/ChillMainBundle/Form/CenterType.php | 10 +++++----- src/Bundle/ChillMainBundle/Form/UserType.php | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php index 1a106192a..b3a212a66 100644 --- a/src/Bundle/ChillMainBundle/Form/CenterType.php +++ b/src/Bundle/ChillMainBundle/Form/CenterType.php @@ -26,11 +26,11 @@ class CenterType extends AbstractType $builder ->add('name', TextType::class, [ 'label' => 'Nom', - ]); - /* ->add('isActive', CheckboxType::class, [ - 'label' => 'Actif ?', - 'required' => false, - ]);*/ + ]) + ->add('isActive', CheckboxType::class, [ + 'label' => 'Actif ?', + 'required' => false, + ]); } public function configureOptions(OptionsResolver $resolver) diff --git a/src/Bundle/ChillMainBundle/Form/UserType.php b/src/Bundle/ChillMainBundle/Form/UserType.php index f8485aa99..4119a3ed0 100644 --- a/src/Bundle/ChillMainBundle/Form/UserType.php +++ b/src/Bundle/ChillMainBundle/Form/UserType.php @@ -67,6 +67,7 @@ class UserType extends AbstractType 'class' => Center::class, 'query_builder' => static function (EntityRepository $er) { $qb = $er->createQueryBuilder('c'); + $qb->where($qb->expr()->eq('c.isActive', 'true')); $qb->addOrderBy('c.name'); return $qb; From f30b4ff4523e5ac705fcba72485d5cd767e780c9 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Wed, 6 Sep 2023 16:22:03 +0200 Subject: [PATCH 09/14] DX php cs fixer --- src/Bundle/ChillMainBundle/Form/CenterType.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/CenterType.php b/src/Bundle/ChillMainBundle/Form/CenterType.php index b3a212a66..864d0a877 100644 --- a/src/Bundle/ChillMainBundle/Form/CenterType.php +++ b/src/Bundle/ChillMainBundle/Form/CenterType.php @@ -27,10 +27,10 @@ class CenterType extends AbstractType ->add('name', TextType::class, [ 'label' => 'Nom', ]) - ->add('isActive', CheckboxType::class, [ - 'label' => 'Actif ?', - 'required' => false, - ]); + ->add('isActive', CheckboxType::class, [ + 'label' => 'Actif ?', + 'required' => false, + ]); } public function configureOptions(OptionsResolver $resolver) From 86315b15793328ec3766973ed959abb4d46679f5 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 11 Sep 2023 14:43:52 +0200 Subject: [PATCH 10/14] only show active centers from the reachable centers for creation of person --- src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php | 4 +++- src/Bundle/ChillMainBundle/config/routes.yaml | 4 ---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php index 83e957623..6a82818f6 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php @@ -61,6 +61,8 @@ class PickCenterType extends AbstractType { $centers = $this->getReachableCenters($options['role'], $options['scopes']); + $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); + if (count($centers) <= 1) { $multiple = $options['choice_options']['multiple'] ?? false; $builder->add('center', HiddenType::class); @@ -75,7 +77,7 @@ class PickCenterType extends AbstractType $options['choice_options'], [ 'class' => Center::class, - 'choices' => $centers, + 'choices' => $centersActive, ] ) ); diff --git a/src/Bundle/ChillMainBundle/config/routes.yaml b/src/Bundle/ChillMainBundle/config/routes.yaml index 7e2af7a7f..5bbc381d1 100644 --- a/src/Bundle/ChillMainBundle/config/routes.yaml +++ b/src/Bundle/ChillMainBundle/config/routes.yaml @@ -10,10 +10,6 @@ chill_main_admin_scope: resource: "@ChillMainBundle/config/routes/scope.yaml" prefix: "{_locale}/admin/scope" -#chill_main_admin: -# resource: "@ChillMainBundle/config/routes/center.yaml" -# prefix: "{_locale}/admin/center" - chill_main_exports: resource: "@ChillMainBundle/config/routes/exports.yaml" prefix: "{_locale}/exports" From 4d111cd6cfdb106ce3e01b65ea4d1fd85c964d3b Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Mon, 11 Sep 2023 16:37:27 +0200 Subject: [PATCH 11/14] filter out active centers in api --- .../ChillPersonBundle/Controller/PersonApiController.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 505f307e6..896c1a79d 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -13,6 +13,7 @@ namespace Chill\PersonBundle\Controller; use Chill\MainBundle\CRUD\Controller\ApiController; use Chill\MainBundle\Entity\Address; +use Chill\MainBundle\Entity\Center; use Chill\PersonBundle\Config\ConfigPersonAltNamesHelper; use Chill\PersonBundle\Entity\AccompanyingPeriodParticipation; use Chill\PersonBundle\Entity\Person; @@ -52,11 +53,13 @@ class PersonApiController extends ApiController { $centers = $this->authorizedCenterOnPersonCreation->getCenters(); + $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); + return $this->json( - ['showCenters' => $this->showCenters, 'centers' => $centers], + ['showCenters' => $this->showCenters, 'centers' => $centersActive], Response::HTTP_OK, [], - ['gropus' => ['read']] + ['groups' => ['read']] ); } From 19789acbbe285c22402bd6ca62a33d6f73bd009c Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Tue, 12 Sep 2023 15:18:03 +0200 Subject: [PATCH 12/14] php cs fixes --- src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php | 2 +- .../ChillPersonBundle/Controller/PersonApiController.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php index 6a82818f6..882b9f4fa 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/PickCenterType.php @@ -61,7 +61,7 @@ class PickCenterType extends AbstractType { $centers = $this->getReachableCenters($options['role'], $options['scopes']); - $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); + $centersActive = array_filter($centers, fn (Center $c) => $c->getIsActive()); if (count($centers) <= 1) { $multiple = $options['choice_options']['multiple'] ?? false; diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 896c1a79d..0ca3bd94a 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -53,10 +53,10 @@ class PersonApiController extends ApiController { $centers = $this->authorizedCenterOnPersonCreation->getCenters(); - $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); + // $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); return $this->json( - ['showCenters' => $this->showCenters, 'centers' => $centersActive], + ['showCenters' => $this->showCenters, 'centers' => $centers], Response::HTTP_OK, [], ['groups' => ['read']] From b4f9501af51946a6ef62f198f0ff5b28743c41a3 Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 14 Sep 2023 11:47:54 +0200 Subject: [PATCH 13/14] php cs fixes --- .../ChillActivityBundle.php | 4 +- .../Controller/ActivityController.php | 3 +- .../LinkedToACP/AvgActivityDuration.php | 4 +- .../Export/LinkedToACP/CountActivity.php | 4 +- .../Export/LinkedToPerson/CountActivity.php | 4 +- .../LinkedToPerson/StatActivityDuration.php | 4 +- .../Export/Export/ListActivityHelper.php | 4 +- ...PeriodHavingActivityBetweenDatesFilter.php | 3 +- .../Repository/ActivityACLAwareRepository.php | 3 +- .../ActivityDocumentACLAwareRepository.php | 3 +- ...anyingPeriodActivityGenericDocProvider.php | 3 +- .../PersonActivityGenericDocProvider.php | 3 +- .../src/ChillAsideActivityBundle.php | 4 +- .../Aggregator/ByLocationAggregator.php | 4 +- .../Export/AvgAsideActivityDuration.php | 4 +- .../src/Export/Export/CountAsideActivity.php | 4 +- .../src/Export/Export/ListAsideActivity.php | 4 +- .../Export/SumAsideActivityDuration.php | 4 +- .../src/Export/Filter/ByLocationFilter.php | 3 +- .../Connector/MSGraph/MSUserAbsenceReader.php | 3 +- .../Connector/MSGraph/MSUserAbsenceSync.php | 3 +- .../Connector/NullRemoteCalendarConnector.php | 20 ++----- .../DocGenerator/CalendarContextInterface.php | 4 +- ...anyingPeriodCalendarGenericDocProvider.php | 3 +- .../PersonCalendarGenericDocProvider.php | 3 +- .../Form/Type/CustomFieldsTitleType.php | 4 +- ...ericDocForAccompanyingPeriodController.php | 3 +- .../Controller/GenericDocForPerson.php | 3 +- .../GenericDoc/FetchQuery.php | 3 +- .../GenericDoc/GenericDocDTO.php | 3 +- ...anyingCourseDocumentGenericDocProvider.php | 3 +- .../PersonDocumentGenericDocProvider.php | 3 +- ...anyingCourseDocumentGenericDocRenderer.php | 3 +- .../Twig/GenericDocExtensionRuntime.php | 3 +- .../PersonDocumentACLAwareRepository.php | 3 +- .../ChillEventBundle/ChillEventBundle.php | 4 +- .../Repository/EventRepository.php | 4 +- .../ChillAMLIFamilyMembersBundle.php | 4 +- .../Controller/AbstractCRUDController.php | 4 +- .../CRUD/Controller/CRUDController.php | 56 +++++-------------- .../CRUD/Form/CRUDDeleteEntityForm.php | 4 +- .../Command/LoadPostalCodesCommand.php | 12 +--- .../Controller/LocationTypeController.php | 4 +- .../Controller/LoginController.php | 4 +- .../Controller/PermissionsGroupController.php | 3 +- .../Controller/UserExportController.php | 3 +- src/Bundle/ChillMainBundle/Entity/User.php | 4 +- .../Export/ExportFormHelper.php | 3 +- .../ChillMainBundle/Export/ListInterface.php | 4 +- .../Form/Type/Export/AggregatorType.php | 4 +- .../Form/Type/Export/FilterType.php | 4 +- .../Exception/NotificationHandlerNotFound.php | 4 +- .../ChillMainBundle/Redis/ChillRedis.php | 4 +- .../Search/ParsingException.php | 4 +- .../Authorization/AbstractChillVoter.php | 4 +- .../Authorization/ChillVoterInterface.php | 4 +- ...ollateAddressWithReferenceOrPostalCode.php | 3 +- ...ddressWithReferenceOrPostalCodeCronJob.php | 3 +- .../EntityInfo/ViewEntityInfoManager.php | 3 +- .../ShortMessage/NullShortMessageSender.php | 4 +- .../FilterOrderGetActiveFilterHelper.php | 3 +- .../Templating/Listing/FilterOrderHelper.php | 3 +- .../Templating/Listing/Templating.php | 3 +- .../PasswordRecover/TokenManagerTest.php | 4 +- .../Exception/HandlerNotFoundException.php | 4 +- .../migrations/Version20100000000000.php | 4 +- .../migrations/Version20220513151853.php | 4 +- .../AccompanyingPeriodStepChangeCronjob.php | 3 +- ...mpanyingPeriodStepChangeMessageHandler.php | 3 +- .../AccompanyingPeriodStepChanger.php | 3 +- .../AccompanyingCourseWorkController.php | 3 +- ...CourseWorkEvaluationDocumentController.php | 4 +- .../SocialWorkSocialActionApiController.php | 3 +- .../AccompanyingPeriodInfo.php | 3 +- .../JobWorkingOnCourseAggregator.php | 3 +- .../ScopeWorkingOnCourseAggregator.php | 3 +- .../UserWorkingOnCourseAggregator.php | 3 +- .../PersonAggregators/AgeAggregator.php | 3 +- .../PersonAggregators/CenterAggregator.php | 3 +- .../PersonAggregators/GenderAggregator.php | 4 +- .../Export/Export/ListAccompanyingPeriod.php | 3 +- .../Export/Export/ListPersonDuplicate.php | 4 +- ...istPersonWithAccompanyingPeriodDetails.php | 3 +- ...ccompanyingPeriodInfoWithinDatesFilter.php | 3 +- .../JobWorkingOnCourseFilter.php | 3 +- .../ScopeWorkingOnCourseFilter.php | 3 +- .../UserWorkingOnCourseFilter.php | 3 +- ...yingPeriodWorkEndDateBetweenDateFilter.php | 3 +- ...ngPeriodWorkStartDateBetweenDateFilter.php | 3 +- .../Helper/ListAccompanyingPeriodHelper.php | 3 +- .../Person/PersonCenterHistoryInterface.php | 4 +- .../PersonJsonNormalizerInterface.php | 4 +- ...companyingPeriodViewEntityInfoProvider.php | 3 +- ...PeriodWorkEvaluationGenericDocProvider.php | 3 +- ...PeriodWorkEvaluationGenericDocRenderer.php | 3 +- .../Import/SocialWorkMetadataInterface.php | 4 +- .../Entity/PersonRenderInterface.php | 4 +- .../Workflow/WorkflowEventSubscriberTest.php | 4 +- .../migrations/Version20160422000000.php | 4 +- .../migrations/Version20210419112619.php | 4 +- .../ChillReportBundle/ChillReportBundle.php | 4 +- .../Authorization/ReportVoterTest.php | 4 +- .../Repository/AbstractTaskRepository.php | 4 +- .../Repository/RecurringTaskRepository.php | 4 +- .../Repository/SingleTaskStateRepository.php | 3 +- .../Tests/Controller/TaskControllerTest.php | 4 +- .../Workflow/TaskWorkflowDefinition.php | 4 +- .../Search/ThirdPartyApiSearch.php | 4 +- .../ChillWopiBundle/src/ChillWopiBundle.php | 4 +- ...aultDataOnExportFilterAggregatorRector.php | 3 +- 110 files changed, 129 insertions(+), 333 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php index 5f872a7dc..a85ddbb75 100644 --- a/src/Bundle/ChillActivityBundle/ChillActivityBundle.php +++ b/src/Bundle/ChillActivityBundle/ChillActivityBundle.php @@ -13,6 +13,4 @@ namespace Chill\ActivityBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillActivityBundle extends Bundle -{ -} +class ChillActivityBundle extends Bundle {} diff --git a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php index 17545c1af..d81e33bcc 100644 --- a/src/Bundle/ChillActivityBundle/Controller/ActivityController.php +++ b/src/Bundle/ChillActivityBundle/Controller/ActivityController.php @@ -72,8 +72,7 @@ final class ActivityController extends AbstractController private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly PaginatorFactory $paginatorFactory, - ) { - } + ) {} /** * Deletes a Activity entity. diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php index 6930784d3..128704296 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/AvgActivityDuration.php @@ -36,9 +36,7 @@ class AvgActivityDuration implements ExportInterface, GroupedExportInterface $this->repository = $em->getRepository(Activity::class); } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php index d473a925a..28a318541 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToACP/CountActivity.php @@ -36,9 +36,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface $this->repository = $em->getRepository(Activity::class); } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php index 6360251b3..5b0fe2d2c 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/CountActivity.php @@ -32,9 +32,7 @@ class CountActivity implements ExportInterface, GroupedExportInterface $this->activityRepository = $activityRepository; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php index e68d47cd3..a679c4ac8 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/LinkedToPerson/StatActivityDuration.php @@ -50,9 +50,7 @@ class StatActivityDuration implements ExportInterface, GroupedExportInterface $this->activityRepository = $activityRepository; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php b/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php index fae6ea6a6..d1be2f662 100644 --- a/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php +++ b/src/Bundle/ChillActivityBundle/Export/Export/ListActivityHelper.php @@ -104,9 +104,7 @@ class ListActivityHelper ->addGroupBy('location.id'); } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getAllowedFormattersTypes() { diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php index 27e012d0b..20d0452fa 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/ACPFilters/PeriodHavingActivityBetweenDatesFilter.php @@ -23,8 +23,7 @@ final readonly class PeriodHavingActivityBetweenDatesFilter implements FilterInt { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function getTitle() { diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php index 7925f861b..f9db5c158 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityACLAwareRepository.php @@ -47,8 +47,7 @@ final readonly class ActivityACLAwareRepository implements ActivityACLAwareRepos private EntityManagerInterface $em, private Security $security, private RequestStack $requestStack, - ) { - } + ) {} /** * @throws NonUniqueResultException diff --git a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php index ce70409ba..9cc57f93f 100644 --- a/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php +++ b/src/Bundle/ChillActivityBundle/Repository/ActivityDocumentACLAwareRepository.php @@ -43,8 +43,7 @@ final readonly class ActivityDocumentACLAwareRepository implements ActivityDocum private CenterResolverManagerInterface $centerResolverManager, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private Security $security - ) { - } + ) {} public function buildFetchQueryActivityDocumentLinkedToPersonFromPersonContext(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null): FetchQueryInterface { diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php index 334b5d2df..05be52e25 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/AccompanyingPeriodActivityGenericDocProvider.php @@ -36,8 +36,7 @@ final class AccompanyingPeriodActivityGenericDocProvider implements GenericDocFo private EntityManagerInterface $em, private Security $security, private ActivityDocumentACLAwareRepositoryInterface $activityDocumentACLAwareRepository, - ) { - } + ) {} public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php index cf96449ab..f4a7c4afa 100644 --- a/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php +++ b/src/Bundle/ChillActivityBundle/Service/GenericDoc/Providers/PersonActivityGenericDocProvider.php @@ -29,8 +29,7 @@ final readonly class PersonActivityGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private ActivityDocumentACLAwareRepositoryInterface $personActivityDocumentACLAwareRepository, - ) { - } + ) {} public function buildFetchQueryForPerson(Person $person, ?DateTimeImmutable $startDate = null, ?DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php index 6917517b7..b0951e502 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php +++ b/src/Bundle/ChillAsideActivityBundle/src/ChillAsideActivityBundle.php @@ -13,6 +13,4 @@ namespace Chill\AsideActivityBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillAsideActivityBundle extends Bundle -{ -} +class ChillAsideActivityBundle extends Bundle {} diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php index c6a35e3d7..360e30efb 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Aggregator/ByLocationAggregator.php @@ -20,9 +20,7 @@ use Symfony\Component\Form\FormBuilderInterface; class ByLocationAggregator implements AggregatorInterface { - public function __construct(private LocationRepository $locationRepository) - { - } + public function __construct(private LocationRepository $locationRepository) {} /** * @inheritDoc diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php index 2b28062f6..351cbb4ea 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/AvgAsideActivityDuration.php @@ -31,9 +31,7 @@ class AvgAsideActivityDuration implements ExportInterface, GroupedExportInterfac $this->repository = $repository; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php index 91210f764..a8bfcc3a2 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/CountAsideActivity.php @@ -31,9 +31,7 @@ class CountAsideActivity implements ExportInterface, GroupedExportInterface $this->repository = $repository; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php index 93b0c495d..b43ee6e01 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/ListAsideActivity.php @@ -72,9 +72,7 @@ final class ListAsideActivity implements ListInterface, GroupedExportInterface $this->translatableStringHelper = $translatableStringHelper; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php index 741f129f1..87f4a3dc3 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Export/SumAsideActivityDuration.php @@ -31,9 +31,7 @@ class SumAsideActivityDuration implements ExportInterface, GroupedExportInterfac $this->repository = $repository; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php index f2808eca1..a1f51273c 100644 --- a/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php +++ b/src/Bundle/ChillAsideActivityBundle/src/Export/Filter/ByLocationFilter.php @@ -26,8 +26,7 @@ final readonly class ByLocationFilter implements FilterInterface { public function __construct( private Security $security - ) { - } + ) {} /** * @inheritDoc diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php index c3632d2db..a81ef34c3 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceReader.php @@ -28,8 +28,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface private HttpClientInterface $machineHttpClient, private MapCalendarToUser $mapCalendarToUser, private ClockInterface $clock, - ) { - } + ) {} /** * @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php index 10bf21b9b..a54fa217f 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/MSGraph/MSUserAbsenceSync.php @@ -21,8 +21,7 @@ readonly class MSUserAbsenceSync private MSUserAbsenceReaderInterface $absenceReader, private ClockInterface $clock, private LoggerInterface $logger, - ) { - } + ) {} public function syncUserAbsence(User $user): void { diff --git a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php index 211810abf..c8fb569e8 100644 --- a/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php +++ b/src/Bundle/ChillCalendarBundle/RemoteCalendar/Connector/NullRemoteCalendarConnector.php @@ -48,23 +48,13 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface return []; } - public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void - { - } + public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void {} - public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void - { - } + public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {} - public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void - { - } + public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {} - public function syncCalendarRange(CalendarRange $calendarRange): void - { - } + public function syncCalendarRange(CalendarRange $calendarRange): void {} - public function syncInvite(Invite $invite): void - { - } + public function syncInvite(Invite $invite): void {} } diff --git a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php index 527203003..74393a422 100644 --- a/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php +++ b/src/Bundle/ChillCalendarBundle/Service/DocGenerator/CalendarContextInterface.php @@ -23,6 +23,4 @@ use Symfony\Component\Form\FormBuilderInterface; * @extends DocGeneratorContextWithPublicFormInterface * @extends DocGeneratorContextWithAdminFormInterface */ -interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface -{ -} +interface CalendarContextInterface extends DocGeneratorContextWithPublicFormInterface, DocGeneratorContextWithAdminFormInterface {} diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php index 1040f9f0a..530843723 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/AccompanyingPeriodCalendarGenericDocProvider.php @@ -39,8 +39,7 @@ final readonly class AccompanyingPeriodCalendarGenericDocProvider implements Gen public function __construct( private Security $security, private EntityManagerInterface $em - ) { - } + ) {} /** * @throws MappingException diff --git a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php index f5d4b3cbb..8bc2d4c4c 100644 --- a/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php +++ b/src/Bundle/ChillCalendarBundle/Service/GenericDoc/Providers/PersonCalendarGenericDocProvider.php @@ -39,8 +39,7 @@ final readonly class PersonCalendarGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private EntityManagerInterface $em - ) { - } + ) {} private function addWhereClausesToQuery(FetchQuery $query, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null): FetchQuery { diff --git a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php index fa462737e..5d5377a15 100644 --- a/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php +++ b/src/Bundle/ChillCustomFieldsBundle/Form/Type/CustomFieldsTitleType.php @@ -16,9 +16,7 @@ use Symfony\Component\Form\FormBuilderInterface; class CustomFieldsTitleType extends AbstractType { - public function buildForm(FormBuilderInterface $builder, array $options) - { - } + public function buildForm(FormBuilderInterface $builder, array $options) {} public function getBlockPrefix() { diff --git a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php index 9a0650b2d..a686aa35c 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForAccompanyingPeriodController.php @@ -31,8 +31,7 @@ final readonly class GenericDocForAccompanyingPeriodController private PaginatorFactory $paginator, private Security $security, private EngineInterface $twig, - ) { - } + ) {} /** * @param AccompanyingPeriod $accompanyingPeriod diff --git a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php index e010c41c5..841d49425 100644 --- a/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php +++ b/src/Bundle/ChillDocStoreBundle/Controller/GenericDocForPerson.php @@ -30,8 +30,7 @@ final readonly class GenericDocForPerson private PaginatorFactory $paginator, private Security $security, private EngineInterface $twig, - ) { - } + ) {} /** * @throws \Doctrine\DBAL\Exception diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php index b1631bb24..22c51ccff 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/FetchQuery.php @@ -54,8 +54,7 @@ class FetchQuery implements FetchQueryInterface private array $selectIdentifierTypes = [], private array $selectDateParams = [], private array $selectDateTypes = [], - ) { - } + ) {} public function addJoinClause(string $sql, array $params = [], array $types = []): int { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php index fe9bf7e4f..7307f0d6a 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/GenericDocDTO.php @@ -21,8 +21,7 @@ final readonly class GenericDocDTO public array $identifiers, public \DateTimeImmutable $docDate, public AccompanyingPeriod|Person $linked, - ) { - } + ) {} public function getContext(): string { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php index fe03a8b00..d268636f6 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/AccompanyingCourseDocumentGenericDocProvider.php @@ -32,8 +32,7 @@ final readonly class AccompanyingCourseDocumentGenericDocProvider implements Gen public function __construct( private Security $security, private EntityManagerInterface $entityManager, - ) { - } + ) {} public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php index 613f8d758..60d247f0c 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Providers/PersonDocumentGenericDocProvider.php @@ -28,8 +28,7 @@ final readonly class PersonDocumentGenericDocProvider implements GenericDocForPe public function __construct( private Security $security, private PersonDocumentACLAwareRepositoryInterface $personDocumentACLAwareRepository, - ) { - } + ) {} public function buildFetchQueryForPerson( Person $person, diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php index c32620030..1912c326d 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Renderer/AccompanyingCourseDocumentGenericDocRenderer.php @@ -24,8 +24,7 @@ final readonly class AccompanyingCourseDocumentGenericDocRenderer implements Gen public function __construct( private AccompanyingCourseDocumentRepository $accompanyingCourseDocumentRepository, private PersonDocumentRepository $personDocumentRepository, - ) { - } + ) {} public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php b/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php index 8bb97a9b9..f1a605d77 100644 --- a/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php +++ b/src/Bundle/ChillDocStoreBundle/GenericDoc/Twig/GenericDocExtensionRuntime.php @@ -25,8 +25,7 @@ final readonly class GenericDocExtensionRuntime implements RuntimeExtensionInter * @var list */ private iterable $renderers, - ) { - } + ) {} /** * @throws RuntimeError diff --git a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php index 12506581c..bd39ba992 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/PersonDocumentACLAwareRepository.php @@ -38,8 +38,7 @@ final readonly class PersonDocumentACLAwareRepository implements PersonDocumentA private CenterResolverManagerInterface $centerResolverManager, private AuthorizationHelperForCurrentUserInterface $authorizationHelperForCurrentUser, private Security $security, - ) { - } + ) {} public function buildQueryByPerson(Person $person): QueryBuilder { diff --git a/src/Bundle/ChillEventBundle/ChillEventBundle.php b/src/Bundle/ChillEventBundle/ChillEventBundle.php index d5a1b43cf..9754f397f 100644 --- a/src/Bundle/ChillEventBundle/ChillEventBundle.php +++ b/src/Bundle/ChillEventBundle/ChillEventBundle.php @@ -13,6 +13,4 @@ namespace Chill\EventBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillEventBundle extends Bundle -{ -} +class ChillEventBundle extends Bundle {} diff --git a/src/Bundle/ChillEventBundle/Repository/EventRepository.php b/src/Bundle/ChillEventBundle/Repository/EventRepository.php index d24841d5c..c696709db 100644 --- a/src/Bundle/ChillEventBundle/Repository/EventRepository.php +++ b/src/Bundle/ChillEventBundle/Repository/EventRepository.php @@ -16,6 +16,4 @@ use Doctrine\ORM\EntityRepository; /** * Class EventRepository. */ -class EventRepository extends EntityRepository -{ -} +class EventRepository extends EntityRepository {} diff --git a/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php b/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php index 73a9713bd..ae86371ed 100644 --- a/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php +++ b/src/Bundle/ChillFamilyMembersBundle/ChillAMLIFamilyMembersBundle.php @@ -13,6 +13,4 @@ namespace Chill\FamilyMembersBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillAMLIFamilyMembersBundle extends Bundle -{ -} +class ChillAMLIFamilyMembersBundle extends Bundle {} diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php index 4bc9b4d79..64cdec59a 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/AbstractCRUDController.php @@ -150,9 +150,7 @@ abstract class AbstractCRUDController extends AbstractController return new $class(); } - protected function customizeQuery(string $action, Request $request, $query): void - { - } + protected function customizeQuery(string $action, Request $request, $query): void {} protected function getActionConfig(string $action) { diff --git a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php index 730ac32c1..9b206f566 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php +++ b/src/Bundle/ChillMainBundle/CRUD/Controller/CRUDController.php @@ -242,13 +242,9 @@ class CRUDController extends AbstractController /** * Customize the form created by createFormFor. */ - protected function customizeForm(string $action, FormInterface $form) - { - } + protected function customizeForm(string $action, FormInterface $form) {} - protected function customizeQuery(string $action, Request $request, $query): void - { - } + protected function customizeQuery(string $action, Request $request, $query): void {} /** * @param $id @@ -927,9 +923,7 @@ class CRUDController extends AbstractController } } - protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) - { - } + protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) {} /** * @param $action @@ -952,77 +946,55 @@ class CRUDController extends AbstractController /** * @param $entity */ - protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) {} /** * method used by indexAction. * * @param mixed $query */ - protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query) - { - } + protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query) {} /** * method used by indexAction. * * @param mixed $entities */ - protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities) - { - } + protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities) {} /** * @param $entity */ - protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) {} /** * @param $entity */ - protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) {} - protected function onPreDelete(string $action, Request $request) - { - } + protected function onPreDelete(string $action, Request $request) {} /** * @param $entity */ - protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) {} - protected function onPreIndex(string $action, Request $request) - { - } + protected function onPreIndex(string $action, Request $request) {} /** * method used by indexAction. */ - protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) - { - } + protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) {} /** * @param $entity */ - protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) {} /** * @param $entity */ - protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) - { - } + protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) {} /** * Add ordering fields in the query build by self::queryEntities. diff --git a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php index 3ff3cf134..95f81ae05 100644 --- a/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php +++ b/src/Bundle/ChillMainBundle/CRUD/Form/CRUDDeleteEntityForm.php @@ -16,6 +16,4 @@ use Symfony\Component\Form\AbstractType; /** * Class CRUDDeleteEntityForm. */ -class CRUDDeleteEntityForm extends AbstractType -{ -} +class CRUDDeleteEntityForm extends AbstractType {} diff --git a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php index ea42fde78..334ed50a7 100644 --- a/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php +++ b/src/Bundle/ChillMainBundle/Command/LoadPostalCodesCommand.php @@ -213,14 +213,8 @@ class LoadPostalCodesCommand extends Command } } -class ExistingPostalCodeException extends Exception -{ -} +class ExistingPostalCodeException extends Exception {} -class CountryCodeNotFoundException extends Exception -{ -} +class CountryCodeNotFoundException extends Exception {} -class PostalCodeNotValidException extends Exception -{ -} +class PostalCodeNotValidException extends Exception {} diff --git a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php index bc28f9d12..418f49578 100644 --- a/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php +++ b/src/Bundle/ChillMainBundle/Controller/LocationTypeController.php @@ -13,6 +13,4 @@ namespace Chill\MainBundle\Controller; use Chill\MainBundle\CRUD\Controller\CRUDController; -class LocationTypeController extends CRUDController -{ -} +class LocationTypeController extends CRUDController {} diff --git a/src/Bundle/ChillMainBundle/Controller/LoginController.php b/src/Bundle/ChillMainBundle/Controller/LoginController.php index 8a2468745..8c467dac1 100644 --- a/src/Bundle/ChillMainBundle/Controller/LoginController.php +++ b/src/Bundle/ChillMainBundle/Controller/LoginController.php @@ -44,7 +44,5 @@ class LoginController extends AbstractController ]); } - public function LoginCheckAction(Request $request) - { - } + public function LoginCheckAction(Request $request) {} } diff --git a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php index 97e80916c..a745994ab 100644 --- a/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php +++ b/src/Bundle/ChillMainBundle/Controller/PermissionsGroupController.php @@ -50,8 +50,7 @@ final class PermissionsGroupController extends AbstractController private readonly EntityManagerInterface $em, private readonly PermissionsGroupRepository $permissionsGroupRepository, private readonly RoleScopeRepository $roleScopeRepository, - ) { - } + ) {} /** */ diff --git a/src/Bundle/ChillMainBundle/Controller/UserExportController.php b/src/Bundle/ChillMainBundle/Controller/UserExportController.php index 530ac19b7..f15f79bf0 100644 --- a/src/Bundle/ChillMainBundle/Controller/UserExportController.php +++ b/src/Bundle/ChillMainBundle/Controller/UserExportController.php @@ -27,8 +27,7 @@ final readonly class UserExportController private UserRepositoryInterface $userRepository, private Security $security, private TranslatorInterface $translator, - ) { - } + ) {} /** * @throws \League\Csv\CannotInsertRecord diff --git a/src/Bundle/ChillMainBundle/Entity/User.php b/src/Bundle/ChillMainBundle/Entity/User.php index 35b73786b..0c6ba65f8 100644 --- a/src/Bundle/ChillMainBundle/Entity/User.php +++ b/src/Bundle/ChillMainBundle/Entity/User.php @@ -175,9 +175,7 @@ class User implements UserInterface return $this; } - public function eraseCredentials() - { - } + public function eraseCredentials() {} public function getAbsenceStart(): ?DateTimeImmutable { diff --git a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php index 5271fb223..e21ea7f4d 100644 --- a/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php +++ b/src/Bundle/ChillMainBundle/Export/ExportFormHelper.php @@ -26,8 +26,7 @@ final readonly class ExportFormHelper private AuthorizationHelperForCurrentUserInterface $authorizationHelper, private ExportManager $exportManager, private FormFactoryInterface $formFactory, - ) { - } + ) {} public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array { diff --git a/src/Bundle/ChillMainBundle/Export/ListInterface.php b/src/Bundle/ChillMainBundle/Export/ListInterface.php index 53442f0e7..9b88525ca 100644 --- a/src/Bundle/ChillMainBundle/Export/ListInterface.php +++ b/src/Bundle/ChillMainBundle/Export/ListInterface.php @@ -20,6 +20,4 @@ namespace Chill\MainBundle\Export; * * When used, the `ExportManager` will not handle aggregator for this class. */ -interface ListInterface extends ExportInterface -{ -} +interface ListInterface extends ExportInterface {} diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php index 1ea01d5f8..cfcf4a471 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/AggregatorType.php @@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; class AggregatorType extends AbstractType { - public function __construct() - { - } + public function __construct() {} public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php index 7994881d5..cc2ee6e0c 100644 --- a/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php +++ b/src/Bundle/ChillMainBundle/Form/Type/Export/FilterType.php @@ -21,9 +21,7 @@ class FilterType extends AbstractType { public const ENABLED_FIELD = 'enabled'; - public function __construct() - { - } + public function __construct() {} public function buildForm(FormBuilderInterface $builder, array $options) { diff --git a/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php b/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php index 61eafd312..3063d190e 100644 --- a/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php +++ b/src/Bundle/ChillMainBundle/Notification/Exception/NotificationHandlerNotFound.php @@ -13,6 +13,4 @@ namespace Chill\MainBundle\Notification\Exception; use RuntimeException; -class NotificationHandlerNotFound extends RuntimeException -{ -} +class NotificationHandlerNotFound extends RuntimeException {} diff --git a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php index 5070f77fd..b3a8570d8 100644 --- a/src/Bundle/ChillMainBundle/Redis/ChillRedis.php +++ b/src/Bundle/ChillMainBundle/Redis/ChillRedis.php @@ -16,6 +16,4 @@ use Redis; /** * Redis client configured by chill main. */ -class ChillRedis extends Redis -{ -} +class ChillRedis extends Redis {} diff --git a/src/Bundle/ChillMainBundle/Search/ParsingException.php b/src/Bundle/ChillMainBundle/Search/ParsingException.php index b54afef6a..550535d73 100644 --- a/src/Bundle/ChillMainBundle/Search/ParsingException.php +++ b/src/Bundle/ChillMainBundle/Search/ParsingException.php @@ -13,6 +13,4 @@ namespace Chill\MainBundle\Search; use Exception; -class ParsingException extends Exception -{ -} +class ParsingException extends Exception {} diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php index 02ffc9122..934a80956 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/AbstractChillVoter.php @@ -24,6 +24,4 @@ use const E_USER_DEPRECATED; * * This abstract Voter provide generic methods to handle object specific to Chill */ -abstract class AbstractChillVoter extends Voter implements ChillVoterInterface -{ -} +abstract class AbstractChillVoter extends Voter implements ChillVoterInterface {} diff --git a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php index 2ed1856d2..f8b0102c7 100644 --- a/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php +++ b/src/Bundle/ChillMainBundle/Security/Authorization/ChillVoterInterface.php @@ -14,6 +14,4 @@ namespace Chill\MainBundle\Security\Authorization; /** * Provides methods for compiling voter and build admin role fields. */ -interface ChillVoterInterface -{ -} +interface ChillVoterInterface {} diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php index 2a26034ce..4d4c4ec10 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCode.php @@ -101,8 +101,7 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA public function __construct( private Connection $connection, private LoggerInterface $logger, - ) { - } + ) {} /** * @throws \Throwable diff --git a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php index d2c9fc960..ed055a3c3 100644 --- a/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php +++ b/src/Bundle/ChillMainBundle/Service/AddressGeographicalUnit/CollateAddressWithReferenceOrPostalCodeCronJob.php @@ -22,8 +22,7 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C public function __construct( private ClockInterface $clock, private CollateAddressWithReferenceOrPostalCodeInterface $collateAddressWithReferenceOrPostalCode, - ) { - } + ) {} public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php b/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php index 6b7b81224..f88f38d19 100644 --- a/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php +++ b/src/Bundle/ChillMainBundle/Service/EntityInfo/ViewEntityInfoManager.php @@ -21,8 +21,7 @@ class ViewEntityInfoManager */ private iterable $vienEntityInfoProviders, private Connection $connection, - ) { - } + ) {} public function synchronizeOnDB(): void { diff --git a/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php b/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php index 82dea7bc6..16bc87790 100644 --- a/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php +++ b/src/Bundle/ChillMainBundle/Service/ShortMessage/NullShortMessageSender.php @@ -20,7 +20,5 @@ namespace Chill\MainBundle\Service\ShortMessage; class NullShortMessageSender implements ShortMessageSenderInterface { - public function send(ShortMessage $shortMessage): void - { - } + public function send(ShortMessage $shortMessage): void {} } diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php index 5b36e52b3..0aa8594f9 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderGetActiveFilterHelper.php @@ -22,8 +22,7 @@ final readonly class FilterOrderGetActiveFilterHelper private TranslatorInterface $translator, private PropertyAccessorInterface $propertyAccessor, private UserRender $userRender, - ) { - } + ) {} /** * Return all the data required to display the active filters diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php index 8bcc7ffae..309db574c 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/FilterOrderHelper.php @@ -54,8 +54,7 @@ final class FilterOrderHelper public function __construct( private readonly FormFactoryInterface $formFactory, private readonly RequestStack $requestStack, - ) { - } + ) {} public function addSingleCheckbox(string $name, string $label): self { diff --git a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php index 2d32813cb..63b556283 100644 --- a/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php +++ b/src/Bundle/ChillMainBundle/Templating/Listing/Templating.php @@ -25,8 +25,7 @@ class Templating extends AbstractExtension public function __construct( private readonly RequestStack $requestStack, private readonly FilterOrderGetActiveFilterHelper $filterOrderGetActiveFilterHelper, - ) { - } + ) {} public function getFilters(): array { diff --git a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php index 1fee5b4be..e3d2b1f07 100644 --- a/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php +++ b/src/Bundle/ChillMainBundle/Tests/Security/PasswordRecover/TokenManagerTest.php @@ -36,9 +36,7 @@ final class TokenManagerTest extends KernelTestCase $this->tokenManager = new TokenManager('secret', $logger); } - public static function setUpBefore() - { - } + public static function setUpBefore() {} public function testGenerate() { diff --git a/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php b/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php index ab3d2c98c..d6b5c0c8f 100644 --- a/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php +++ b/src/Bundle/ChillMainBundle/Workflow/Exception/HandlerNotFoundException.php @@ -13,6 +13,4 @@ namespace Chill\MainBundle\Workflow\Exception; use RuntimeException; -class HandlerNotFoundException extends RuntimeException -{ -} +class HandlerNotFoundException extends RuntimeException {} diff --git a/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php b/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php index 5ae675b51..55f5a6420 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20100000000000.php @@ -16,9 +16,7 @@ use Doctrine\Migrations\AbstractMigration; class Version20100000000000 extends AbstractMigration { - public function down(Schema $schema): void - { - } + public function down(Schema $schema): void {} public function up(Schema $schema): void { diff --git a/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php b/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php index c46b40ee5..4bd9bd18f 100644 --- a/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php +++ b/src/Bundle/ChillMainBundle/migrations/Version20220513151853.php @@ -16,9 +16,7 @@ use Doctrine\Migrations\AbstractMigration; final class Version20220513151853 extends AbstractMigration { - public function down(Schema $schema): void - { - } + public function down(Schema $schema): void {} public function getDescription(): string { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php index 2ddf3415c..0d362c581 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeCronjob.php @@ -20,8 +20,7 @@ readonly class AccompanyingPeriodStepChangeCronjob implements CronJobInterface public function __construct( private ClockInterface $clock, private AccompanyingPeriodStepChangeRequestor $requestor, - ) { - } + ) {} public function canRun(?CronJobExecution $cronJobExecution): bool { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php index 4a9873c6d..a40ac9880 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChangeMessageHandler.php @@ -23,8 +23,7 @@ class AccompanyingPeriodStepChangeMessageHandler implements MessageHandlerInterf public function __construct( private AccompanyingPeriodRepository $accompanyingPeriodRepository, private AccompanyingPeriodStepChanger $changer, - ) { - } + ) {} public function __invoke(AccompanyingPeriodStepChangeRequestMessage $message): void { diff --git a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php index 05dfee6db..b8fb49c7c 100644 --- a/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php +++ b/src/Bundle/ChillPersonBundle/AccompanyingPeriod/Lifecycle/AccompanyingPeriodStepChanger.php @@ -30,8 +30,7 @@ class AccompanyingPeriodStepChanger private EntityManagerInterface $entityManager, private LoggerInterface $logger, private Registry $workflowRegistry, - ) { - } + ) {} public function __invoke(AccompanyingPeriod $period, string $transition, ?string $workflowName = null): void { diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php index 66d020ad1..eb41341f6 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkController.php @@ -43,8 +43,7 @@ final class AccompanyingCourseWorkController extends AbstractController private readonly LoggerInterface $chillLogger, private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory - ) { - } + ) {} /** * @Route( diff --git a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php index b9daf5a09..9e6602b3a 100644 --- a/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php +++ b/src/Bundle/ChillPersonBundle/Controller/AccompanyingCourseWorkEvaluationDocumentController.php @@ -20,9 +20,7 @@ use Symfony\Component\Security\Core\Security; class AccompanyingCourseWorkEvaluationDocumentController extends AbstractController { - public function __construct(private Security $security) - { - } + public function __construct(private Security $security) {} /** * @Route( diff --git a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php index ae70d55f9..ddd9310b3 100644 --- a/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/SocialWorkSocialActionApiController.php @@ -28,8 +28,7 @@ final class SocialWorkSocialActionApiController extends ApiController private readonly SocialIssueRepository $socialIssueRepository, private readonly PaginatorFactory $paginator, private readonly ClockInterface $clock, - ) { - } + ) {} public function listBySocialIssueApi($id, Request $request) { diff --git a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php index 795247eda..7a762e487 100644 --- a/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php +++ b/src/Bundle/ChillPersonBundle/Entity/AccompanyingPeriod/AccompanyingPeriodInfo.php @@ -74,6 +74,5 @@ class AccompanyingPeriodInfo * @ORM\Column(type="text") */ public readonly string $discriminator, - ) { - } + ) {} } diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php index e93300e85..46489069d 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/JobWorkingOnCourseAggregator.php @@ -27,8 +27,7 @@ final readonly class JobWorkingOnCourseAggregator implements AggregatorInterface public function __construct( private UserJobRepositoryInterface $userJobRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php index b9f493af9..a5b2f10f0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/ScopeWorkingOnCourseAggregator.php @@ -28,8 +28,7 @@ final readonly class ScopeWorkingOnCourseAggregator implements AggregatorInterfa public function __construct( private ScopeRepositoryInterface $scopeRepository, private TranslatableStringHelperInterface $translatableStringHelper, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php index b4941fa01..862a2de79 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/AccompanyingCourseAggregators/UserWorkingOnCourseAggregator.php @@ -27,8 +27,7 @@ final readonly class UserWorkingOnCourseAggregator implements AggregatorInterfac public function __construct( private UserRender $userRender, private UserRepositoryInterface $userRepository, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php index e3d364fa2..772087487 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/AgeAggregator.php @@ -24,8 +24,7 @@ final readonly class AgeAggregator implements AggregatorInterface, ExportElement { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php index 9be0b0c7e..99187264a 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/CenterAggregator.php @@ -28,8 +28,7 @@ final readonly class CenterAggregator implements AggregatorInterface public function __construct( private CenterRepositoryInterface $centerRepository, private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php index dbe3d19d3..aae54fd47 100644 --- a/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php +++ b/src/Bundle/ChillPersonBundle/Export/Aggregator/PersonAggregators/GenderAggregator.php @@ -45,9 +45,7 @@ final class GenderAggregator implements AggregatorInterface return Declarations::PERSON_TYPE; } - public function buildForm(FormBuilderInterface $builder) - { - } + public function buildForm(FormBuilderInterface $builder) {} public function getFormDefaultData(): array { return []; diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php index ab9c0db2f..4c8c0cae8 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListAccompanyingPeriod.php @@ -52,8 +52,7 @@ final readonly class ListAccompanyingPeriod implements ListInterface, GroupedExp private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter, private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php index e7c105604..82f7507c5 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonDuplicate.php @@ -146,9 +146,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat return PersonVoter::DUPLICATE; } - public function validateForm($data, ExecutionContextInterface $context) - { - } + public function validateForm($data, ExecutionContextInterface $context) {} protected function getHeaders(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php index ddb16bb2d..66d4d1530 100644 --- a/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php +++ b/src/Bundle/ChillPersonBundle/Export/Export/ListPersonWithAccompanyingPeriodDetails.php @@ -50,8 +50,7 @@ final readonly class ListPersonWithAccompanyingPeriodDetails implements ListInte private ListAccompanyingPeriodHelper $listAccompanyingPeriodHelper, private EntityManagerInterface $entityManager, private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder) { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php index d50622502..f50fd6575 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/HavingAnAccompanyingPeriodInfoWithinDatesFilter.php @@ -30,8 +30,7 @@ final readonly class HavingAnAccompanyingPeriodInfoWithinDatesFilter implements { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php index 63a668b6d..142cfd307 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/JobWorkingOnCourseFilter.php @@ -38,8 +38,7 @@ readonly class JobWorkingOnCourseFilter implements FilterInterface private UserJobRepositoryInterface $userJobRepository, private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelperInterface $translatableStringHelper, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php index b9787bf52..6aef4e3da 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/ScopeWorkingOnCourseFilter.php @@ -40,8 +40,7 @@ readonly class ScopeWorkingOnCourseFilter implements FilterInterface private ScopeRepositoryInterface $scopeRepository, private RollingDateConverterInterface $rollingDateConverter, private TranslatableStringHelperInterface $translatableStringHelper, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php index 1f9bfc61a..0147890ad 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/AccompanyingCourseFilters/UserWorkingOnCourseFilter.php @@ -33,8 +33,7 @@ readonly class UserWorkingOnCourseFilter implements FilterInterface public function __construct( private UserRender $userRender, private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php index e78b1d021..4e50f2ed7 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkEndDateBetweenDateFilter.php @@ -24,8 +24,7 @@ final readonly class AccompanyingPeriodWorkEndDateBetweenDateFilter implements F { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php index 947e6c57c..5e56b9898 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkStartDateBetweenDateFilter.php @@ -24,8 +24,7 @@ final readonly class AccompanyingPeriodWorkStartDateBetweenDateFilter implements { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index 5fa2252cd..9fc538a86 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -75,8 +75,7 @@ final readonly class ListAccompanyingPeriodHelper private SocialIssueRender $socialIssueRender, private TranslatableStringHelperInterface $translatableStringHelper, private TranslatorInterface $translator, - ) { - } + ) {} public function getQueryKeys($data) { diff --git a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php index c1bb427fd..fc5d0606d 100644 --- a/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php +++ b/src/Bundle/ChillPersonBundle/Repository/Person/PersonCenterHistoryInterface.php @@ -13,6 +13,4 @@ namespace Chill\PersonBundle\Repository\Person; use Doctrine\Persistence\ObjectRepository; -interface PersonCenterHistoryInterface extends ObjectRepository -{ -} +interface PersonCenterHistoryInterface extends ObjectRepository {} diff --git a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php index 96f9ea934..36ec86966 100644 --- a/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php +++ b/src/Bundle/ChillPersonBundle/Serializer/Normalizer/PersonJsonNormalizerInterface.php @@ -19,6 +19,4 @@ use Symfony\Component\Serializer\Normalizer\NormalizerInterface; */ interface PersonJsonNormalizerInterface extends DenormalizerInterface, - NormalizerInterface -{ -} + NormalizerInterface {} diff --git a/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php b/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php index ce9128896..9cfcc2a19 100644 --- a/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php +++ b/src/Bundle/ChillPersonBundle/Service/EntityInfo/AccompanyingPeriodViewEntityInfoProvider.php @@ -21,8 +21,7 @@ class AccompanyingPeriodViewEntityInfoProvider implements ViewEntityInfoProvider */ private iterable $unions, private AccompanyingPeriodInfoQueryBuilder $builder, - ) { - } + ) {} public function getViewQuery(): string { diff --git a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php index f8b99a048..84de67576 100644 --- a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php +++ b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Providers/AccompanyingPeriodWorkEvaluationGenericDocProvider.php @@ -31,8 +31,7 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocProvider implemen public function __construct( private Security $security, private EntityManagerInterface $entityManager, - ) { - } + ) {} public function buildFetchQueryForAccompanyingPeriod(AccompanyingPeriod $accompanyingPeriod, ?\DateTimeImmutable $startDate = null, ?\DateTimeImmutable $endDate = null, ?string $content = null, ?string $origin = null): FetchQueryInterface { diff --git a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php index 9810fe7a1..f77beb283 100644 --- a/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php +++ b/src/Bundle/ChillPersonBundle/Service/GenericDoc/Renderer/AccompanyingPeriodWorkEvaluationGenericDocRenderer.php @@ -21,8 +21,7 @@ final readonly class AccompanyingPeriodWorkEvaluationGenericDocRenderer implemen { public function __construct( private AccompanyingPeriodWorkEvaluationDocumentRepository $accompanyingPeriodWorkEvaluationDocumentRepository, - ) { - } + ) {} public function supports(GenericDocDTO $genericDocDTO, $options = []): bool { diff --git a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php index f61d22252..f31612606 100644 --- a/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php +++ b/src/Bundle/ChillPersonBundle/Service/Import/SocialWorkMetadataInterface.php @@ -11,6 +11,4 @@ declare(strict_types=1); namespace Chill\PersonBundle\Service\Import; -interface SocialWorkMetadataInterface extends ChillImporter -{ -} +interface SocialWorkMetadataInterface extends ChillImporter {} diff --git a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php index 2f69d31a9..203281b67 100644 --- a/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php +++ b/src/Bundle/ChillPersonBundle/Templating/Entity/PersonRenderInterface.php @@ -19,6 +19,4 @@ use Chill\PersonBundle\Entity\Person; * * @extends ChillEntityRenderInterface */ -interface PersonRenderInterface extends ChillEntityRenderInterface -{ -} +interface PersonRenderInterface extends ChillEntityRenderInterface {} diff --git a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php index 7dccb81e3..cc607ba4b 100644 --- a/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/AccompanyingPeriod/Workflow/WorkflowEventSubscriberTest.php @@ -17,6 +17,4 @@ use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; * @internal * @coversNothing */ -final class WorkflowEventSubscriberTest extends KernelTestCase -{ -} +final class WorkflowEventSubscriberTest extends KernelTestCase {} diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php index 148ceee3a..4399b36d8 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20160422000000.php @@ -21,9 +21,7 @@ use function count; */ class Version20160422000000 extends AbstractMigration { - public function down(Schema $schema): void - { - } + public function down(Schema $schema): void {} public function up(Schema $schema): void { diff --git a/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php b/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php index 8db3880ed..e713486d0 100644 --- a/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php +++ b/src/Bundle/ChillPersonBundle/migrations/Version20210419112619.php @@ -19,9 +19,7 @@ use Doctrine\Migrations\AbstractMigration; */ final class Version20210419112619 extends AbstractMigration { - public function down(Schema $schema): void - { - } + public function down(Schema $schema): void {} public function getDescription(): string { diff --git a/src/Bundle/ChillReportBundle/ChillReportBundle.php b/src/Bundle/ChillReportBundle/ChillReportBundle.php index ef92fa192..76bc4c9b2 100644 --- a/src/Bundle/ChillReportBundle/ChillReportBundle.php +++ b/src/Bundle/ChillReportBundle/ChillReportBundle.php @@ -13,6 +13,4 @@ namespace Chill\ReportBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -class ChillReportBundle extends Bundle -{ -} +class ChillReportBundle extends Bundle {} diff --git a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php index 4179df56d..3255b2edc 100644 --- a/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php +++ b/src/Bundle/ChillReportBundle/Tests/Security/Authorization/ReportVoterTest.php @@ -43,9 +43,7 @@ final class ReportVoterTest extends KernelTestCase */ protected $voter; - public static function setUpBeforeClass(): void - { - } + public static function setUpBeforeClass(): void {} protected function setUp(): void { diff --git a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php index d19420580..6ac7f10ec 100644 --- a/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/AbstractTaskRepository.php @@ -17,6 +17,4 @@ namespace Chill\TaskBundle\Repository; * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ -abstract class AbstractTaskRepository extends \Doctrine\ORM\EntityRepository -{ -} +abstract class AbstractTaskRepository extends \Doctrine\ORM\EntityRepository {} diff --git a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php index 4bbedd1bb..985aa9935 100644 --- a/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/RecurringTaskRepository.php @@ -17,6 +17,4 @@ namespace Chill\TaskBundle\Repository; * This class was generated by the Doctrine ORM. Add your own custom * repository methods below. */ -class RecurringTaskRepository extends \Doctrine\ORM\EntityRepository -{ -} +class RecurringTaskRepository extends \Doctrine\ORM\EntityRepository {} diff --git a/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php b/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php index c0d596e09..4d8c0a88c 100644 --- a/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php +++ b/src/Bundle/ChillTaskBundle/Repository/SingleTaskStateRepository.php @@ -22,8 +22,7 @@ class SingleTaskStateRepository public function __construct( private Connection $connection - ) { - } + ) {} /** * Return a list of all states associated to at least one single task in the database diff --git a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php index 41832a25c..a309f9c49 100644 --- a/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php +++ b/src/Bundle/ChillTaskBundle/Tests/Controller/TaskControllerTest.php @@ -17,6 +17,4 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; * @internal * @coversNothing */ -final class TaskControllerTest extends WebTestCase -{ -} +final class TaskControllerTest extends WebTestCase {} diff --git a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php index 76a8da7c8..81fea25e6 100644 --- a/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php +++ b/src/Bundle/ChillTaskBundle/Workflow/TaskWorkflowDefinition.php @@ -11,6 +11,4 @@ declare(strict_types=1); namespace Chill\TaskBundle\Workflow; -interface TaskWorkflowDefinition -{ -} +interface TaskWorkflowDefinition {} diff --git a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php index 1d4e12074..ddce88f0a 100644 --- a/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php +++ b/src/Bundle/ChillThirdPartyBundle/Search/ThirdPartyApiSearch.php @@ -61,9 +61,7 @@ class ThirdPartyApiSearch implements SearchApiInterface return $this->thirdPartyRepository->find($metadata['id']); } - public function prepare(array $metadatas): void - { - } + public function prepare(array $metadatas): void {} public function provideQuery(string $pattern, array $parameters): SearchApiQuery { diff --git a/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php b/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php index 5ca164db1..401eb9970 100644 --- a/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php +++ b/src/Bundle/ChillWopiBundle/src/ChillWopiBundle.php @@ -13,6 +13,4 @@ namespace Chill\WopiBundle; use Symfony\Component\HttpKernel\Bundle\Bundle; -final class ChillWopiBundle extends Bundle -{ -} +final class ChillWopiBundle extends Bundle {} diff --git a/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php b/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php index 4718aedac..12ba9179d 100644 --- a/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php +++ b/utils/rector/src/Rector/ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector.php @@ -25,8 +25,7 @@ class ChillBundleAddFormDefaultDataOnExportFilterAggregatorRector extends Abstra { public function __construct( private readonly ClassAnalyzer $classAnalyzer, - ) { - } + ) {} public function getRuleDefinition(): RuleDefinition { From cd85e37c1bf02cabe011aca75dee54fa99146cee Mon Sep 17 00:00:00 2001 From: Julie Lenaerts Date: Thu, 14 Sep 2023 14:30:58 +0200 Subject: [PATCH 14/14] do active center filtering in frontend for person creation --- .../Serializer/Normalizer/CenterNormalizer.php | 1 + .../ChillPersonBundle/Controller/PersonApiController.php | 2 -- .../Resources/public/vuejs/_components/OnTheFly/Person.vue | 7 ++++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php index e0b2a3e96..578fc4ce2 100644 --- a/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php +++ b/src/Bundle/ChillMainBundle/Serializer/Normalizer/CenterNormalizer.php @@ -63,6 +63,7 @@ class CenterNormalizer implements DenormalizerInterface, NormalizerInterface 'id' => $center->getId(), 'type' => 'center', 'name' => $center->getName(), + 'isActive' => $center->getIsActive() ]; } diff --git a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php index 0ca3bd94a..78dfc268c 100644 --- a/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php +++ b/src/Bundle/ChillPersonBundle/Controller/PersonApiController.php @@ -53,8 +53,6 @@ class PersonApiController extends ApiController { $centers = $this->authorizedCenterOnPersonCreation->getCenters(); - // $centersActive = array_filter($centers, fn(Center $c) => $c->getIsActive()); - return $this->json( ['showCenters' => $this->showCenters, 'centers' => $centers], Response::HTTP_OK, diff --git a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue index 16a76c780..46d78b77c 100644 --- a/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue +++ b/src/Bundle/ChillPersonBundle/Resources/public/vuejs/_components/OnTheFly/Person.vue @@ -329,12 +329,13 @@ export default { if (this.action !== 'create') { this.loadData(); } else { - console.log('show centers', this.showCenters); + // console.log('show centers', this.showCenters); getCentersForPersonCreation() .then(params => { - this.config.centers = params.centers; + this.config.centers = params.centers.filter(c => c.isActive); this.showCenters = params.showCenters; - console.log('show centers inside', this.showCenters); + // console.log('centers', this.config.centers) + // console.log('show centers inside', this.showCenters); if (this.showCenters && this.config.centers.length === 1) { this.person.center = this.config.centers[0]; }