From 92800f5dd0cbb05623bd50f574f555da80cc60f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 4 Apr 2024 22:19:56 +0200 Subject: [PATCH] fix cs --- .../ChillActivityBundle/Export/Filter/UsersJobFilter.php | 3 +-- src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php | 3 +-- src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php | 3 +-- .../Controller/DocGeneratorTemplateController.php | 2 -- .../ChillDocGeneratorBundle/Service/Generator/Generator.php | 3 +-- .../OnAfterMessageHandledClearStoredObjectCache.php | 3 +-- .../Service/Messenger/OnGenerationFails.php | 3 +-- .../Service/Messenger/RequestGenerationHandler.php | 3 +-- .../Repository/StoredObjectRepositoryInterface.php | 4 +--- src/Bundle/ChillMainBundle/ChillMainBundle.php | 1 - .../ChillMainBundle/Controller/DashboardApiController.php | 3 +-- .../ChillMainBundle/Controller/NewsItemApiController.php | 3 +-- .../ChillMainBundle/Controller/NewsItemHistoryController.php | 3 +-- .../Routing/MenuBuilder/AdminNewsMenuBuilder.php | 4 +--- src/Bundle/ChillMainBundle/Security/RoleProvider.php | 5 +---- ...ccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php | 3 +-- .../Export/Filter/SocialWorkFilters/JobFilter.php | 3 +-- .../Export/Filter/SocialWorkFilters/ScopeFilter.php | 3 +-- .../Export/Helper/ListAccompanyingPeriodHelper.php | 3 +-- .../ChillPersonBundle/Export/Helper/ListPersonHelper.php | 3 +-- 20 files changed, 18 insertions(+), 43 deletions(-) diff --git a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php index 0987e7ae9..f6d23ea78 100644 --- a/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php +++ b/src/Bundle/ChillActivityBundle/Export/Filter/UsersJobFilter.php @@ -30,8 +30,7 @@ class UsersJobFilter implements FilterInterface public function __construct( private readonly TranslatableStringHelperInterface $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php index b2b5e6a12..5543a453b 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/JobFilter.php @@ -29,8 +29,7 @@ final readonly class JobFilter implements FilterInterface public function __construct( private TranslatableStringHelper $translatableStringHelper, private UserJobRepositoryInterface $userJobRepository - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php index 179258e41..2f46db892 100644 --- a/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php +++ b/src/Bundle/ChillCalendarBundle/Export/Filter/ScopeFilter.php @@ -31,8 +31,7 @@ class ScopeFilter implements FilterInterface protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly ScopeRepositoryInterface $scopeRepository - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php index 3b2bd5a42..08470778a 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php +++ b/src/Bundle/ChillDocGeneratorBundle/Controller/DocGeneratorTemplateController.php @@ -18,7 +18,6 @@ use Chill\DocGeneratorBundle\Entity\DocGeneratorTemplate; use Chill\DocGeneratorBundle\Repository\DocGeneratorTemplateRepository; use Chill\DocGeneratorBundle\Service\Messenger\RequestGenerationMessage; use Chill\DocStoreBundle\Entity\StoredObject; -use Chill\MainBundle\Entity\User; use Chill\MainBundle\Form\Type\PickUserDynamicType; use Chill\MainBundle\Pagination\PaginatorFactory; use Chill\MainBundle\Security\ChillSecurity; @@ -36,7 +35,6 @@ use Symfony\Component\HttpKernel\Exception\BadRequestHttpException; use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; use Symfony\Component\Messenger\MessageBusInterface; use Symfony\Component\Routing\Annotation\Route; -use Symfony\Component\Security\Core\Security; use Symfony\Component\Serializer\Normalizer\AbstractNormalizer; use Symfony\Component\Validator\Constraints\NotBlank; use Symfony\Component\Validator\Constraints\NotNull; diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php index 702d7f114..127d135bb 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Generator/Generator.php @@ -34,8 +34,7 @@ class Generator implements GeneratorInterface private readonly ManagerRegistry $objectManagerRegistry, private readonly LoggerInterface $logger, private readonly StoredObjectManagerInterface $storedObjectManager - ) { - } + ) {} public function generateDataDump( DocGeneratorTemplate $template, diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php index a558f5fde..0256f8a8a 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnAfterMessageHandledClearStoredObjectCache.php @@ -26,8 +26,7 @@ final readonly class OnAfterMessageHandledClearStoredObjectCache implements Even public function __construct( private StoredObjectManagerInterface $storedObjectManager, private LoggerInterface $logger, - ) { - } + ) {} public static function getSubscribedEvents() { diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php index e1bd20ac8..e3491f339 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/OnGenerationFails.php @@ -40,8 +40,7 @@ final readonly class OnGenerationFails implements EventSubscriberInterface private StoredObjectRepositoryInterface $storedObjectRepository, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository - ) { - } + ) {} public static function getSubscribedEvents() { diff --git a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php index aba61fb9f..dbd45fde0 100644 --- a/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php +++ b/src/Bundle/ChillDocGeneratorBundle/Service/Messenger/RequestGenerationHandler.php @@ -46,8 +46,7 @@ class RequestGenerationHandler implements MessageHandlerInterface private readonly MailerInterface $mailer, private readonly TempUrlGeneratorInterface $tempUrlGenerator, private readonly TranslatorInterface $translator, - ) { - } + ) {} public function __invoke(RequestGenerationMessage $message) { diff --git a/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepositoryInterface.php b/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepositoryInterface.php index df2202b4f..c694f1e09 100644 --- a/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepositoryInterface.php +++ b/src/Bundle/ChillDocStoreBundle/Repository/StoredObjectRepositoryInterface.php @@ -17,6 +17,4 @@ use Doctrine\Persistence\ObjectRepository; /** * @extends ObjectRepository */ -interface StoredObjectRepositoryInterface extends ObjectRepository -{ -} +interface StoredObjectRepositoryInterface extends ObjectRepository {} diff --git a/src/Bundle/ChillMainBundle/ChillMainBundle.php b/src/Bundle/ChillMainBundle/ChillMainBundle.php index 2305114f4..ff721784a 100644 --- a/src/Bundle/ChillMainBundle/ChillMainBundle.php +++ b/src/Bundle/ChillMainBundle/ChillMainBundle.php @@ -22,7 +22,6 @@ use Chill\MainBundle\DependencyInjection\CompilerPass\ShortMessageCompilerPass; use Chill\MainBundle\DependencyInjection\CompilerPass\TimelineCompilerClass; use Chill\MainBundle\DependencyInjection\CompilerPass\WidgetsCompilerPass; use Chill\MainBundle\DependencyInjection\ConfigConsistencyCompilerPass; -use Chill\MainBundle\DependencyInjection\RoleProvidersCompilerPass; use Chill\MainBundle\Notification\NotificationHandlerInterface; use Chill\MainBundle\Routing\LocalMenuBuilderInterface; use Chill\MainBundle\Search\SearchApiInterface; diff --git a/src/Bundle/ChillMainBundle/Controller/DashboardApiController.php b/src/Bundle/ChillMainBundle/Controller/DashboardApiController.php index 8a6027ff3..c9b5435ce 100644 --- a/src/Bundle/ChillMainBundle/Controller/DashboardApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/DashboardApiController.php @@ -20,8 +20,7 @@ final readonly class DashboardApiController { public function __construct( private NewsItemRepository $newsItemRepository, - ) { - } + ) {} /** * Get user dashboard config (not yet based on user id and still hardcoded for now). diff --git a/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php b/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php index 786a7e0f1..c4476a041 100644 --- a/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php +++ b/src/Bundle/ChillMainBundle/Controller/NewsItemApiController.php @@ -25,8 +25,7 @@ class NewsItemApiController private readonly NewsItemRepository $newsItemRepository, private readonly SerializerInterface $serializer, private readonly PaginatorFactory $paginatorFactory - ) { - } + ) {} /** * Get list of news items filtered on start and end date. diff --git a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php index cf1f4922b..b79812464 100644 --- a/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php +++ b/src/Bundle/ChillMainBundle/Controller/NewsItemHistoryController.php @@ -28,8 +28,7 @@ final readonly class NewsItemHistoryController private readonly PaginatorFactory $paginatorFactory, private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory, private readonly Environment $environment, - ) { - } + ) {} /** * @Route("/{_locale}/news-items/history", name="chill_main_news_items_history") diff --git a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php index 0ce6a9824..08e72884f 100644 --- a/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php +++ b/src/Bundle/ChillMainBundle/Routing/MenuBuilder/AdminNewsMenuBuilder.php @@ -17,9 +17,7 @@ use Symfony\Component\Security\Core\Authorization\AuthorizationCheckerInterface; class AdminNewsMenuBuilder implements LocalMenuBuilderInterface { - public function __construct(private readonly AuthorizationCheckerInterface $authorizationChecker) - { - } + public function __construct(private readonly AuthorizationCheckerInterface $authorizationChecker) {} public function buildMenu($menuId, MenuItem $menu, array $parameters) { diff --git a/src/Bundle/ChillMainBundle/Security/RoleProvider.php b/src/Bundle/ChillMainBundle/Security/RoleProvider.php index 073c5bae8..d17b282f3 100644 --- a/src/Bundle/ChillMainBundle/Security/RoleProvider.php +++ b/src/Bundle/ChillMainBundle/Security/RoleProvider.php @@ -13,7 +13,6 @@ namespace Chill\MainBundle\Security; class RoleProvider { - /** * an array where keys are the role, and value is the title * for the given role. @@ -27,9 +26,7 @@ class RoleProvider * @var iterable */ private iterable $providers - ) - { - } + ) {} public function getRoles(): array { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php index 439cb47ca..e0c4da1e9 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter.php @@ -24,8 +24,7 @@ final readonly class AccompanyingPeriodWorkWithEvaluationBetweenDatesFilter impl { public function __construct( private RollingDateConverterInterface $rollingDateConverter, - ) { - } + ) {} public function buildForm(FormBuilderInterface $builder): void { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php index bb54f288b..25e762a9c 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/JobFilter.php @@ -31,8 +31,7 @@ class JobFilter implements FilterInterface protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly UserJobRepositoryInterface $userJobRepository, - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php index 9a0847cfa..e22c84696 100644 --- a/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php +++ b/src/Bundle/ChillPersonBundle/Export/Filter/SocialWorkFilters/ScopeFilter.php @@ -31,8 +31,7 @@ class ScopeFilter implements FilterInterface protected TranslatorInterface $translator, private readonly TranslatableStringHelper $translatableStringHelper, private readonly ScopeRepositoryInterface $scopeRepository - ) { - } + ) {} public function addRole(): ?string { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php index ba14d4e2c..87ed9eec0 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListAccompanyingPeriodHelper.php @@ -88,8 +88,7 @@ final readonly class ListAccompanyingPeriodHelper private UserHelper $userHelper, private LabelPersonHelper $labelPersonHelper, private CenterRepository $centerRepository - ) { - } + ) {} public function getQueryKeys($data) { diff --git a/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php b/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php index 2ffc3940f..393d246ea 100644 --- a/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php +++ b/src/Bundle/ChillPersonBundle/Export/Helper/ListPersonHelper.php @@ -84,8 +84,7 @@ final readonly class ListPersonHelper * @var iterable */ private iterable $customPersonHelpers, - ) { - } + ) {} /** * Those keys are the "direct" keys, which are created when we decide to use to list all the keys.