File tree Expand file tree Collapse file tree 3 files changed +3
-12
lines changed
src/Symfony/Component/Validator/Constraints Expand file tree Collapse file tree 3 files changed +3
-12
lines changed Original file line number Diff line number Diff line change 27
27
*/
28
28
abstract class AbstractComparisonValidator extends ConstraintValidator
29
29
{
30
- private ?PropertyAccessorInterface $ propertyAccessor ;
31
-
32
- public function __construct (?PropertyAccessorInterface $ propertyAccessor = null )
30
+ public function __construct (private ?PropertyAccessorInterface $ propertyAccessor = null )
33
31
{
34
- $ this ->propertyAccessor = $ propertyAccessor ;
35
32
}
36
33
37
34
public function validate (mixed $ value , Constraint $ constraint ): void
Original file line number Diff line number Diff line change @@ -56,11 +56,8 @@ class BicValidator extends ConstraintValidator
56
56
'EA ' => 'ES ' , // Ceuta and Melilla
57
57
];
58
58
59
- private ?PropertyAccessor $ propertyAccessor ;
60
-
61
- public function __construct (?PropertyAccessor $ propertyAccessor = null )
59
+ public function __construct (private ?PropertyAccessor $ propertyAccessor = null )
62
60
{
63
- $ this ->propertyAccessor = $ propertyAccessor ;
64
61
}
65
62
66
63
public function validate (mixed $ value , Constraint $ constraint ): void
Original file line number Diff line number Diff line change 24
24
*/
25
25
class RangeValidator extends ConstraintValidator
26
26
{
27
- private ?PropertyAccessorInterface $ propertyAccessor ;
28
-
29
- public function __construct (?PropertyAccessorInterface $ propertyAccessor = null )
27
+ public function __construct (private ?PropertyAccessorInterface $ propertyAccessor = null )
30
28
{
31
- $ this ->propertyAccessor = $ propertyAccessor ;
32
29
}
33
30
34
31
public function validate (mixed $ value , Constraint $ constraint ): void
You can’t perform that action at this time.
0 commit comments