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

@@ -25,7 +25,7 @@ use function in_array;
class AccompanyingPeriodValidityValidator extends ConstraintValidator
{
public function __construct(private ActivityRepository $activityRepository, private SocialIssueRender $socialIssueRender, private TokenStorageInterface $token)
public function __construct(private readonly ActivityRepository $activityRepository, private readonly SocialIssueRender $socialIssueRender, private readonly TokenStorageInterface $token)
{
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
class LocationValidityValidator extends ConstraintValidator
{
public function __construct(private PersonRenderInterface $render)
public function __construct(private readonly PersonRenderInterface $render)
{
}

View File

@@ -26,7 +26,7 @@ class ParticipationOverlapValidator extends ConstraintValidator
{
private const MAX_PARTICIPATION = 1;
public function __construct(private PersonRenderInterface $personRender, private ThirdPartyRender $thirdpartyRender)
public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender)
{
}

View File

@@ -24,7 +24,7 @@ use function in_array;
class ResourceDuplicateCheckValidator extends ConstraintValidator
{
public function __construct(private PersonRenderInterface $personRender, private ThirdPartyRender $thirdpartyRender)
public function __construct(private readonly PersonRenderInterface $personRender, private readonly ThirdPartyRender $thirdpartyRender)
{
}

View File

@@ -26,7 +26,7 @@ use function count;
*/
class HouseholdMembershipSequentialValidator extends ConstraintValidator
{
public function __construct(private PersonRenderInterface $render)
public function __construct(private readonly PersonRenderInterface $render)
{
}

View File

@@ -25,7 +25,7 @@ use Symfony\Component\Validator\Constraint;
*/
class Birthdate extends Constraint
{
public const BIRTHDATE_INVALID_CODE = '3f42fd96-0b2d-11ec-8cf3-0f3b1b1ca1c4';
final public const BIRTHDATE_INVALID_CODE = '3f42fd96-0b2d-11ec-8cf3-0f3b1b1ca1c4';
public $message = 'The birthdate must be before %date%';
}

View File

@@ -20,9 +20,9 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException;
class PersonHasCenterValidator extends ConstraintValidator
{
private bool $centerRequired;
private readonly bool $centerRequired;
public function __construct(ParameterBagInterface $parameterBag, private CenterResolverManagerInterface $centerResolverManager)
public function __construct(ParameterBagInterface $parameterBag, private readonly CenterResolverManagerInterface $centerResolverManager)
{
$this->centerRequired = $parameterBag->get('chill_person')['validation']['center_required'];
}

View File

@@ -20,7 +20,7 @@ use Symfony\Component\Validator\Exception\UnexpectedValueException;
class RelationshipNoDuplicateValidator extends ConstraintValidator
{
public function __construct(private RelationshipRepository $relationshipRepository)
public function __construct(private readonly RelationshipRepository $relationshipRepository)
{
}