apply rector rules: php up to php82

This commit is contained in:
2023-07-19 23:16:01 +02:00
parent 7b637d1287
commit 023a29cb78
744 changed files with 1369 additions and 1381 deletions

View File

@@ -18,7 +18,7 @@ use const SORT_NUMERIC;
class LabelPersonHelper
{
public function __construct(private PersonRepository $personRepository, private PersonRenderInterface $personRender)
public function __construct(private readonly PersonRepository $personRepository, private readonly PersonRenderInterface $personRender)
{
}

View File

@@ -88,7 +88,7 @@ final readonly class ListAccompanyingPeriodHelper
public function getLabels($key, array $values, $data)
{
if (str_starts_with($key, 'acp_address_fields')) {
if (str_starts_with((string) $key, 'acp_address_fields')) {
return $this->addressHelper->getLabel($key, $values, $data, 'acp_address_fields');
}

View File

@@ -42,7 +42,7 @@ use function strlen;
*/
class ListPersonHelper
{
public const FIELDS = [
final public const FIELDS = [
'personId',
'civility',
'firstName',
@@ -74,7 +74,7 @@ class ListPersonHelper
'lifecycleUpdate',
];
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)
public function __construct(private readonly ExportAddressHelper $addressHelper, private readonly CenterRepositoryInterface $centerRepository, private readonly CivilityRepositoryInterface $civilityRepository, private readonly CountryRepository $countryRepository, private readonly LanguageRepositoryInterface $languageRepository, private readonly MaritalStatusRepositoryInterface $maritalStatusRepository, private readonly TranslatableStringHelper $translatableStringHelper, private readonly TranslatorInterface $translator, private readonly UserRepositoryInterface $userRepository)
{
}
@@ -208,7 +208,7 @@ class ListPersonHelper
public function getLabels($key, array $values, $data): callable
{
if (str_starts_with($key, 'address_fields')) {
if (str_starts_with((string) $key, 'address_fields')) {
return $this->addressHelper->getLabel($key, $values, $data, 'address_fields');
}