mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-31 12:03:48 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -18,14 +18,8 @@ use const SORT_NUMERIC;
|
||||
|
||||
class LabelPersonHelper
|
||||
{
|
||||
private PersonRenderInterface $personRender;
|
||||
|
||||
private PersonRepository $personRepository;
|
||||
|
||||
public function __construct(PersonRepository $personRepository, PersonRenderInterface $personRender)
|
||||
public function __construct(private PersonRepository $personRepository, private PersonRenderInterface $personRender)
|
||||
{
|
||||
$this->personRepository = $personRepository;
|
||||
$this->personRender = $personRender;
|
||||
}
|
||||
|
||||
public function getLabelMulti(string $key, array $values, string $header): callable
|
||||
|
@@ -73,44 +73,8 @@ class ListPersonHelper
|
||||
'lifecycleUpdate',
|
||||
];
|
||||
|
||||
private ExportAddressHelper $addressHelper;
|
||||
|
||||
private CenterRepositoryInterface $centerRepository;
|
||||
|
||||
private CivilityRepositoryInterface $civilityRepository;
|
||||
|
||||
private CountryRepository $countryRepository;
|
||||
|
||||
private LanguageRepositoryInterface $languageRepository;
|
||||
|
||||
private MaritalStatusRepositoryInterface $maritalStatusRepository;
|
||||
|
||||
private TranslatableStringHelper $translatableStringHelper;
|
||||
|
||||
private TranslatorInterface $translator;
|
||||
|
||||
private UserRepositoryInterface $userRepository;
|
||||
|
||||
public function __construct(
|
||||
ExportAddressHelper $addressHelper,
|
||||
CenterRepositoryInterface $centerRepository,
|
||||
CivilityRepositoryInterface $civilityRepository,
|
||||
CountryRepository $countryRepository,
|
||||
LanguageRepositoryInterface $languageRepository,
|
||||
MaritalStatusRepositoryInterface $maritalStatusRepository,
|
||||
TranslatableStringHelper $translatableStringHelper,
|
||||
TranslatorInterface $translator,
|
||||
UserRepositoryInterface $userRepository
|
||||
) {
|
||||
$this->addressHelper = $addressHelper;
|
||||
$this->centerRepository = $centerRepository;
|
||||
$this->civilityRepository = $civilityRepository;
|
||||
$this->countryRepository = $countryRepository;
|
||||
$this->languageRepository = $languageRepository;
|
||||
$this->maritalStatusRepository = $maritalStatusRepository;
|
||||
$this->translatableStringHelper = $translatableStringHelper;
|
||||
$this->translator = $translator;
|
||||
$this->userRepository = $userRepository;
|
||||
public function __construct(private ExportAddressHelper $addressHelper, private CenterRepositoryInterface $centerRepository, private CivilityRepositoryInterface $civilityRepository, private CountryRepository $countryRepository, private LanguageRepositoryInterface $languageRepository, private MaritalStatusRepositoryInterface $maritalStatusRepository, private TranslatableStringHelper $translatableStringHelper, private TranslatorInterface $translator, private UserRepositoryInterface $userRepository)
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -237,7 +201,7 @@ class ListPersonHelper
|
||||
|
||||
public function getLabels($key, array $values, $data): callable
|
||||
{
|
||||
if (substr($key, 0, strlen('address_fields')) === 'address_fields') {
|
||||
if (str_starts_with($key, 'address_fields')) {
|
||||
return $this->addressHelper->getLabel($key, $values, $data, 'address_fields');
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user