File tree Expand file tree Collapse file tree 2 files changed +2
-16
lines changed
Expand file tree Collapse file tree 2 files changed +2
-16
lines changed Original file line number Diff line number Diff line change 1515use PHPStan \Parser \Parser ;
1616use PHPStan \Parser \ParserErrorsException ;
1717use PHPStan \Rules \Registry as RuleRegistry ;
18+ use function array_filter ;
1819use function array_keys ;
1920use function array_unique ;
2021use 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 ,
Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments