mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
update cs after php-cs-fixer upgrade
This commit is contained in:
@@ -580,7 +580,7 @@ class CRUDController extends AbstractController
|
||||
string $action,
|
||||
mixed $entity,
|
||||
Request $request,
|
||||
array $defaultTemplateParameters = []
|
||||
array $defaultTemplateParameters = [],
|
||||
) {
|
||||
return $defaultTemplateParameters;
|
||||
}
|
||||
@@ -685,7 +685,7 @@ class CRUDController extends AbstractController
|
||||
Request $request,
|
||||
int $totalItems,
|
||||
PaginatorInterface $paginator,
|
||||
?FilterOrderHelper $filterOrder = null
|
||||
?FilterOrderHelper $filterOrder = null,
|
||||
) {
|
||||
$query = $this->queryEntities($action, $request, $paginator, $filterOrder);
|
||||
|
||||
|
@@ -57,7 +57,7 @@ class ChillImportUsersCommand extends Command
|
||||
protected LoggerInterface $logger,
|
||||
protected \Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface $passwordEncoder,
|
||||
protected ValidatorInterface $validator,
|
||||
protected UserRepository $userRepository
|
||||
protected UserRepository $userRepository,
|
||||
) {
|
||||
parent::__construct('chill:main:import-users');
|
||||
}
|
||||
|
@@ -69,7 +69,7 @@ class ChillUserSendRenewPasswordCodeCommand extends Command
|
||||
LoggerInterface $logger,
|
||||
EntityManagerInterface $em,
|
||||
RecoverPasswordHelper $recoverPasswordHelper,
|
||||
EventDispatcherInterface $eventDispatcher
|
||||
EventDispatcherInterface $eventDispatcher,
|
||||
) {
|
||||
$this->logger = $logger;
|
||||
$this->em = $em;
|
||||
|
@@ -22,7 +22,7 @@ class ExecuteCronJobCommand extends Command
|
||||
protected static $defaultDescription = 'Execute the cronjob(s) given as argument, or one cronjob scheduled by system.';
|
||||
|
||||
public function __construct(
|
||||
private readonly CronManagerInterface $cronManager
|
||||
private readonly CronManagerInterface $cronManager,
|
||||
) {
|
||||
parent::__construct('chill:cron-job:execute');
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class LoadAddressesBEFromBestAddressCommand extends Command
|
||||
|
||||
public function __construct(
|
||||
private readonly AddressReferenceBEFromBestAddress $addressImporter,
|
||||
private readonly PostalCodeBEFromBestAddress $postalCodeBEFromBestAddressImporter
|
||||
private readonly PostalCodeBEFromBestAddress $postalCodeBEFromBestAddressImporter,
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ class NewsItemApiController
|
||||
public function __construct(
|
||||
private readonly NewsItemRepository $newsItemRepository,
|
||||
private readonly SerializerInterface $serializer,
|
||||
private readonly PaginatorFactory $paginatorFactory
|
||||
private readonly PaginatorFactory $paginatorFactory,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@@ -443,7 +443,7 @@ final class PermissionsGroupController extends AbstractController
|
||||
*/
|
||||
private function createDeleteRoleScopeForm(
|
||||
PermissionsGroup $permissionsGroup,
|
||||
RoleScope $roleScope
|
||||
RoleScope $roleScope,
|
||||
): FormInterface {
|
||||
return $this->createFormBuilder()
|
||||
->setAction($this->generateUrl(
|
||||
|
@@ -27,7 +27,7 @@ class ScopeController extends AbstractController
|
||||
{
|
||||
public function __construct(
|
||||
private readonly EntityManagerInterface $entityManager,
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@@ -20,7 +20,7 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
class UIController extends AbstractController
|
||||
{
|
||||
public function showNotificationUserCounterAction(
|
||||
CountNotificationUser $counter
|
||||
CountNotificationUser $counter,
|
||||
) {
|
||||
$nb = $counter->getSumNotification($this->getUser());
|
||||
|
||||
|
@@ -46,7 +46,7 @@ class UserController extends CRUDController
|
||||
protected ParameterBagInterface $parameterBag,
|
||||
private readonly TranslatorInterface $translator,
|
||||
private readonly ChillSecurity $security,
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
|
||||
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
|
||||
) {}
|
||||
|
||||
#[Route(path: '/{_locale}/admin/main/user/{uid}/add_link_groupcenter', name: 'admin_user_add_groupcenter')]
|
||||
@@ -324,7 +324,7 @@ class UserController extends CRUDController
|
||||
Request $request,
|
||||
int $totalItems,
|
||||
PaginatorInterface $paginator,
|
||||
?FilterOrderHelper $filterOrder = null
|
||||
?FilterOrderHelper $filterOrder = null,
|
||||
) {
|
||||
if (0 === $totalItems) {
|
||||
return [];
|
||||
|
@@ -54,7 +54,7 @@ final readonly class CronManager implements CronManagerInterface
|
||||
private CronJobExecutionRepositoryInterface $cronJobExecutionRepository,
|
||||
private EntityManagerInterface $entityManager,
|
||||
private iterable $jobs,
|
||||
private LoggerInterface $logger
|
||||
private LoggerInterface $logger,
|
||||
) {}
|
||||
|
||||
public function run(?string $forceJob = null): void
|
||||
|
@@ -335,7 +335,7 @@ class ChillMainExtension extends Extension implements
|
||||
ContainerBuilder $container,
|
||||
array $crudConfig,
|
||||
array $apiConfig,
|
||||
Loader\YamlFileLoader $loader
|
||||
Loader\YamlFileLoader $loader,
|
||||
): void {
|
||||
if (0 === \count($crudConfig)) {
|
||||
return;
|
||||
|
@@ -44,7 +44,7 @@ class ExportsCompilerPass implements CompilerPassInterface
|
||||
|
||||
private function compileExportElementsProvider(
|
||||
Definition $chillManagerDefinition,
|
||||
ContainerBuilder $container
|
||||
ContainerBuilder $container,
|
||||
) {
|
||||
$taggedServices = $container->findTaggedServiceIds(
|
||||
'chill.export_elements_provider'
|
||||
@@ -73,7 +73,7 @@ class ExportsCompilerPass implements CompilerPassInterface
|
||||
|
||||
private function compileFormatters(
|
||||
Definition $chillManagerDefinition,
|
||||
ContainerBuilder $container
|
||||
ContainerBuilder $container,
|
||||
) {
|
||||
$taggedServices = $container->findTaggedServiceIds(
|
||||
'chill.export_formatter'
|
||||
|
@@ -26,7 +26,7 @@ class Configuration implements ConfigurationInterface
|
||||
|
||||
public function __construct(
|
||||
array $widgetFactories,
|
||||
private readonly ContainerBuilder $containerBuilder
|
||||
private readonly ContainerBuilder $containerBuilder,
|
||||
) {
|
||||
$this->setWidgetFactories($widgetFactories);
|
||||
}
|
||||
|
@@ -122,7 +122,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
public function doProcess(
|
||||
ContainerBuilder $container,
|
||||
$extension,
|
||||
$containerWidgetConfigParameterName
|
||||
$containerWidgetConfigParameterName,
|
||||
) {
|
||||
if (!$container->hasDefinition(self::WIDGET_MANAGER)) {
|
||||
throw new \LogicException('the service '.self::WIDGET_MANAGER.' should be present. It is required by '.self::class);
|
||||
@@ -280,7 +280,7 @@ abstract class AbstractWidgetsCompilerPass implements CompilerPassInterface
|
||||
WidgetFactoryInterface $factory,
|
||||
$place,
|
||||
$order,
|
||||
array $config
|
||||
array $config,
|
||||
) {
|
||||
$serviceId = $factory->getServiceId($container, $place, $order, $config);
|
||||
$definition = $factory->createDefinition(
|
||||
|
@@ -36,7 +36,7 @@ class CronJobExecution
|
||||
public function __construct(
|
||||
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::TEXT, nullable: false)]
|
||||
#[ORM\Id]
|
||||
private string $key
|
||||
private string $key,
|
||||
) {
|
||||
$this->lastStart = new \DateTimeImmutable('now');
|
||||
}
|
||||
|
@@ -48,6 +48,6 @@ class SimpleGeographicalUnitDTO
|
||||
* @psalm-readonly
|
||||
*/
|
||||
#[Serializer\Groups(['read'])]
|
||||
public int $layerId
|
||||
public int $layerId,
|
||||
) {}
|
||||
}
|
||||
|
@@ -126,7 +126,7 @@ final readonly class ExportFormHelper
|
||||
|
||||
private function savedExportDataToFormDataStepExport(
|
||||
SavedExport $savedExport,
|
||||
array $formOptions
|
||||
array $formOptions,
|
||||
): array {
|
||||
$builder = $this->formFactory
|
||||
->createBuilder(
|
||||
@@ -148,7 +148,7 @@ final readonly class ExportFormHelper
|
||||
|
||||
private function savedExportDataToFormDataStepFormatter(
|
||||
SavedExport $savedExport,
|
||||
array $formOptions
|
||||
array $formOptions,
|
||||
): array {
|
||||
$builder = $this->formFactory
|
||||
->createBuilder(
|
||||
|
@@ -62,7 +62,7 @@ class ExportManager
|
||||
private readonly TokenStorageInterface $tokenStorage,
|
||||
iterable $exports,
|
||||
iterable $aggregators,
|
||||
iterable $filters
|
||||
iterable $filters,
|
||||
// iterable $formatters,
|
||||
// iterable $exportElementProvider
|
||||
) {
|
||||
@@ -451,7 +451,7 @@ class ExportManager
|
||||
public function isGrantedForElement(
|
||||
DirectExportInterface|ExportInterface|ModifierInterface $element,
|
||||
DirectExportInterface|ExportInterface|null $export = null,
|
||||
?array $centers = null
|
||||
?array $centers = null,
|
||||
): bool {
|
||||
if ($element instanceof ExportInterface || $element instanceof DirectExportInterface) {
|
||||
$role = $element->requiredRole();
|
||||
@@ -533,7 +533,7 @@ class ExportManager
|
||||
ExportInterface $export,
|
||||
QueryBuilder $qb,
|
||||
array $data,
|
||||
array $center
|
||||
array $center,
|
||||
) {
|
||||
$aggregators = $this->retrieveUsedAggregators($data);
|
||||
|
||||
@@ -560,7 +560,7 @@ class ExportManager
|
||||
ExportInterface $export,
|
||||
QueryBuilder $qb,
|
||||
mixed $data,
|
||||
array $centers
|
||||
array $centers,
|
||||
) {
|
||||
$filters = $this->retrieveUsedFilters($data);
|
||||
|
||||
|
@@ -51,7 +51,7 @@ class CSVFormatter implements FormatterInterface
|
||||
|
||||
public function __construct(
|
||||
protected TranslatorInterface $translator,
|
||||
ExportManager $manager
|
||||
ExportManager $manager,
|
||||
) {
|
||||
$this->exportManager = $manager;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ class CSVFormatter implements FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
) {
|
||||
$this->result = $result;
|
||||
$this->orderingHeaders($formatterData);
|
||||
|
@@ -68,7 +68,7 @@ class CSVListFormatter implements FormatterInterface
|
||||
public function buildForm(
|
||||
FormBuilderInterface $builder,
|
||||
$exportAlias,
|
||||
array $aggregatorAliases
|
||||
array $aggregatorAliases,
|
||||
) {
|
||||
$builder->add('numerotation', ChoiceType::class, [
|
||||
'choices' => [
|
||||
@@ -108,7 +108,7 @@ class CSVListFormatter implements FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
) {
|
||||
$this->result = $result;
|
||||
$this->exportAlias = $exportAlias;
|
||||
|
@@ -66,7 +66,7 @@ class CSVPivotedListFormatter implements FormatterInterface
|
||||
public function buildForm(
|
||||
FormBuilderInterface $builder,
|
||||
$exportAlias,
|
||||
array $aggregatorAliases
|
||||
array $aggregatorAliases,
|
||||
) {
|
||||
$builder->add('numerotation', ChoiceType::class, [
|
||||
'choices' => [
|
||||
@@ -107,7 +107,7 @@ class CSVPivotedListFormatter implements FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
) {
|
||||
$this->result = $result;
|
||||
$this->exportAlias = $exportAlias;
|
||||
|
@@ -129,7 +129,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
public function buildForm(
|
||||
FormBuilderInterface $builder,
|
||||
$exportAlias,
|
||||
array $aggregatorAliases
|
||||
array $aggregatorAliases,
|
||||
) {
|
||||
// choosing between formats
|
||||
$builder->add('format', ChoiceType::class, [
|
||||
@@ -178,7 +178,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
): Response {
|
||||
// store all data when the process is initiated
|
||||
$this->result = $result;
|
||||
@@ -219,7 +219,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
protected function addContentTable(
|
||||
Worksheet $worksheet,
|
||||
$sortedResults,
|
||||
$line
|
||||
$line,
|
||||
) {
|
||||
$worksheet->fromArray(
|
||||
$sortedResults,
|
||||
@@ -274,7 +274,7 @@ class SpreadSheetFormatter implements FormatterInterface
|
||||
protected function addHeaders(
|
||||
Worksheet &$worksheet,
|
||||
array $globalKeys,
|
||||
$line
|
||||
$line,
|
||||
) {
|
||||
// get the displayable form of headers
|
||||
$displayables = [];
|
||||
|
@@ -72,7 +72,7 @@ class SpreadsheetListFormatter implements FormatterInterface
|
||||
public function buildForm(
|
||||
FormBuilderInterface $builder,
|
||||
$exportAlias,
|
||||
array $aggregatorAliases
|
||||
array $aggregatorAliases,
|
||||
) {
|
||||
$builder
|
||||
->add('format', ChoiceType::class, [
|
||||
@@ -120,7 +120,7 @@ class SpreadsheetListFormatter implements FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
) {
|
||||
$this->result = $result;
|
||||
$this->exportAlias = $exportAlias;
|
||||
|
@@ -31,7 +31,7 @@ interface FormatterInterface
|
||||
public function buildForm(
|
||||
FormBuilderInterface $builder,
|
||||
$exportAlias,
|
||||
array $aggregatorAliases
|
||||
array $aggregatorAliases,
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -58,7 +58,7 @@ interface FormatterInterface
|
||||
$exportAlias,
|
||||
array $exportData,
|
||||
array $filtersData,
|
||||
array $aggregatorsData
|
||||
array $aggregatorsData,
|
||||
);
|
||||
|
||||
public function getType();
|
||||
|
@@ -35,7 +35,7 @@ class IdToEntityDataTransformer implements DataTransformerInterface
|
||||
public function __construct(
|
||||
private readonly ObjectRepository $repository,
|
||||
private readonly bool $multiple = false,
|
||||
?callable $getId = null
|
||||
?callable $getId = null,
|
||||
) {
|
||||
$this->getId = $getId ?? static fn (object $o) => $o->getId();
|
||||
}
|
||||
|
@@ -103,7 +103,7 @@ trait AppendScopeChoiceTypeTrait
|
||||
AuthorizationHelper $authorizationHelper,
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
ObjectManager $om,
|
||||
$name = 'scope'
|
||||
$name = 'scope',
|
||||
) {
|
||||
$reachableScopes = $authorizationHelper
|
||||
->getReachableScopes($user, $role, $center);
|
||||
|
@@ -40,7 +40,7 @@ class ComposedRoleScopeType extends AbstractType
|
||||
|
||||
public function __construct(
|
||||
private readonly TranslatableStringHelper $translatableStringHelper,
|
||||
RoleProvider $roleProvider
|
||||
RoleProvider $roleProvider,
|
||||
) {
|
||||
$this->roles = $roleProvider->getRoles();
|
||||
$this->rolesWithoutScope = $roleProvider->getRolesWithoutScopes();
|
||||
|
@@ -32,7 +32,7 @@ final class PickCenterType extends AbstractType
|
||||
public function __construct(
|
||||
private readonly ExportManager $exportManager,
|
||||
private readonly RegroupmentRepository $regroupmentRepository,
|
||||
private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper
|
||||
private readonly AuthorizationHelperForCurrentUserInterface $authorizationHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
@@ -59,7 +59,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
|
||||
$entityChoicesBuilder = $builder->create('entity_choices', null, ['compound' => true]);
|
||||
|
||||
foreach ($helper->getEntityChoices() as $key => [
|
||||
'label' => $label, 'choices' => $choices, 'options' => $opts, 'class' => $class
|
||||
'label' => $label, 'choices' => $choices, 'options' => $opts, 'class' => $class,
|
||||
]) {
|
||||
$entityChoicesBuilder->add($key, EntityType::class, [
|
||||
'label' => $label,
|
||||
@@ -114,7 +114,7 @@ final class FilterOrderType extends \Symfony\Component\Form\AbstractType
|
||||
$userPickersBuilder = $builder->create('user_pickers', null, ['compound' => true]);
|
||||
|
||||
foreach ($helper->getUserPickers() as $name => [
|
||||
'label' => $label, 'options' => $opts
|
||||
'label' => $label, 'options' => $opts,
|
||||
]) {
|
||||
$userPickersBuilder->add(
|
||||
$name,
|
||||
|
@@ -51,7 +51,7 @@ class PostalCodeType extends AbstractType
|
||||
TranslatableStringHelper $helper,
|
||||
UrlGeneratorInterface $urlGenerator,
|
||||
PostalCodeChoiceLoader $choiceLoader,
|
||||
TranslatorInterface $translator
|
||||
TranslatorInterface $translator,
|
||||
) {
|
||||
$this->translatableStringHelper = $helper;
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
|
@@ -42,7 +42,7 @@ class ScopePickerType extends AbstractType
|
||||
public function __construct(
|
||||
private readonly AuthorizationHelperInterface $authorizationHelper,
|
||||
private readonly Security $security,
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper
|
||||
private readonly TranslatableStringHelperInterface $translatableStringHelper,
|
||||
) {}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
|
@@ -49,7 +49,7 @@ class UserPickerType extends AbstractType
|
||||
TokenStorageInterface $tokenStorage,
|
||||
protected UserRepository $userRepository,
|
||||
protected UserACLAwareRepositoryInterface $userACLAwareRepository,
|
||||
private readonly UserRender $userRender
|
||||
private readonly UserRender $userRender,
|
||||
) {
|
||||
$this->authorizationHelper = $authorizationHelper;
|
||||
$this->tokenStorage = $tokenStorage;
|
||||
|
@@ -37,7 +37,7 @@ class UserPasswordType extends AbstractType
|
||||
|
||||
public function __construct(
|
||||
\Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface $passwordEncoder,
|
||||
LoggerInterface $chillLogger
|
||||
LoggerInterface $chillLogger,
|
||||
) {
|
||||
$this->passwordEncoder = $passwordEncoder;
|
||||
$this->chillLogger = $chillLogger;
|
||||
|
@@ -73,7 +73,7 @@ class Mailer
|
||||
array $subject,
|
||||
array $bodies,
|
||||
?callable $callback = null,
|
||||
mixed $force = false
|
||||
mixed $force = false,
|
||||
) {
|
||||
$fromEmail = $this->routeParameters['from_email'];
|
||||
$fromName = $this->routeParameters['from_name'];
|
||||
|
@@ -42,7 +42,7 @@ class ChillItemsPerPageTwig extends AbstractExtension
|
||||
public function paginationRender(
|
||||
Environment $env,
|
||||
PaginatorInterface $paginator,
|
||||
$template = '@ChillMain/Pagination/items_per_page.html.twig'
|
||||
$template = '@ChillMain/Pagination/items_per_page.html.twig',
|
||||
) {
|
||||
return $env->render($template, [
|
||||
'paginator' => $paginator,
|
||||
|
@@ -46,7 +46,7 @@ class ChillPaginationTwig extends AbstractExtension
|
||||
public function paginationRender(
|
||||
Environment $env,
|
||||
PaginatorInterface $paginator,
|
||||
$template = '@ChillMain/Pagination/long.html.twig'
|
||||
$template = '@ChillMain/Pagination/long.html.twig',
|
||||
) {
|
||||
$t = match ($template) {
|
||||
'long' => self::LONG_TEMPLATE,
|
||||
|
@@ -44,7 +44,7 @@ class Page implements PageInterface
|
||||
/**
|
||||
* The number of items in the whole iteration.
|
||||
*/
|
||||
protected int $totalItems
|
||||
protected int $totalItems,
|
||||
) {
|
||||
$this->urlGenerator = $urlGenerator;
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ class Paginator implements PaginatorInterface
|
||||
/**
|
||||
* the key in the GET parameter to indicate the number of item per page.
|
||||
*/
|
||||
protected string $itemPerPageKey
|
||||
protected string $itemPerPageKey,
|
||||
) {}
|
||||
|
||||
public function count(): int
|
||||
|
@@ -38,7 +38,7 @@ final readonly class PaginatorFactory implements PaginatorFactoryInterface
|
||||
* the default item per page. This may be overriden by
|
||||
* the request or inside the paginator.
|
||||
*/
|
||||
private int $itemPerPage = 20
|
||||
private int $itemPerPage = 20,
|
||||
) {}
|
||||
|
||||
/**
|
||||
@@ -53,7 +53,7 @@ final readonly class PaginatorFactory implements PaginatorFactoryInterface
|
||||
public function create(
|
||||
int $totalItems,
|
||||
?string $route = null,
|
||||
?array $routeParameters = null
|
||||
?array $routeParameters = null,
|
||||
): PaginatorInterface {
|
||||
return new Paginator(
|
||||
$totalItems,
|
||||
|
@@ -40,7 +40,7 @@ final class PhonenumberHelper implements PhoneNumberHelperInterface
|
||||
public function __construct(
|
||||
private readonly CacheItemPoolInterface $cachePool,
|
||||
ParameterBagInterface $parameterBag,
|
||||
private readonly LoggerInterface $logger
|
||||
private readonly LoggerInterface $logger,
|
||||
) {
|
||||
$this->config = $config = $parameterBag->get('chill_main.phone_helper');
|
||||
|
||||
|
@@ -58,7 +58,7 @@ class NewsItemRepository implements ObjectRepository
|
||||
}
|
||||
|
||||
private function buildBaseQuery(
|
||||
?string $pattern = null
|
||||
?string $pattern = null,
|
||||
): QueryBuilder {
|
||||
$qb = $this->createQueryBuilder('n');
|
||||
|
||||
|
@@ -25,7 +25,7 @@ class AdminUserMenuBuilder implements LocalMenuBuilderInterface
|
||||
|
||||
public function __construct(
|
||||
AuthorizationCheckerInterface $authorizationChecker,
|
||||
protected ParameterBagInterface $parameterBag
|
||||
protected ParameterBagInterface $parameterBag,
|
||||
) {
|
||||
$this->authorizationChecker = $authorizationChecker;
|
||||
}
|
||||
|
@@ -18,7 +18,7 @@ class Result
|
||||
/**
|
||||
* mixed an arbitrary result.
|
||||
*/
|
||||
private $result
|
||||
private $result,
|
||||
) {}
|
||||
|
||||
public function getRelevance(): float
|
||||
|
@@ -120,7 +120,7 @@ class SearchProvider
|
||||
$start = 0,
|
||||
$limit = 50,
|
||||
array $options = [],
|
||||
$format = 'html'
|
||||
$format = 'html',
|
||||
) {
|
||||
$terms = $this->parse($pattern);
|
||||
$search = $this->getByName($name);
|
||||
@@ -150,7 +150,7 @@ class SearchProvider
|
||||
$start = 0,
|
||||
$limit = 50,
|
||||
array $options = [],
|
||||
$format = 'html'
|
||||
$format = 'html',
|
||||
) {
|
||||
$terms = $this->parse($pattern);
|
||||
$results = [];
|
||||
|
@@ -33,7 +33,7 @@ class AuthorizationHelper implements AuthorizationHelperInterface
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly ScopeResolverDispatcher $scopeResolverDispatcher,
|
||||
private readonly UserACLAwareRepositoryInterface $userACLAwareRepository,
|
||||
private readonly ParentRoleHelper $parentRoleHelper
|
||||
private readonly ParentRoleHelper $parentRoleHelper,
|
||||
) {}
|
||||
|
||||
/**
|
||||
|
@@ -17,7 +17,7 @@ final readonly class DefaultVoterHelper implements VoterHelperInterface
|
||||
{
|
||||
public function __construct(
|
||||
private AuthorizationHelper $authorizationHelper,
|
||||
private array $configuration
|
||||
private array $configuration,
|
||||
) {}
|
||||
|
||||
public function supports($attribute, $subject): bool
|
||||
|
@@ -30,7 +30,7 @@ class ParentRoleHelper
|
||||
|
||||
public function __construct(
|
||||
protected RoleHierarchyInterface $roleHierarchy,
|
||||
ParameterBagInterface $parameterBag
|
||||
ParameterBagInterface $parameterBag,
|
||||
) {
|
||||
$this->hierarchy = $parameterBag->get('security.role_hierarchy.roles');
|
||||
}
|
||||
|
@@ -47,7 +47,7 @@ class RecoverPasswordHelper
|
||||
array $templateParameters = [],
|
||||
$force = false,
|
||||
array $additionalUrlParameters = [],
|
||||
$emailSubject = 'Recover your password'
|
||||
$emailSubject = 'Recover your password',
|
||||
) {
|
||||
if (null === $user->getEmail() || '' === trim($user->getEmail())) {
|
||||
throw new \UnexpectedValueException('No emaail associated to the user');
|
||||
|
@@ -25,7 +25,7 @@ class RoleProvider
|
||||
/**
|
||||
* @var iterable<ProvideRoleInterface>
|
||||
*/
|
||||
private readonly iterable $providers
|
||||
private readonly iterable $providers,
|
||||
) {}
|
||||
|
||||
public function getRoles(): array
|
||||
|
@@ -68,7 +68,7 @@ final class AddressReferenceBaseImporter
|
||||
string $source,
|
||||
?float $lat = null,
|
||||
?float $lon = null,
|
||||
?int $srid = null
|
||||
?int $srid = null,
|
||||
): void {
|
||||
if (!$this->isInitialized) {
|
||||
$this->initialize($source);
|
||||
|
@@ -64,7 +64,7 @@ final class GeographicalUnitBaseImporter
|
||||
string $unitName,
|
||||
string $unitKey,
|
||||
string $geomAsWKT,
|
||||
?int $srid = null
|
||||
?int $srid = null,
|
||||
): void {
|
||||
$this->initialize();
|
||||
|
||||
|
@@ -69,7 +69,7 @@ class PostalCodeBaseImporter
|
||||
string $refPostalCodeSource,
|
||||
float $centerLat,
|
||||
float $centerLon,
|
||||
int $centerSRID
|
||||
int $centerSRID,
|
||||
): void {
|
||||
$this->waitingForInsert[] = [
|
||||
$countryCode,
|
||||
|
@@ -68,7 +68,7 @@ class RollingDate
|
||||
public function __construct(
|
||||
private readonly string $roll,
|
||||
private readonly ?\DateTimeImmutable $fixedDate = null,
|
||||
private readonly \DateTimeImmutable $pivotDate = new \DateTimeImmutable('now')
|
||||
private readonly \DateTimeImmutable $pivotDate = new \DateTimeImmutable('now'),
|
||||
) {}
|
||||
|
||||
public function getFixedDate(): ?\DateTimeImmutable
|
||||
|
@@ -35,7 +35,7 @@ class OvhShortMessageSender implements ShortMessageSenderInterface
|
||||
private readonly string $sender,
|
||||
// for DI, must remains as third argument
|
||||
private readonly LoggerInterface $logger,
|
||||
private readonly PhoneNumberUtil $phoneNumberUtil
|
||||
private readonly PhoneNumberUtil $phoneNumberUtil,
|
||||
) {}
|
||||
|
||||
public function send(ShortMessage $shortMessage): void
|
||||
|
@@ -55,7 +55,7 @@ class ChillTwigHelper extends AbstractExtension
|
||||
$value,
|
||||
$message = 'No value',
|
||||
$template = 'default',
|
||||
array $options = []
|
||||
array $options = [],
|
||||
) {
|
||||
if ($value instanceof \DateTimeInterface) {
|
||||
$options = \array_merge([
|
||||
|
@@ -37,7 +37,7 @@ class ChillTwigRoutingHelper extends AbstractExtension
|
||||
|
||||
public function __construct(
|
||||
RequestStack $requestStack,
|
||||
RoutingExtension $originalExtension
|
||||
RoutingExtension $originalExtension,
|
||||
) {
|
||||
$this->requestStack = $requestStack;
|
||||
$this->originalExtension = $originalExtension;
|
||||
|
@@ -128,7 +128,7 @@ class FilterOrderHelperBuilder
|
||||
foreach (
|
||||
$this->userPickers as $name => [
|
||||
'label' => $label,
|
||||
'options' => $options
|
||||
'options' => $options,
|
||||
]
|
||||
) {
|
||||
$helper->addUserPicker($name, $label, $options);
|
||||
|
@@ -45,7 +45,7 @@ class Templating extends AbstractExtension
|
||||
Environment $environment,
|
||||
FilterOrderHelper $helper,
|
||||
?string $template = '@ChillMain/FilterOrder/base.html.twig',
|
||||
?array $options = []
|
||||
?array $options = [],
|
||||
): string {
|
||||
$otherParameters = [];
|
||||
|
||||
|
@@ -22,7 +22,7 @@ class DummyPaginator implements PaginatorFactoryInterface
|
||||
public function __construct(
|
||||
private readonly UrlGeneratorInterface $urlGenerator,
|
||||
private readonly string $route,
|
||||
private readonly array $routeParameters = []
|
||||
private readonly array $routeParameters = [],
|
||||
) {}
|
||||
|
||||
public function create(int $totalItems, ?string $route = null, ?array $routeParameters = null): PaginatorInterface
|
||||
|
@@ -30,7 +30,7 @@ trait PrepareClientTrait
|
||||
*/
|
||||
public function getClientAuthenticated(
|
||||
$username = 'center a_social',
|
||||
$password = 'password'
|
||||
$password = 'password',
|
||||
): KernelBrowser {
|
||||
if ('admin' === $username) {
|
||||
return $this->getClientAuthenticatedAsAdmin();
|
||||
|
@@ -531,7 +531,7 @@ class DummyFilterWithApplying implements FilterInterface
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ?string $role,
|
||||
private readonly string $applyOn
|
||||
private readonly string $applyOn,
|
||||
) {}
|
||||
|
||||
public function getTitle()
|
||||
|
@@ -79,7 +79,7 @@ final class PageTest extends KernelTestCase
|
||||
public function testGetFirstItemNumber(
|
||||
$number,
|
||||
$itemPerPage,
|
||||
$expectedItemPerPage
|
||||
$expectedItemPerPage,
|
||||
) {
|
||||
$page = $this->generatePage($number, $itemPerPage);
|
||||
|
||||
@@ -96,7 +96,7 @@ final class PageTest extends KernelTestCase
|
||||
public function testGetLastItemNumber(
|
||||
$number,
|
||||
$itemPerPage,
|
||||
$expectedItemPerPage
|
||||
$expectedItemPerPage,
|
||||
) {
|
||||
$page = $this->generatePage($number, $itemPerPage);
|
||||
|
||||
@@ -121,7 +121,7 @@ final class PageTest extends KernelTestCase
|
||||
$itemPerPage = 10,
|
||||
$route = 'route',
|
||||
array $routeParameters = [],
|
||||
mixed $totalItems = 100
|
||||
mixed $totalItems = 100,
|
||||
) {
|
||||
$urlGenerator = $this->prophet->prophesize();
|
||||
$urlGenerator->willImplement(UrlGeneratorInterface::class);
|
||||
|
@@ -120,7 +120,7 @@ final class PaginatorTest extends KernelTestCase
|
||||
$totalItems,
|
||||
$itemPerPage,
|
||||
$currentPage,
|
||||
$expectedHasNextPage
|
||||
$expectedHasNextPage,
|
||||
) {
|
||||
$paginator = $this->generatePaginator($totalItems, $itemPerPage, $currentPage);
|
||||
|
||||
@@ -141,7 +141,7 @@ final class PaginatorTest extends KernelTestCase
|
||||
$totalItems,
|
||||
$itemPerpage,
|
||||
$pageNumber,
|
||||
$expectedHasPage
|
||||
$expectedHasPage,
|
||||
) {
|
||||
$paginator = $this->generatePaginator($totalItems, $itemPerpage);
|
||||
|
||||
@@ -159,7 +159,7 @@ final class PaginatorTest extends KernelTestCase
|
||||
$totalItems,
|
||||
$itemPerPage,
|
||||
$currentPage,
|
||||
mixed $expectedHasNextPage
|
||||
mixed $expectedHasNextPage,
|
||||
) {
|
||||
$paginator = $this->generatePaginator($totalItems, $itemPerPage, $currentPage);
|
||||
|
||||
@@ -227,7 +227,7 @@ final class PaginatorTest extends KernelTestCase
|
||||
$itemPerPage,
|
||||
mixed $currentPageNumber = 1,
|
||||
$route = '',
|
||||
array $routeParameters = []
|
||||
array $routeParameters = [],
|
||||
) {
|
||||
$urlGenerator = $this->prophet->prophesize();
|
||||
$urlGenerator->willImplement(UrlGeneratorInterface::class);
|
||||
|
@@ -233,7 +233,7 @@ final class AuthorizationHelperTest extends KernelTestCase
|
||||
User $user,
|
||||
string $role,
|
||||
Center $center,
|
||||
$message
|
||||
$message,
|
||||
) {
|
||||
$reachableScopes = $this->getAuthorizationHelper()
|
||||
->getReachableScopes($user, $role, $center);
|
||||
|
@@ -25,7 +25,7 @@ class TestHelper
|
||||
*/
|
||||
public static function getAuthenticatedClientOptions(
|
||||
mixed $username = 'center a_social',
|
||||
mixed $password = 'password'
|
||||
mixed $password = 'password',
|
||||
) {
|
||||
return [
|
||||
'PHP_AUTH_USER' => $username,
|
||||
|
Reference in New Issue
Block a user