apply rules rector up to php82

This commit is contained in:
2023-05-01 21:39:45 +02:00
parent 81e8928344
commit 6d63177ff4
733 changed files with 1257 additions and 1322 deletions

View File

@@ -40,11 +40,11 @@ final class CreationPersonType extends AbstractType
// TODO: See if this is still valid and update accordingly.
public const NAME = 'chill_personbundle_person_creation';
private bool $askCenters;
private readonly bool $askCenters;
public function __construct(
private ConfigPersonAltNamesHelper $configPersonAltNamesHelper,
private EventDispatcherInterface $dispatcher,
private readonly ConfigPersonAltNamesHelper $configPersonAltNamesHelper,
private readonly EventDispatcherInterface $dispatcher,
ParameterBagInterface $parameterBag
) {
$this->askCenters = $parameterBag->get('chill_main')['acl']['form_show_centers'];
@@ -114,7 +114,7 @@ final class CreationPersonType extends AbstractType
$resolver->setDefaults([
'data_class' => Person::class,
'constraints' => [
new Callback([$this, 'validateCheckedAddress']),
new Callback($this->validateCheckedAddress(...)),
],
]);
}

View File

@@ -22,7 +22,7 @@ use Symfony\Component\Form\FormBuilderInterface;
class HouseholdCompositionType extends AbstractType
{
public function __construct(private HouseholdCompositionTypeRepository $householdCompositionTypeRepository, private TranslatableStringHelperInterface $translatableStringHelper)
public function __construct(private readonly HouseholdCompositionTypeRepository $householdCompositionTypeRepository, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}

View File

@@ -29,7 +29,7 @@ use Symfony\Contracts\Translation\TranslatorInterface;
final class PersonResourceType extends AbstractType
{
public function __construct(private ResourceKindRender $resourceKindRender, private PersonRenderInterface $personRender, private ThirdPartyRender $thirdPartyRender, private TranslatorInterface $translator)
public function __construct(private readonly ResourceKindRender $resourceKindRender, private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdPartyRender, private readonly TranslatorInterface $translator)
{
}

View File

@@ -64,7 +64,7 @@ class PersonType extends AbstractType
array $personFieldsConfiguration,
ConfigPersonAltNamesHelper $configAltNamesHelper,
protected TranslatableStringHelperInterface $translatableStringHelper,
private ParameterBagInterface $parameterBag
private readonly ParameterBagInterface $parameterBag
) {
$this->config = $personFieldsConfiguration;
$this->configAltNamesHelper = $configAltNamesHelper;

View File

@@ -21,7 +21,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PersonAltNameType extends AbstractType
{
public function __construct(private ConfigPersonAltNamesHelper $configHelper, private TranslatableStringHelper $translatableStringHelper)
public function __construct(private readonly ConfigPersonAltNamesHelper $configHelper, private readonly TranslatableStringHelper $translatableStringHelper)
{
}

View File

@@ -24,7 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PersonPhoneType extends AbstractType
{
public function __construct(private PhonenumberHelper $phonenumberHelper, private EntityManagerInterface $em)
public function __construct(private readonly PhonenumberHelper $phonenumberHelper, private readonly EntityManagerInterface $em)
{
}

View File

@@ -26,7 +26,7 @@ use Symfony\Component\Serializer\SerializerInterface;
*/
class PickPersonDynamicType extends AbstractType
{
public function __construct(private DenormalizerInterface $denormalizer, private SerializerInterface $serializer, private NormalizerInterface $normalizer)
public function __construct(private readonly DenormalizerInterface $denormalizer, private readonly SerializerInterface $serializer, private readonly NormalizerInterface $normalizer)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickSocialActionType extends AbstractType
{
public function __construct(private SocialActionRender $actionRender, private SocialActionRepository $actionRepository)
public function __construct(private readonly SocialActionRender $actionRender, private readonly SocialActionRepository $actionRepository)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class PickSocialIssueType extends AbstractType
{
public function __construct(private SocialIssueRender $issueRender, private SocialIssueRepository $issueRepository)
public function __construct(private readonly SocialIssueRender $issueRender, private readonly SocialIssueRepository $issueRepository)
{
}

View File

@@ -28,7 +28,7 @@ use const SORT_STRING;
*/
class Select2MaritalStatusType extends AbstractType
{
public function __construct(private TranslatableStringHelper $translatableStringHelper, private EntityManagerInterface $em)
public function __construct(private readonly TranslatableStringHelper $translatableStringHelper, private readonly EntityManagerInterface $em)
{
}