Skip to content

Commit 3fb34c9

Browse files
committed
Fix line iteration to passing boolean to rtrim()
1 parent 5572ee7 commit 3fb34c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/src/FixtureContentParser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public function parse(string $fixturePath): array
5656
];
5757

5858
// phpcs:disable VariableAnalysis
59-
foreach ($this->readFile($fixturePath) as list($lineNum, $line)) {
59+
foreach ($this->readFile($fixturePath) as $lineNum => $line) {
6060
$this->readLine($lineNum, $line, $accumulator);
6161
}
6262
// phpcs:enable
@@ -154,8 +154,8 @@ private function readFile(string $file)
154154

155155
$line = fgets($handle);
156156
while ($line !== false) {
157+
yield $lineNum++ => rtrim($line, "\r\n");
157158
$line = fgets($handle);
158-
yield [$lineNum++, rtrim($line, "\r\n")];
159159
}
160160

161161
fclose($handle);

0 commit comments

Comments
 (0)