update cs after php-cs-fixer upgrade

This commit is contained in:
2024-09-12 12:02:33 +02:00
parent 5d0b531820
commit f0f651edea
286 changed files with 374 additions and 374 deletions

View File

@@ -51,7 +51,7 @@ class ActionEvent extends \Symfony\Contracts\EventDispatcher\Event
/**
* an array of key value data to describe the movement.
*/
protected $metadata = []
protected $metadata = [],
) {}
/**

View File

@@ -32,7 +32,7 @@ class PersonMove
public function __construct(
private readonly EntityManagerInterface $em,
private readonly PersonMoveManager $personMoveManager,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {}
/**

View File

@@ -28,7 +28,7 @@ final class ChillPersonMoveCommand extends Command
public function __construct(
private readonly PersonMove $mover,
private readonly EntityManagerInterface $em,
private readonly LoggerInterface $chillLogger
private readonly LoggerInterface $chillLogger,
) {
parent::__construct('chill:person:move');
}

View File

@@ -24,7 +24,7 @@ final class ImportSocialWorkMetadata extends Command
protected EntityManagerInterface $em;
public function __construct(
protected SocialWorkMetadataInterface $importer
protected SocialWorkMetadataInterface $importer,
) {
parent::__construct('chill:person:import-socialwork');
}

View File

@@ -23,7 +23,7 @@ class ConfigPersonAltNamesHelper
/**
* the raw config, directly from the container parameter.
*/
private $config
private $config,
) {}
/**

View File

@@ -41,7 +41,7 @@ final class AccompanyingCourseWorkController extends AbstractController
private readonly LoggerInterface $chillLogger,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
#[Route(path: '{_locale}/person/accompanying-period/{id}/work/new', name: 'chill_person_accompanying_period_work_new', methods: ['GET'])]

View File

@@ -39,7 +39,7 @@ class AccompanyingPeriodController extends AbstractController
private readonly EventDispatcherInterface $eventDispatcher,
private readonly ValidatorInterface $validator,
private readonly TranslatorInterface $translator,
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry
private readonly \Doctrine\Persistence\ManagerRegistry $managerRegistry,
) {}
/**

View File

@@ -43,7 +43,7 @@ class HouseholdCompositionController extends AbstractController
private readonly EntityManagerInterface $entityManager,
private readonly TranslatorInterface $translator,
private readonly \Twig\Environment $engine,
private readonly UrlGeneratorInterface $urlGenerator
private readonly UrlGeneratorInterface $urlGenerator,
) {}
#[Route(path: '/{_locale}/person/household/{household_id}/composition/{composition_id}/delete', name: 'chill_person_household_composition_delete')]

View File

@@ -31,7 +31,7 @@ class PersonApiController extends ApiController
public function __construct(
private readonly AuthorizedCenterOnPersonCreationInterface $authorizedCenterOnPersonCreation,
private readonly ConfigPersonAltNamesHelper $configPersonAltNameHelper,
ParameterBagInterface $parameterBag
ParameterBagInterface $parameterBag,
) {
$this->showCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
}

View File

@@ -35,7 +35,7 @@ class UserAccompanyingPeriodController extends AbstractController
],
false => [
AccompanyingPeriod::STEP_CLOSED,
]
],
};
$total = $this->accompanyingPeriodRepository->countBy(['user' => $this->getUser(), 'step' => $steps]);

View File

@@ -227,7 +227,7 @@ class LoadPeople extends AbstractFixture implements ContainerAwareInterface, Ord
protected CountryRepository $countryRepository,
protected MaritalStatusRepository $maritalStatusRepository,
protected ScopeRepository $scopeRepository,
protected UserRepository $userRepository
protected UserRepository $userRepository,
) {
$this->faker = Factory::create('fr_FR');
$this->faker->addProvider($this);

View File

@@ -45,7 +45,7 @@ class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, T
* @var \DateTimeImmutable
*/
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
private \DateTimeImmutable $startDate
private \DateTimeImmutable $startDate,
) {}
public function getId(): ?int

View File

@@ -39,7 +39,7 @@ class UserHistory implements TrackCreationInterface
#[ORM\JoinColumn(nullable: false)]
private User $user,
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATETIME_IMMUTABLE, nullable: false, options: ['default' => 'now()'])]
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now')
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now'),
) {}
public function getAccompanyingPeriod(): AccompanyingPeriod

