Skip to content

Commit d3f5a3f

Browse files
committed
[Validator] Use CPP in AbstractComparisonValidator, BicValidator, RangeValidator
1 parent 7484a85 commit d3f5a3f

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed

src/Symfony/Component/Validator/Constraints/AbstractComparisonValidator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,8 @@
2727
*/
2828
abstract class AbstractComparisonValidator extends ConstraintValidator
2929
{
30-
private ?PropertyAccessorInterface $propertyAccessor;
31-
32-
public function __construct(?PropertyAccessorInterface $propertyAccessor = null)
30+
public function __construct(private ?PropertyAccessorInterface $propertyAccessor = null)
3331
{
34-
$this->propertyAccessor = $propertyAccessor;
3532
}
3633

3734
public function validate(mixed $value, Constraint $constraint): void

src/Symfony/Component/Validator/Constraints/BicValidator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,8 @@ class BicValidator extends ConstraintValidator
5656
'EA' => 'ES', // Ceuta and Melilla
5757
];
5858

59-
private ?PropertyAccessor $propertyAccessor;
60-
61-
public function __construct(?PropertyAccessor $propertyAccessor = null)
59+
public function __construct(private ?PropertyAccessor $propertyAccessor = null)
6260
{
63-
$this->propertyAccessor = $propertyAccessor;
6461
}
6562

6663
public function validate(mixed $value, Constraint $constraint): void

src/Symfony/Component/Validator/Constraints/RangeValidator.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@
2424
*/
2525
class RangeValidator extends ConstraintValidator
2626
{
27-
private ?PropertyAccessorInterface $propertyAccessor;
28-
29-
public function __construct(?PropertyAccessorInterface $propertyAccessor = null)
27+
public function __construct(private ?PropertyAccessorInterface $propertyAccessor = null)
3028
{
31-
$this->propertyAccessor = $propertyAccessor;
3229
}
3330

3431
public function validate(mixed $value, Constraint $constraint): void

0 commit comments

Comments
 (0)