mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 06:44:59 +00:00
php cs fixes after updating php cs fixer
This commit is contained in:
@@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address-reference/by-postal-code/{id}/search.json")
|
||||
|
@@ -23,7 +23,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/address/reference-match/{id}/set/reviewed", methods={"POST"})
|
||||
|
@@ -70,7 +70,7 @@ class ExportController extends AbstractController
|
||||
*/
|
||||
public function downloadResultAction(Request $request, mixed $alias)
|
||||
{
|
||||
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */
|
||||
/** @var ExportManager $exportManager */
|
||||
$exportManager = $this->exportManager;
|
||||
$export = $exportManager->getExport($alias);
|
||||
$key = $request->query->get('key', null);
|
||||
@@ -108,13 +108,13 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @param string $alias
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\Response
|
||||
* @return Response
|
||||
*
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/exports/generate/{alias}", name="chill_main_export_generate", methods={"GET"})
|
||||
*/
|
||||
public function generateAction(Request $request, $alias)
|
||||
{
|
||||
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */
|
||||
/** @var ExportManager $exportManager */
|
||||
$exportManager = $this->exportManager;
|
||||
$key = $request->query->get('key', null);
|
||||
$savedExport = $this->getSavedExportFromRequest($request);
|
||||
@@ -274,7 +274,7 @@ class ExportController extends AbstractController
|
||||
*/
|
||||
protected function createCreateFormExport(string $alias, string $step, array $data, ?SavedExport $savedExport): FormInterface
|
||||
{
|
||||
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */
|
||||
/** @var ExportManager $exportManager */
|
||||
$exportManager = $this->exportManager;
|
||||
$isGenerate = str_starts_with($step, 'generate_');
|
||||
|
||||
@@ -444,7 +444,7 @@ class ExportController extends AbstractController
|
||||
*
|
||||
* @param string $alias
|
||||
*
|
||||
* @return \Symfony\Component\HttpFoundation\RedirectResponse
|
||||
* @return RedirectResponse
|
||||
*/
|
||||
private function forwardToGenerate(Request $request, DirectExportInterface|ExportInterface $export, $alias, ?SavedExport $savedExport)
|
||||
{
|
||||
@@ -452,7 +452,7 @@ class ExportController extends AbstractController
|
||||
$dataFormatter = $this->session->get('formatter_step_raw', null);
|
||||
$dataExport = $this->session->get('export_step_raw', null);
|
||||
|
||||
if (null === $dataFormatter && $export instanceof \Chill\MainBundle\Export\ExportInterface) {
|
||||
if (null === $dataFormatter && $export instanceof ExportInterface) {
|
||||
return $this->redirectToRoute('chill_main_export_new', [
|
||||
'alias' => $alias,
|
||||
'step' => $this->getNextStep('generate', $export, true),
|
||||
@@ -531,7 +531,7 @@ class ExportController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
/** @var \Chill\MainBundle\Export\ExportManager $exportManager */
|
||||
/** @var ExportManager $exportManager */
|
||||
$exportManager = $this->exportManager;
|
||||
|
||||
$form = $this->createCreateFormExport($alias, 'centers', [], $savedExport);
|
||||
@@ -620,11 +620,11 @@ class ExportController extends AbstractController
|
||||
return 'export';
|
||||
|
||||
case 'export':
|
||||
if ($export instanceof \Chill\MainBundle\Export\ExportInterface) {
|
||||
if ($export instanceof ExportInterface) {
|
||||
return $reverse ? 'centers' : 'formatter';
|
||||
}
|
||||
|
||||
if ($export instanceof \Chill\MainBundle\Export\DirectExportInterface) {
|
||||
if ($export instanceof DirectExportInterface) {
|
||||
return $reverse ? 'centers' : 'generate';
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class GeographicalUnitByAddressApiController
|
||||
{
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/geographical-unit/by-address/{id}.{_format}", requirements={"_format": "json"})
|
||||
|
@@ -13,4 +13,6 @@ namespace Chill\MainBundle\Controller;
|
||||
|
||||
use Chill\MainBundle\CRUD\Controller\CRUDController;
|
||||
|
||||
class LocationTypeController extends CRUDController {}
|
||||
class LocationTypeController extends CRUDController
|
||||
{
|
||||
}
|
||||
|
@@ -46,5 +46,7 @@ class LoginController extends AbstractController
|
||||
]);
|
||||
}
|
||||
|
||||
public function LoginCheckAction(Request $request) {}
|
||||
public function LoginCheckAction(Request $request)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
*/
|
||||
class NotificationApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly NotificationRepository $notificationRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{id}/mark/read", name="chill_api_main_notification_mark_read", methods={"POST"})
|
||||
|
@@ -41,7 +41,9 @@ use function in_array;
|
||||
*/
|
||||
class NotificationController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository) {}
|
||||
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $chillLogger, private readonly LoggerInterface $logger, private readonly Security $security, private readonly NotificationRepository $notificationRepository, private readonly NotificationHandlerManager $notificationHandlerManager, private readonly PaginatorFactory $paginatorFactory, private readonly TranslatorInterface $translator, private readonly UserRepository $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/create", name="chill_main_notification_create")
|
||||
|
@@ -21,7 +21,9 @@ use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
|
||||
|
||||
class PermissionApiController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security) {}
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/permissions/info.json", methods={"POST"})
|
||||
|
@@ -47,7 +47,8 @@ final class PermissionsGroupController extends AbstractController
|
||||
private readonly EntityManagerInterface $em,
|
||||
private readonly PermissionsGroupRepository $permissionsGroupRepository,
|
||||
private readonly RoleScopeRepository $roleScopeRepository,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/admin/permissionsgroup/{id}/add_link_role_scope", name="admin_permissionsgroup_add_role_scope", methods={"PUT"})
|
||||
|
@@ -26,7 +26,9 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory) {}
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/api/1.0/main/postal-code/search.json")
|
||||
|
@@ -34,7 +34,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class SavedExportController
|
||||
{
|
||||
public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator) {}
|
||||
public function __construct(private readonly \Twig\Environment $templating, private readonly EntityManagerInterface $entityManager, private readonly ExportManager $exportManager, private readonly FormFactoryInterface $formFactory, private readonly SavedExportRepositoryInterface $savedExportRepository, private readonly Security $security, private readonly SessionInterface $session, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/exports/saved/{id}/delete", name="chill_main_export_saved_delete")
|
||||
|
@@ -56,7 +56,7 @@ class ScopeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
|
||||
$scope = $em->getRepository(Scope::class)->find($id);
|
||||
|
||||
if (!$scope) {
|
||||
throw $this->createNotFoundException('Unable to find Scope entity.');
|
||||
@@ -79,7 +79,7 @@ class ScopeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$entities = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->findAll();
|
||||
$entities = $em->getRepository(Scope::class)->findAll();
|
||||
|
||||
return $this->render('@ChillMain/Scope/index.html.twig', [
|
||||
'entities' => $entities,
|
||||
@@ -109,7 +109,7 @@ class ScopeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
|
||||
$scope = $em->getRepository(Scope::class)->find($id);
|
||||
|
||||
if (!$scope) {
|
||||
throw $this->createNotFoundException('Unable to find Scope entity.');
|
||||
@@ -129,7 +129,7 @@ class ScopeController extends AbstractController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$scope = $em->getRepository(\Chill\MainBundle\Entity\Scope::class)->find($id);
|
||||
$scope = $em->getRepository(Scope::class)->find($id);
|
||||
|
||||
if (!$scope) {
|
||||
throw $this->createNotFoundException('Unable to find Scope entity.');
|
||||
|
@@ -32,7 +32,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
*/
|
||||
class SearchController extends AbstractController
|
||||
{
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi) {}
|
||||
public function __construct(protected SearchProvider $searchProvider, protected TranslatorInterface $translator, protected PaginatorFactory $paginatorFactory, protected SearchApi $searchApi)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/search/advanced/{name}", name="chill_main_advanced_search")
|
||||
@@ -45,7 +47,7 @@ class SearchController extends AbstractController
|
||||
/** @var Chill\MainBundle\Search\HasAdvancedSearchFormInterface $variable */
|
||||
$search = $this->searchProvider
|
||||
->getHasAdvancedFormByName($name);
|
||||
} catch (\Chill\MainBundle\Search\UnknowSearchNameException) {
|
||||
} catch (UnknowSearchNameException) {
|
||||
throw $this->createNotFoundException('no advanced search for '."{$name}");
|
||||
}
|
||||
|
||||
|
@@ -20,7 +20,9 @@ use Symfony\Component\Security\Core\Security;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
{
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security) {}
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/center/timeline",
|
||||
|
@@ -38,7 +38,9 @@ class UserController extends CRUDController
|
||||
{
|
||||
final public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag, private readonly TranslatorInterface $translator) {}
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag, private readonly TranslatorInterface $translator)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/admin/main/user/{uid}/add_link_groupcenter",
|
||||
@@ -48,7 +50,7 @@ class UserController extends CRUDController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid);
|
||||
$user = $em->getRepository(User::class)->find($uid);
|
||||
|
||||
if (!$user) {
|
||||
throw $this->createNotFoundException('Unable to find User entity.');
|
||||
@@ -100,13 +102,13 @@ class UserController extends CRUDController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$user = $em->getRepository(\Chill\MainBundle\Entity\User::class)->find($uid);
|
||||
$user = $em->getRepository(User::class)->find($uid);
|
||||
|
||||
if (!$user) {
|
||||
throw $this->createNotFoundException('Unable to find User entity.');
|
||||
}
|
||||
|
||||
$groupCenter = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class)
|
||||
$groupCenter = $em->getRepository(GroupCenter::class)
|
||||
->find($gcid);
|
||||
|
||||
if (!$groupCenter) {
|
||||
@@ -424,7 +426,7 @@ class UserController extends CRUDController
|
||||
{
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$groupCenterManaged = $em->getRepository(\Chill\MainBundle\Entity\GroupCenter::class)
|
||||
$groupCenterManaged = $em->getRepository(GroupCenter::class)
|
||||
->findOneBy([
|
||||
'center' => $groupCenter->getCenter(),
|
||||
'permissionsGroup' => $groupCenter->getPermissionsGroup(),
|
||||
|
@@ -27,7 +27,8 @@ final readonly class UserExportController
|
||||
private UserRepositoryInterface $userRepository,
|
||||
private Security $security,
|
||||
private TranslatorInterface $translator,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws \League\Csv\CannotInsertRecord
|
||||
|
@@ -21,7 +21,8 @@ class UserJobScopeHistoriesController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly Environment $engine,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/admin/main/user/{id}/job-scope-history", name="admin_user_job_scope_history")
|
||||
|
@@ -24,7 +24,8 @@ class UserProfileController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly TranslatorInterface $translator,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* User profile that allows editing of phonenumber and visualization of certain data.
|
||||
|
@@ -29,7 +29,9 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class WorkflowApiController
|
||||
{
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer) {}
|
||||
public function __construct(private readonly EntityManagerInterface $entityManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly PaginatorFactory $paginatorFactory, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a list of workflow which are waiting an action for the user.
|
||||
|
@@ -38,7 +38,9 @@ use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
|
||||
class WorkflowController extends AbstractController
|
||||
{
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security) {}
|
||||
public function __construct(private readonly EntityWorkflowManager $entityWorkflowManager, private readonly EntityWorkflowRepository $entityWorkflowRepository, private readonly ValidatorInterface $validator, private readonly PaginatorFactory $paginatorFactory, private readonly Registry $registry, private readonly EntityManagerInterface $entityManager, private readonly TranslatorInterface $translator, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* @Route("/{_locale}/main/workflow/create", name="chill_main_workflow_create")
|
||||
|
Reference in New Issue
Block a user