View File

@@ -42,7 +42,7 @@ class AccompanyingPeriodParticipation
#[ORM\JoinColumn(name: 'accompanyingperiod_id', referencedColumnName: 'id', nullable: false)]
private ?AccompanyingPeriod $accompanyingPeriod,
#[Groups(['read', 'docgen:read'])] #[ORM\ManyToOne(targetEntity: Person::class, inversedBy: 'accompanyingPeriodParticipations')] #[ORM\JoinColumn(name: 'person_id', referencedColumnName: 'id', nullable: false)]
private ?Person $person
private ?Person $person,
) {
$this->startDate = new \DateTime('now');
$person->getAccompanyingPeriodParticipations()->add($this);

View File

@@ -594,7 +594,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*/
public function getAccompanyingPeriodInvolved(
bool $asParticipantOpen = true,
bool $asRequestor = true
bool $asRequestor = true,
): Collection {
$result = new ArrayCollection();
@@ -621,7 +621,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
public function countAccompanyingPeriodInvolved(
bool $asParticipantOpen = true,
bool $asRequestor = true
bool $asRequestor = true,
): int {
// TODO should be optimized to avoid loading accompanying period ?
return $this->getAccompanyingPeriodInvolved($asParticipantOpen, $asRequestor)

View File

@@ -44,7 +44,7 @@ class PersonCenterHistory implements TrackCreationInterface, TrackUpdateInterfac
#[ORM\ManyToOne(targetEntity: Center::class)]
private ?Center $center = null,
#[ORM\Column(type: \Doctrine\DBAL\Types\Types::DATE_IMMUTABLE, nullable: false)]
private ?\DateTimeImmutable $startDate = null
private ?\DateTimeImmutable $startDate = null,
) {}
public function getCenter(): ?Center

View File

@@ -403,7 +403,7 @@ class SocialAction
return match ($actions instanceof ReadableCollection) {
true => $actions->filter($filterFn),
false => array_filter($actions, $filterFn)
false => array_filter($actions, $filterFn),
};
}
}

View File

