DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -23,11 +23,8 @@ use function is_object;
class BirthdateValidator extends ConstraintValidator
{
private $interval_spec;
public function __construct($interval_spec = null)
public function __construct(private $interval_spec = null)
{
$this->interval_spec = $interval_spec;
}
public function validate($value, Constraint $constraint)
@@ -38,7 +35,7 @@ class BirthdateValidator extends ConstraintValidator
if (!$value instanceof DateTime) {
throw new LogicException('The input should a be a \DateTime interface,'
. (is_object($value) ? get_class($value) : gettype($value)));
. (get_debug_type($value)));
}
$limitDate = $this->getLimitDate();

View File

@@ -22,12 +22,9 @@ class PersonHasCenterValidator extends ConstraintValidator
{
private bool $centerRequired;
private CenterResolverManagerInterface $centerResolverManager;
public function __construct(ParameterBagInterface $parameterBag, CenterResolverManagerInterface $centerResolverManager)
public function __construct(ParameterBagInterface $parameterBag, private CenterResolverManagerInterface $centerResolverManager)
{
$this->centerRequired = $parameterBag->get('chill_person')['validation']['center_required'];
$this->centerResolverManager = $centerResolverManager;
}
public function validate($person, Constraint $constraint)