mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-06 14:54:57 +00:00
apply rector rules: php up to php82
This commit is contained in:
@@ -28,7 +28,7 @@ use function trim;
|
||||
|
||||
final class AddressReferenceAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private AddressReferenceRepository $addressReferenceRepository, private PaginatorFactory $paginatorFactory)
|
||||
public function __construct(private readonly AddressReferenceRepository $addressReferenceRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ final class AddressReferenceAPIController extends ApiController
|
||||
|
||||
$pattern = $request->query->get('q');
|
||||
|
||||
if ('' === trim($pattern)) {
|
||||
if ('' === trim((string) $pattern)) {
|
||||
throw new BadRequestHttpException('the search pattern is empty');
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class AddressToReferenceMatcherController
|
||||
{
|
||||
public function __construct(private Security $security, private EntityManagerInterface $entityManager, private SerializerInterface $serializer)
|
||||
public function __construct(private readonly Security $security, private readonly EntityManagerInterface $entityManager, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -53,13 +53,13 @@ use function unserialize;
|
||||
class ExportController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private ChillRedis $redis,
|
||||
private ExportManager $exportManager,
|
||||
private FormFactoryInterface $formFactory,
|
||||
private LoggerInterface $logger,
|
||||
private SessionInterface $session,
|
||||
private TranslatorInterface $translator,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private readonly ChillRedis $redis,
|
||||
private readonly ExportManager $exportManager,
|
||||
private readonly FormFactoryInterface $formFactory,
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly SessionInterface $session,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly ExportFormHelper $exportFormHelper,
|
||||
private readonly SavedExportRepositoryInterface $savedExportRepository,
|
||||
private readonly Security $security
|
||||
|
@@ -24,7 +24,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class GeographicalUnitByAddressApiController
|
||||
{
|
||||
public function __construct(private PaginatorFactory $paginatorFactory, private GeographicalUnitRepositoryInterface $geographicalUnitRepository, private Security $security, private SerializerInterface $serializer)
|
||||
public function __construct(private readonly PaginatorFactory $paginatorFactory, private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository, private readonly Security $security, private readonly SerializerInterface $serializer)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -33,7 +33,7 @@ use UnexpectedValueException;
|
||||
*/
|
||||
class NotificationApiController
|
||||
{
|
||||
public function __construct(private EntityManagerInterface $entityManager, private NotificationRepository $notificationRepository, private PaginatorFactory $paginatorFactory, private Security $security, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -41,7 +41,7 @@ use function in_array;
|
||||
*/
|
||||
class NotificationController extends AbstractController
|
||||
{
|
||||
public function __construct(private EntityManagerInterface $em, private LoggerInterface $chillLogger, private LoggerInterface $logger, private Security $security, private NotificationRepository $notificationRepository, private NotificationHandlerManager $notificationHandlerManager, private PaginatorFactory $paginatorFactory, private TranslatorInterface $translator, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -24,7 +24,7 @@ use function json_decode;
|
||||
|
||||
class PermissionApiController extends AbstractController
|
||||
{
|
||||
public function __construct(private DenormalizerInterface $denormalizer, private Security $security)
|
||||
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -26,7 +26,7 @@ use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
|
||||
|
||||
final class PostalCodeAPIController extends ApiController
|
||||
{
|
||||
public function __construct(private CountryRepository $countryRepository, private PostalCodeRepositoryInterface $postalCodeRepository, private PaginatorFactory $paginatorFactory)
|
||||
public function __construct(private readonly CountryRepository $countryRepository, private readonly PostalCodeRepositoryInterface $postalCodeRepository, private readonly PaginatorFactory $paginatorFactory)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ final class PostalCodeAPIController extends ApiController
|
||||
|
||||
$pattern = $request->query->get('q');
|
||||
|
||||
if ('' === trim($pattern)) {
|
||||
if ('' === trim((string) $pattern)) {
|
||||
throw new BadRequestHttpException('the search pattern is empty');
|
||||
}
|
||||
|
||||
|
@@ -36,7 +36,7 @@ use function count;
|
||||
|
||||
class SavedExportController
|
||||
{
|
||||
public function __construct(private EngineInterface $templating, private EntityManagerInterface $entityManager, private ExportManager $exportManager, private FormFactoryInterface $formFactory, private SavedExportRepositoryInterface $savedExportRepository, private Security $security, private SessionInterface $session, private TranslatorInterface $translator, private UrlGeneratorInterface $urlGenerator)
|
||||
public function __construct(private readonly EngineInterface $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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -103,7 +103,7 @@ class SearchController extends AbstractController
|
||||
|
||||
public function searchAction(Request $request, $_format)
|
||||
{
|
||||
$pattern = trim($request->query->get('q', ''));
|
||||
$pattern = trim((string) $request->query->get('q', ''));
|
||||
|
||||
if ('' === $pattern) {
|
||||
switch ($_format) {
|
||||
|
@@ -22,7 +22,7 @@ use function count;
|
||||
|
||||
class TimelineCenterController extends AbstractController
|
||||
{
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private Security $security)
|
||||
public function __construct(protected TimelineBuilder $timelineBuilder, protected PaginatorFactory $paginatorFactory, private readonly Security $security)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -36,9 +36,9 @@ use Symfony\Component\Validator\Validator\ValidatorInterface;
|
||||
|
||||
class UserController extends CRUDController
|
||||
{
|
||||
public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||
final public const FORM_GROUP_CENTER_COMPOSED = 'composed_groupcenter';
|
||||
|
||||
public function __construct(private LoggerInterface $logger, private ValidatorInterface $validator, private UserPasswordEncoderInterface $passwordEncoder, private UserRepository $userRepository, protected ParameterBagInterface $parameterBag)
|
||||
public function __construct(private readonly LoggerInterface $logger, private readonly ValidatorInterface $validator, private readonly UserPasswordEncoderInterface $passwordEncoder, private readonly UserRepository $userRepository, protected ParameterBagInterface $parameterBag)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -30,7 +30,7 @@ use Symfony\Component\Serializer\SerializerInterface;
|
||||
|
||||
class WorkflowApiController
|
||||
{
|
||||
public function __construct(private EntityManagerInterface $entityManager, private EntityWorkflowRepository $entityWorkflowRepository, private PaginatorFactory $paginatorFactory, private Security $security, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -39,7 +39,7 @@ use function count;
|
||||
|
||||
class WorkflowController extends AbstractController
|
||||
{
|
||||
public function __construct(private EntityWorkflowManager $entityWorkflowManager, private EntityWorkflowRepository $entityWorkflowRepository, private ValidatorInterface $validator, private PaginatorFactory $paginatorFactory, private Registry $registry, private EntityManagerInterface $entityManager, private TranslatorInterface $translator, private 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)
|
||||
{
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user