Skip to content

Commit 52036a5

Browse files
committed
Do not reference Scope in if branch that will be moved out of FileAnalyser
1 parent d026655 commit 52036a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Analyser/FileAnalyser.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,21 +200,21 @@ public function analyseFile(
200200
if ($identifiers === null) {
201201
$fileErrors[] = (new Error(
202202
sprintf('No error to ignore is reported on line %d.', $line),
203-
$scope->getFileDescription(),
203+
$file,
204204
$line,
205205
false,
206-
$scope->getFile(),
206+
$file,
207207
))->withIdentifier('ignore.unmatchedLine');
208208
continue;
209209
}
210210

211211
foreach ($identifiers as $identifier) {
212212
$fileErrors[] = (new Error(
213213
sprintf('No error with identifier %s is reported on line %d.', $identifier, $line),
214-
$scope->getFileDescription(),
214+
$file,
215215
$line,
216216
false,
217-
$scope->getFile(),
217+
$file,
218218
))->withIdentifier('ignore.unmatchedIdentifier');
219219
}
220220
}

0 commit comments

Comments
 (0)