File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 1
1
parameters :
2
2
treatPhpDocTypesAsCertain : false
3
3
ignoreErrors :
4
- - ' #Cannot access property \$args on PhpParser\\Node\|null #'
5
4
- '#Call to an undefined method PhpParser\\Node\\Expr\|PhpParser\\Node\\Name\:\:toString\ (\)#'
6
5
- ' #Parameter \ #1 \$array of function array_flip expects array<int\|string> , array<int , int\|string>\|int\|string given. #'
7
6
-
Original file line number Diff line number Diff line change @@ -125,32 +125,32 @@ public function check(Input $input): ResultInterface
125
125
fn ($ node ) => $ node instanceof FuncCall && $ node ->name ->toString () === 'fgetcsv '
126
126
);
127
127
128
- if ($ funcCall ->args [0 ]->name !== null ) {
128
+ if ($ funcCall ->getArgs () [0 ]->name !== null ) {
129
129
return Failure::fromNameAndReason (
130
130
$ this ->getName (),
131
131
'The stream argument must be specified using a positional parameter '
132
132
);
133
133
}
134
134
135
- if (count ($ funcCall ->args ) > 2 ) {
135
+ if (count ($ funcCall ->getArgs () ) > 2 ) {
136
136
return Failure::fromNameAndReason (
137
137
$ this ->getName (),
138
138
'You should only specify the stream and separator arguments, no others '
139
139
);
140
140
}
141
141
142
- if (!isset ($ funcCall ->args [1 ])) {
142
+ if (!isset ($ funcCall ->getArgs () [1 ])) {
143
143
return Failure::fromNameAndReason ($ this ->getName (), 'The separator argument has not been specified ' );
144
144
}
145
145
146
- if (!$ funcCall ->args [1 ]->name ) {
146
+ if (!$ funcCall ->getArgs () [1 ]->name ) {
147
147
return Failure::fromNameAndReason (
148
148
$ this ->getName (),
149
149
'The second positional argument should not be specified '
150
150
);
151
151
}
152
152
153
- if ($ funcCall ->args [1 ]->name ->name !== 'separator ' ) {
153
+ if ($ funcCall ->getArgs () [1 ]->name ->name !== 'separator ' ) {
154
154
return Failure::fromNameAndReason (
155
155
$ this ->getName (),
156
156
'A named argument has been used, but not for the separator argument '
You can’t perform that action at this time.
0 commit comments