Skip to content

Commit cfe9f20

Browse files
committed
Remove filtering for files
1 parent 0a59f41 commit cfe9f20

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

src/Analyser/FileAnalyser.php

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use PHPStan\Parser\Parser;
1616
use PHPStan\Parser\ParserErrorsException;
1717
use PHPStan\Rules\Registry as RuleRegistry;
18+
use function array_filter;
1819
use function array_keys;
1920
use function array_unique;
2021
use function array_values;
@@ -292,21 +293,6 @@ public function analyseFile(
292293
unset($unmatchedLineIgnores[$fileKey]);
293294
}
294295

295-
$fileErrors = array_filter($fileErrors, function (Error $error) use ($scope) : bool {
296-
if (! $error->canBeIgnored()) {
297-
return true;
298-
}
299-
300-
foreach ($this->ignoreErrorExtensionProvider->getExtensions() as $ignoreErrorExtension) {
301-
if ($ignoreErrorExtension->shouldIgnore($error, null, $scope)) {
302-
return false;
303-
}
304-
}
305-
306-
return true;
307-
});
308-
309-
310296
return new FileAnalyserResult(
311297
$fileErrors,
312298
$this->filteredPhpErrors,

src/Analyser/IgnoreErrorExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ interface IgnoreErrorExtension
2727

2828
public const EXTENSION_TAG = 'phpstan.ignoreErrorExtension';
2929

30-
public function shouldIgnore(Error $error, ?Node $node, Scope $scope): bool;
30+
public function shouldIgnore(Error $error, Node $node, Scope $scope): bool;
3131

3232
}

0 commit comments

Comments
 (0)