Skip to content

Commit

Permalink
FileAnalyser - fixed unignorable errors that were thrown away
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejmirtes committed May 19, 2020
1 parent 8f137b7 commit 7dc1de3
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Analyser/FileAnalyser.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,11 @@ public function analyseFile(
$unmatchedLineIgnores = $linesToIgnoreKeys;
foreach ($temporaryFileErrors as $tmpFileError) {
$line = $tmpFileError->getLine();
if ($line === null) {
continue;
}
if (!$tmpFileError->canBeIgnored()) {
continue;
}

if (array_key_exists($line, $linesToIgnoreKeys)) {
if (
$line !== null
&& $tmpFileError->canBeIgnored()
&& array_key_exists($line, $linesToIgnoreKeys)
) {
unset($unmatchedLineIgnores[$line]);
continue;
}
Expand Down

0 comments on commit 7dc1de3

Please sign in to comment.