@@ -26,7 +26,7 @@ class CreatorJobAggregator implements AggregatorInterface
public function __construct(
private readonly UserJobRepository $jobRepository,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -26,7 +26,7 @@ final readonly class OriginAggregator implements AggregatorInterface
public function __construct(
EntityManagerInterface $em,
private TranslatableStringHelper $translatableStringHelper
private TranslatableStringHelper $translatableStringHelper,
) {
$this->repository = $em->getRepository(Origin::class);
}

View File

@@ -31,7 +31,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface, DataTran
public function __construct(
private UserRepository $userRepository,
private UserRender $userRender,
private RollingDateConverterInterface $rollingDateConverter
private RollingDateConverterInterface $rollingDateConverter,
) {}
public function addRole(): ?string

View File

@@ -26,7 +26,7 @@ final readonly class ByStepAggregator implements AggregatorInterface
private const KEY = 'acpstephistory_step_agg';
public function __construct(
private TranslatorInterface $translator
private TranslatorInterface $translator,
) {}
public function buildForm(FormBuilderInterface $builder)

View File

@@ -24,7 +24,7 @@ class CreatorAggregator implements AggregatorInterface
public function __construct(
private readonly UserRepository $userRepository,
private readonly UserRender $userRender
private readonly UserRender $userRender,
) {}
public function addRole(): ?string

View File

@@ -26,7 +26,7 @@ class CreatorJobAggregator implements AggregatorInterface
public function __construct(
private readonly UserJobRepository $jobRepository,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -26,7 +26,7 @@ class CreatorScopeAggregator implements AggregatorInterface
public function __construct(
private readonly ScopeRepository $scopeRepository,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -27,7 +27,7 @@ final readonly class JobAggregator implements AggregatorInterface
public function __construct(
private UserJobRepository $jobRepository,
private TranslatableStringHelper $translatableStringHelper
private TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -28,7 +28,7 @@ final readonly class ReferrerAggregator implements AggregatorInterface
public function __construct(
private UserRepository $userRepository,
private UserRender $userRender,
private RollingDateConverterInterface $rollingDateConverter
private RollingDateConverterInterface $rollingDateConverter,
) {}
public function addRole(): ?string

View File

@@ -27,7 +27,7 @@ final readonly class ScopeAggregator implements AggregatorInterface
public function __construct(
private ScopeRepository $scopeRepository,
private TranslatableStringHelper $translatableStringHelper
private TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -29,7 +29,7 @@ class AvgDurationAPWorkPersonAssociatedOnAccompanyingPeriod implements ExportInt
public function __construct(
ParameterBagInterface $parameterBag,
private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository
private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository,
) {
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}

View File

@@ -29,7 +29,7 @@ class AvgDurationAPWorkPersonAssociatedOnWork implements ExportInterface, Groupe
public function __construct(
ParameterBagInterface $parameterBag,
private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository
private readonly AccompanyingPeriodWorkRepository $accompanyingPeriodWorkRepository,
) {
$this->filterStatsByCenters = $parameterBag->get('chill_main')['acl']['filter_stats_by_center'];
}

View File

@@ -51,7 +51,7 @@ class ListPersonDuplicate implements DirectExportInterface, ExportElementValidat
EntityManagerInterface $em,
private readonly TranslatorInterface $translator,
private readonly UrlGeneratorInterface $router,
$routeParameters
$routeParameters,
) {
$this->entityManager = $em;
$this->baseUrl = $routeParameters['scheme'].

View File

@@ -28,7 +28,7 @@ class CreatorJobFilter implements FilterInterface
public function __construct(
private readonly TranslatableStringHelper $translatableStringHelper,
private readonly UserJobRepositoryInterface $userJobRepository
private readonly UserJobRepositoryInterface $userJobRepository,
) {}
public function addRole(): ?string

View File

@@ -37,7 +37,7 @@ class GeographicalUnitStatFilter implements FilterInterface
private readonly GeographicalUnitRepositoryInterface $geographicalUnitRepository,
private readonly GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly RollingDateConverterInterface $rollingDateConverter
private readonly RollingDateConverterInterface $rollingDateConverter,
) {}
public function addRole(): ?string

View File

@@ -41,7 +41,7 @@ final readonly class ReferrerFilterBetweenDates implements FilterInterface
public function __construct(
private RollingDateConverterInterface $rollingDateConverter,
private UserRender $userRender
private UserRender $userRender,
) {}
public function addRole(): ?string

View File

@@ -30,7 +30,7 @@ final readonly class SocialActionFilter implements FilterInterface
public function __construct(
private SocialActionRender $actionRender,
private RollingDateConverterInterface $rollingDateConverter,
private TranslatorInterface $translator
private TranslatorInterface $translator,
) {}
public function addRole(): ?string

View File

@@ -30,7 +30,7 @@ class SocialIssueFilter implements FilterInterface
public function __construct(
TranslatorInterface $translator,
private readonly SocialIssueRender $socialIssueRender
private readonly SocialIssueRender $socialIssueRender,
) {
$this->translator = $translator;
}

View File

@@ -32,7 +32,7 @@ use Symfony\Component\Form\FormBuilderInterface;
final readonly class ByDateFilter implements FilterInterface
{
public function __construct(
private RollingDateConverterInterface $rollingDateConverter
private RollingDateConverterInterface $rollingDateConverter,
) {}
public function getTitle()

View File

@@ -27,7 +27,7 @@ readonly class CompositionFilter implements FilterInterface
{
public function __construct(
private TranslatableStringHelper $translatableStringHelper,
private RollingDateConverterInterface $rollingDateConverter
private RollingDateConverterInterface $rollingDateConverter,
) {}
public function addRole(): ?string

View File

@@ -28,7 +28,7 @@ class CreatorJobFilter implements FilterInterface
public function __construct(
private readonly UserJobRepository $userJobRepository,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -28,7 +28,7 @@ class CreatorScopeFilter implements FilterInterface
public function __construct(
private readonly ScopeRepository $scopeRepository,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly TranslatableStringHelper $translatableStringHelper,
) {}
public function addRole(): ?string

View File

@@ -30,7 +30,7 @@ class ScopeFilter implements FilterInterface
public function __construct(
protected TranslatorInterface $translator,
private readonly TranslatableStringHelper $translatableStringHelper,
private readonly ScopeRepositoryInterface $scopeRepository
private readonly ScopeRepositoryInterface $scopeRepository,
) {}
public function addRole(): ?string

View File

@@ -87,7 +87,7 @@ final readonly class ListAccompanyingPeriodHelper
private TranslatorInterface $translator,
private UserHelper $userHelper,
private LabelPersonHelper $labelPersonHelper,
private CenterRepository $centerRepository
private CenterRepository $centerRepository,
) {}
public function getQueryKeys($data)

View File

@@ -27,7 +27,7 @@ class PersonChoiceLoader implements ChoiceLoaderInterface
public function __construct(
protected PersonRepository $personRepository,
?array $centers = null
?array $centers = null,
) {
if (null !== $centers) {
$this->centers = $centers;

View File

@@ -45,7 +45,7 @@ final class CreationPersonType extends AbstractType
public function __construct(
private readonly ConfigPersonAltNamesHelper $configPersonAltNamesHelper,
private readonly EventDispatcherInterface $dispatcher,
ParameterBagInterface $parameterBag
ParameterBagInterface $parameterBag,
) {
$this->askCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
}

View File

@@ -47,7 +47,7 @@ class ClosingMotivePickerType extends AbstractType
public function __construct(
TranslatableStringHelper $translatableStringHelper,
ChillEntityRenderExtension $chillEntityRenderExtension,
ClosingMotiveRepository $closingMotiveRepository
ClosingMotiveRepository $closingMotiveRepository,
) {
$this->translatableStringHelper = $translatableStringHelper;
$this->entityRenderExtension = $chillEntityRenderExtension;

View File

@@ -48,7 +48,7 @@ final class PickPersonType extends AbstractType
private readonly TokenStorageInterface $tokenStorage,
private readonly AuthorizationHelper $authorizationHelper,
private readonly UrlGeneratorInterface $urlGenerator,
private readonly TranslatorInterface $translator
private readonly TranslatorInterface $translator,
) {}
public function buildView(\Symfony\Component\Form\FormView $view, \Symfony\Component\Form\FormInterface $form, array $options)

View File

@@ -41,7 +41,7 @@ class MembersEditor
public function __construct(
private readonly ValidatorInterface $validator,
private readonly ?Household $household,
private readonly EventDispatcherInterface $eventDispatcher
private readonly EventDispatcherInterface $eventDispatcher,
) {}
/**
@@ -162,7 +162,7 @@ class MembersEditor
*/
public function leaveMovement(
\DateTimeImmutable $date,
Person $person
Person $person,
): self {
$criteria = new Criteria();
$expr = Criteria::expr();

View File

@@ -42,7 +42,7 @@ class PersonMenuBuilder implements LocalMenuBuilderInterface
ParameterBagInterface $parameterBag,
private readonly Security $security,
protected TranslatorInterface $translator,
private readonly ResidentialAddressRepository $residentialAddressRepo
private readonly ResidentialAddressRepository $residentialAddressRepo,
) {
$this->showAccompanyingPeriod = $parameterBag->get('chill_person.accompanying_period');
}

View File

@@ -29,7 +29,7 @@ class UserMenuBuilder implements LocalMenuBuilderInterface
public $translator;
public function __construct(
AuthorizationCheckerInterface $authorizationChecker
AuthorizationCheckerInterface $authorizationChecker,
) {
$this->authorizationChecker = $authorizationChecker;
}

View File

@@ -44,7 +44,7 @@ final readonly class PrivacyEventSubscriber implements EventSubscriberInterface
*/
public function __construct(
private LoggerInterface $logger,
private TokenStorageInterface $token
private TokenStorageInterface $token,
) {}
public static function getSubscribedEvents()

View File

@@ -39,7 +39,7 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin
private AccompanyingPeriodRepository $accompanyingPeriodRepository,
private Security $security,
private AuthorizationHelperForCurrentUserInterface $authorizationHelper,
private CenterResolverManagerInterface $centerResolver
private CenterResolverManagerInterface $centerResolver,
) {}
public function buildQueryOpenedAccompanyingCourseByUserAndPostalCodes(?User $user, array $postalCodes = []): QueryBuilder
@@ -108,7 +108,7 @@ final readonly class AccompanyingPeriodACLAwareRepository implements Accompanyin
string $role,
?array $orderBy = [],
?int $limit = null,
?int $offset = null
?int $offset = null,
): array {
$qb = $this->accompanyingPeriodRepository->createQueryBuilder('ap');
$scopes = $this->authorizationHelper

View File

@@ -41,7 +41,7 @@ interface AccompanyingPeriodACLAwareRepositoryInterface
string $role,
?array $orderBy = [],
?int $limit = null,
?int $offset = null
?int $offset = null,
): array;
/**

View File

@@ -85,7 +85,7 @@ final readonly class HouseholdACLAwareRepository implements HouseholdACLAwareRep
public function findByAddressReference(
AddressReference $addressReference,
?int $firstResult = 0,
?int $maxResult = 50
?int $maxResult = 50,
): array {
$qb = $this->buildQueryByAddressReference($addressReference);
$qb = $this->addACL($qb);

View File

@@ -24,6 +24,6 @@ interface HouseholdACLAwareRepositoryInterface
public function findByAddressReference(
AddressReference $addressReference,
?int $firstResult = 0,
?int $maxResult = 50
?int $maxResult = 50,
): array;
}

View File

@@ -37,7 +37,7 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): SearchApiQuery {
$query = $this->createSearchQuery(
$default,
@@ -65,7 +65,7 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): int {
$query = $this->buildAuthorizedQuery(
$default,
@@ -99,7 +99,7 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): SearchApiQuery {
$query = new SearchApiQuery();
$query
@@ -256,7 +256,7 @@ final readonly class PersonACLAwareRepository implements PersonACLAwareRepositor
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): array {
$query = $this->buildAuthorizedQuery(
$default,

View File

@@ -26,7 +26,7 @@ interface PersonACLAwareRepositoryInterface
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): SearchApiQuery;
public function countBySearchCriteria(
@@ -39,7 +39,7 @@ interface PersonACLAwareRepositoryInterface
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
);
/**
@@ -58,6 +58,6 @@ interface PersonACLAwareRepositoryInterface
?string $gender = null,
?string $countryCode = null,
?string $phonenumber = null,
?string $city = null
?string $city = null,
): array;
}

View File

@@ -33,7 +33,7 @@ class PersonRepository implements ObjectRepository
public function countByPhone(
string $phonenumber,
$centers,
array $only = ['mobile', 'phone']
array $only = ['mobile', 'phone'],
): int {
$qb = $this->repository->createQueryBuilder('p');
$qb->select('COUNT(p)');
@@ -77,7 +77,7 @@ class PersonRepository implements ObjectRepository
$centers,
$firstResult,
$maxResults,
array $only = ['mobile', 'phone']
array $only = ['mobile', 'phone'],
) {
$qb = $this->repository->createQueryBuilder('p');
$qb->select('p');

View File

@@ -45,7 +45,7 @@ class SimilarPersonMatcher
AuthorizationHelper $authorizationHelper,
TokenStorageInterface $tokenStorage,
protected PersonNotDuplicateRepository $personNotDuplicateRepository,
protected PersonRenderInterface $personRender
protected PersonRenderInterface $personRender,
) {
$this->em = $em;
$this->authorizationHelper = $authorizationHelper;
@@ -56,7 +56,7 @@ class SimilarPersonMatcher
Person $person,
float $precision = 0.30,
string $orderBy = self::SIMILAR_SEARCH_ORDER_BY_SIMILARITY,
bool $addYearComparison = false
bool $addYearComparison = false,
) {
$centers = $this->authorizationHelper->getReachableCenters(
$this->tokenStorage->getToken()->getUser(),

View File

@@ -109,7 +109,7 @@ class AccompanyingPeriodVoter extends AbstractChillVoter implements ProvideRoleH
public function __construct(
private readonly Security $security,
VoterHelperFactoryInterface $voterHelperFactory
VoterHelperFactoryInterface $voterHelperFactory,
) {
$this->voterHelper = $voterHelperFactory
->generate(self::class)

View File

@@ -43,7 +43,7 @@ class AccompanyingPeriodWorkVoter extends Voter implements ProvideRoleHierarchyI
public function __construct(
private readonly Security $security,
VoterHelperFactoryInterface $voterHelperFactory
VoterHelperFactoryInterface $voterHelperFactory,
) {
$this->voterHelper = $voterHelperFactory
->generate(self::class)

View File

@@ -36,7 +36,7 @@ class PersonVoter extends AbstractChillVoter implements ProvideRoleHierarchyInte
protected VoterHelperInterface $voter;
public function __construct(
VoterHelperFactoryInterface $voterFactory
VoterHelperFactoryInterface $voterFactory,
) {
$this->voter = $voterFactory
->generate(self::class)

View File

@@ -47,7 +47,7 @@ class PersonJsonNormalizer implements DenormalizerAwareInterface, NormalizerAwar
private readonly PersonRepository $repository,
private readonly CenterResolverManagerInterface $centerResolverManager,
private readonly ResidentialAddressRepository $residentialAddressRepository,
private readonly PhoneNumberHelperInterface $phoneNumberHelper
private readonly PhoneNumberHelperInterface $phoneNumberHelper,
) {}
public function denormalize($data, $type, $format = null, array $context = [])

View File

@@ -59,7 +59,7 @@ class AccompanyingPeriodContext implements
private readonly TranslatorInterface $translator,
private readonly BaseContextData $baseContextData,
private readonly ThirdPartyRender $thirdPartyRender,
private readonly ThirdPartyRepository $thirdPartyRepository
private readonly ThirdPartyRepository $thirdPartyRepository,
) {}
public function adminFormReverseTransform(array $data): array

View File

@@ -65,7 +65,7 @@ final readonly class PersonContext implements PersonContextInterface
private TranslatableStringHelperInterface $translatableStringHelper,
private ThirdPartyRender $thirdPartyRender,
private ThirdPartyRepository $thirdPartyRepository,
private ResidentialAddressRepository $residentialAddressRepository
private ResidentialAddressRepository $residentialAddressRepository,
) {
$this->showScopes = $parameterBag->get('chill_main')['acl']['form_show_scopes'];
}

View File

@@ -30,7 +30,7 @@ class PersonContextWithThirdParty implements DocGeneratorContextWithAdminFormInt
public function __construct(
private readonly PersonContextInterface $personContext,
private readonly NormalizerInterface $normalizer,
private readonly ThirdPartyRepository $thirdPartyRepository
private readonly ThirdPartyRepository $thirdPartyRepository,
) {}
public function adminFormReverseTransform(array $data): array

View File

@@ -226,7 +226,7 @@ final readonly class SocialWorkMetadata implements SocialWorkMetadataInterface
float $orderingParent,
float $orderingChild,
?SocialAction $previousSocialAction,
?SocialAction $previousSocialActionChild
?SocialAction $previousSocialActionChild,
): array {
if (null === $socialActionTitle) {
return [
@@ -275,7 +275,7 @@ final readonly class SocialWorkMetadata implements SocialWorkMetadataInterface
float $orderingParent,
float $orderingChild,
?SocialIssue $previousSocialIssue,
?SocialIssue $previousSocialIssueChild
?SocialIssue $previousSocialIssueChild,
): array {
$return = [];

View File

@@ -29,7 +29,7 @@ final readonly class ClosingMotiveRender implements ChillEntityRenderInterface
public function __construct(
private TranslatableStringHelperInterface $translatableStringHelper,
private TranslatorInterface $translator
private TranslatorInterface $translator,
) {}
public function renderBox($entity, array $options): string

View File

@@ -247,7 +247,7 @@ final class PersonMoveEventSubscriberTest extends KernelTestCase
?\Twig\Environment $engine = null,
?NotificationPersisterInterface $notificationPersister = null,
?Security $security = null,
?TranslatorInterface $translator = null
?TranslatorInterface $translator = null,
): PersonAddressMoveEventSubscriber {
if (null === $translator) {
$double = $this->prophesize(TranslatorInterface::class);

View File

@@ -222,7 +222,7 @@ final class PersonControllerCreateTest extends WebTestCase
Form &$creationForm,
string $firstname = 'God',
string $lastname = 'Jesus',
?\DateTime $birthdate = null
?\DateTime $birthdate = null,
) {
$creationForm->get(self::FIRSTNAME_INPUT)->setValue($firstname.'_'.uniqid());
$creationForm->get(self::LASTNAME_INPUT)->setValue($lastname.'_'.uniqid());

View File

@@ -562,7 +562,7 @@ final class MembersEditorTest extends TestCase
private function buildMembersEditorFactory(
?EventDispatcherInterface $eventDispatcher = null,
?ValidatorInterface $validator = null
?ValidatorInterface $validator = null,
) {
if (null === $eventDispatcher) {
$double = $this->getProphet()->prophesize();

View File

@@ -242,7 +242,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
?TranslatorInterface $translator = null,
?TranslatableStringHelper $translatableStringHelper = null,
?NormalizerInterface $normalizer = null,
?SummaryBudgetInterface $summaryBudget = null
?SummaryBudgetInterface $summaryBudget = null,
): PersonDocGenNormalizer {
if (null === $summaryBudget) {
$summaryBudget = $this->prophesize(SummaryBudgetInterface::class);
@@ -278,7 +278,7 @@ final class PersonDocGenNormalizerTest extends KernelTestCase
?RelationshipRepository $relationshipRepository = null,
?TranslatorInterface $translator = null,
?TranslatableStringHelper $translatableStringHelper = null,
?SummaryBudgetInterface $summaryBudget = null
?SummaryBudgetInterface $summaryBudget = null,
): PersonDocGenNormalizer {
if (null === $relationshipRepository) {
$relationshipRepository = $this->prophesize(RelationshipRepository::class);

View File

@@ -68,7 +68,7 @@ final class PersonJsonNormalizerTest extends KernelTestCase
CenterResolverManagerInterface $centerResolverManager,
ResidentialAddressRepository $residentialAddressRepository,
PhoneNumberHelperInterface $phoneNumberHelper,
NormalizerInterface $normalizer
NormalizerInterface $normalizer,
): PersonJsonNormalizer {
$personJsonNormalizer = new PersonJsonNormalizer(
$render,

View File

@@ -105,7 +105,7 @@ class AccompanyingPeriodContextTest extends KernelTestCase
AccompanyingPeriod $entity,
array $data,
array $expectedNormalized,
callable $assertionsOnData
callable $assertionsOnData,
): void {
$context = $this->buildContext();
$template = new DocGeneratorTemplate();

View File

@@ -77,7 +77,7 @@ final class PersonContextTest extends KernelTestCase
Person $entity,
array $data,
array $expectedNormalized,
callable $assertionsOnData
callable $assertionsOnData,
): void {
// we boot kernel only for this test
self::bootKernel();
@@ -354,7 +354,7 @@ final class PersonContextTest extends KernelTestCase
?TranslatableStringHelperInterface $translatableStringHelper = null,
?ThirdPartyRender $thirdPartyRender = null,
?ThirdPartyRepository $thirdPartyRepository = null,
?ResidentialAddressRepository $residentialAddressRepository = null
?ResidentialAddressRepository $residentialAddressRepository = null,
): PersonContext {
if (null === $authorizationHelper) {
$authorizationHelper = $this->prophesize(AuthorizationHelperInterface::class)->reveal();

View File

@@ -41,7 +41,7 @@ class AccompanyingPeriodWorkEvaluationGenericDocProviderTest extends KernelTestC
public function testBuildFetchQueryForAccompanyingPeriod(
?\DateTimeImmutable $startDate = null,
?\DateTimeImmutable $endDate = null,
?string $content = null
?string $content = null,
): void {
$period = $this->entityManager->createQuery('SELECT a FROM '.AccompanyingPeriod::class.' a')
->setMaxResults(1)

View File

@@ -25,7 +25,7 @@ class BirthdateValidator extends ConstraintValidator
public function __construct(
private readonly ParameterBagInterface $parameterBag,
private readonly ClockInterface $clock
private readonly ClockInterface $clock,
) {
$this->interval_spec = $this->parameterBag->get('chill_person')['validation']['birthdate_not_after'];
}

View File

@@ -23,7 +23,7 @@ class AddAPersonWidget implements WidgetInterface
Environment $env,
$place,
array $context,
array $config
array $config,
) {
return $env->render('@ChillPerson/Widget/homepage_add_a_person.html.twig');
}