Skip to content

Commit 7949f69

Browse files
committed
Try again
1 parent 746e049 commit 7949f69

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

phpstan.neon

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
parameters:
22
treatPhpDocTypesAsCertain: false
33
ignoreErrors:
4-
- '#Cannot access property \$args on PhpParser\\Node\|null#'
54
- '#Call to an undefined method PhpParser\\Node\\Expr\|PhpParser\\Node\\Name\:\:toString\(\)#'
65
- '#Parameter \#1 \$array of function array_flip expects array<int\|string>, array<int, int\|string>\|int\|string given.#'
76
-

src/Exercise/HaveTheLastSay.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,32 +125,32 @@ public function check(Input $input): ResultInterface
125125
fn ($node) => $node instanceof FuncCall && $node->name->toString() === 'fgetcsv'
126126
);
127127

128-
if ($funcCall->args[0]->name !== null) {
128+
if ($funcCall->getArgs()[0]->name !== null) {
129129
return Failure::fromNameAndReason(
130130
$this->getName(),
131131
'The stream argument must be specified using a positional parameter'
132132
);
133133
}
134134

135-
if (count($funcCall->args) > 2) {
135+
if (count($funcCall->getArgs()) > 2) {
136136
return Failure::fromNameAndReason(
137137
$this->getName(),
138138
'You should only specify the stream and separator arguments, no others'
139139
);
140140
}
141141

142-
if (!isset($funcCall->args[1])) {
142+
if (!isset($funcCall->getArgs()[1])) {
143143
return Failure::fromNameAndReason($this->getName(), 'The separator argument has not been specified');
144144
}
145145

146-
if (!$funcCall->args[1]->name) {
146+
if (!$funcCall->getArgs()[1]->name) {
147147
return Failure::fromNameAndReason(
148148
$this->getName(),
149149
'The second positional argument should not be specified'
150150
);
151151
}
152152

153-
if ($funcCall->args[1]->name->name !== 'separator') {
153+
if ($funcCall->getArgs()[1]->name->name !== 'separator') {
154154
return Failure::fromNameAndReason(
155155
$this->getName(),
156156
'A named argument has been used, but not for the separator argument'

0 commit comments

Comments
 (0)