@@ -51,47 +51,47 @@ public function getNodeTypes(): array
51
51
52
52
public function refactor (Node $ node ): ?Node
53
53
{
54
- if (!$ node instanceof New_) {
54
+ if (! $ node instanceof New_) {
55
55
return null ;
56
56
}
57
57
58
58
// Match classes starting with Symfony\Component\Validator\Constraints\
59
- if (!$ node ->class instanceof FullyQualified && !$ node ->class instanceof Name) {
59
+ if (! $ node ->class instanceof FullyQualified && ! $ node ->class instanceof Name) {
60
60
return null ;
61
61
}
62
62
63
63
$ className = $ this ->getName ($ node ->class );
64
- if (!is_string ($ className )) {
64
+ if (! is_string ($ className )) {
65
65
return null ;
66
66
}
67
67
68
- if (!str_starts_with ($ className , 'Symfony\Component\Validator\Constraints \\' )) {
68
+ if (! str_starts_with ($ className , 'Symfony\Component\Validator\Constraints \\' )) {
69
69
return null ;
70
70
}
71
71
72
72
if (
73
- 0 === count ($ node ->args ) ||
74
- !$ node ->args [0 ] instanceof Arg ||
75
- !$ node ->args [0 ]->value instanceof Array_
73
+ count ($ node ->args ) === 0 ||
74
+ ! $ node ->args [0 ] instanceof Arg ||
75
+ ! $ node ->args [0 ]->value instanceof Array_
76
76
) {
77
77
return null ;
78
78
}
79
79
80
80
$ argName = $ node ->args [0 ]->name ;
81
- if (null !== $ argName && ' options ' !== $ argName ->name ) {
81
+ if ($ argName !== null && $ argName ->name !== ' options ' ) {
82
82
return null ;
83
83
}
84
84
85
85
$ array = $ node ->args [0 ]->value ;
86
86
$ namedArgs = [];
87
87
88
88
foreach ($ array ->items as $ item ) {
89
- if (!$ item instanceof ArrayItem || null === $ item ->key ) {
89
+ if (! $ item instanceof ArrayItem || $ item ->key === null ) {
90
90
continue ;
91
91
}
92
92
93
93
$ keyValue = $ this ->valueResolver ->getValue ($ item ->key );
94
- if (!is_string ($ keyValue )) {
94
+ if (! is_string ($ keyValue )) {
95
95
continue ;
96
96
}
97
97
0 commit comments