Upgrade of php-cs-fixer

This commit is contained in:
2024-09-11 14:21:32 +02:00
parent 8b1b255050
commit d0ee381627
273 changed files with 357 additions and 357 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

@@ -26,7 +26,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 PaginatorFactory $paginator,
private readonly LoggerInterface $chillLogger,
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory
private readonly FilterOrderHelperFactoryInterface $filterOrderHelperFactory,
) {
}

View File

@@ -38,7 +38,7 @@ class AccompanyingPeriodController extends AbstractController
protected AccompanyingPeriodACLAwareRepositoryInterface $accompanyingPeriodACLAwareRepository,
private readonly EventDispatcherInterface $eventDispatcher,
private readonly ValidatorInterface $validator,
private readonly TranslatorInterface $translator
private readonly TranslatorInterface $translator,
) {
}

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,
) {
}

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

@@ -39,7 +39,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

@@ -58,7 +58,7 @@ class AccompanyingPeriodWorkReferrerHistory implements TrackCreationInterface, T
*
* @ORM\Column(type="date_immutable", nullable=false)
*/
private \DateTimeImmutable $startDate
private \DateTimeImmutable $startDate,
) {
}

View File

@@ -57,7 +57,7 @@ class UserHistory implements TrackCreationInterface
/**
* @ORM\Column(type="datetime_immutable", nullable=false, options={"default": "now()"})
*/
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now')
private \DateTimeImmutable $startDate = new \DateTimeImmutable('now'),
) {
}

View File

@@ -65,7 +65,7 @@ class AccompanyingPeriodParticipation
*
* @Groups({"read", "docgen:read"})
*/
private ?Person $person
private ?Person $person,
) {
$this->startDate = new \DateTime('now');
$person->getAccompanyingPeriodParticipations()->add($this);

View File

@@ -739,7 +739,7 @@ class Person implements HasCenterInterface, TrackCreationInterface, TrackUpdateI
*/
public function getAccompanyingPeriodInvolved(
bool $asParticipantOpen = true,
bool $asRequestor = true
bool $asRequestor = true,
): Collection {
$result = new ArrayCollection();
@@ -766,7 +766,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

@@ -58,7 +58,7 @@ class PersonCenterHistory implements TrackCreationInterface, TrackUpdateInterfac
/**
* @ORM\Column(type="date_immutable", nullable=false)
*/
private ?\DateTimeImmutable $startDate = null
private ?\DateTimeImmutable $startDate = null,
) {
}

View File

@@ -436,7 +436,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,
) {
}

View File

@@ -31,7 +31,7 @@ final readonly class GeographicalUnitStatAggregator implements AggregatorInterfa
public function __construct(
private GeographicalUnitLayerRepositoryInterface $geographicalUnitLayerRepository,
private TranslatableStringHelperInterface $translatableStringHelper,
private RollingDateConverterInterface $rollingDateConverter
private RollingDateConverterInterface $rollingDateConverter,
) {
}

View File

@@ -26,7 +26,7 @@ final class OriginAggregator implements AggregatorInterface
public function __construct(
EntityManagerInterface $em,
private readonly TranslatableStringHelper $translatableStringHelper
private readonly 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,
) {
}

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,
) {
}

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,
) {
}

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,
) {
}

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,
) {
}

View File

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

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,
) {
}

View File

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

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,
) {
}

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,
) {
}

View File

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

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,
) {
}

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,
) {
}

View File

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

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,
) {
}

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,
) {
}

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,
) {
}

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,
) {
}

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

@@ -73,7 +73,7 @@ class PickPersonType extends AbstractType
TokenStorageInterface $tokenStorage,
AuthorizationHelper $authorizationHelper,
UrlGeneratorInterface $urlGenerator,
TranslatorInterface $translator
TranslatorInterface $translator,
) {
$this->personRepository = $personRepository;
$this->user = $tokenStorage->getToken()->getUser();

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,
) {
}
@@ -163,7 +163,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

@@ -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,
) {
}
@@ -109,7 +109,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

@@ -87,7 +87,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

@@ -39,7 +39,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,
@@ -67,7 +67,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,
@@ -101,7 +101,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
@@ -258,7 +258,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,
) {
}

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,
) {
}

View File

@@ -65,7 +65,7 @@ final class PersonContext implements PersonContextInterface
private readonly TranslatableStringHelperInterface $translatableStringHelper,
private readonly ThirdPartyRender $thirdPartyRender,
private readonly ThirdPartyRepository $thirdPartyRepository,
private readonly ResidentialAddressRepository $residentialAddressRepository
private readonly 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,
) {
}

View File

@@ -228,7 +228,7 @@ final readonly class SocialWorkMetadata implements SocialWorkMetadataInterface
float $orderingParent,
float $orderingChild,
?SocialAction $previousSocialAction,
?SocialAction $previousSocialActionChild
?SocialAction $previousSocialActionChild,
): array {
if (null === $socialActionTitle) {
return [
@@ -277,7 +277,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,
) {
}

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');
}