Skip to content

Commit

Permalink
Stricter RuleTestCase
Browse files Browse the repository at this point in the history
  • Loading branch information
janedbal committed Jul 10, 2024
1 parent cd60f87 commit e3efd02
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/RuleTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ private function autofix(string $file, array $analyserErrors): void
$errorsByLines = [];

foreach ($analyserErrors as $analyserError) {
$line = $analyserError->getLine() ?? -1;
$line = $analyserError->getLine();

if ($line === null) {
throw new LogicException('Error without line number: ' . $analyserError->getMessage());
}

$errorsByLines[$line] = $analyserError;
}

Expand Down

0 comments on commit e3efd02

Please sign in to comment.