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 15
15
use PHPStan \Parser \Parser ;
16
16
use PHPStan \Parser \ParserErrorsException ;
17
17
use PHPStan \Rules \Registry as RuleRegistry ;
18
+ use function array_filter ;
18
19
use function array_keys ;
19
20
use function array_unique ;
20
21
use function array_values ;
@@ -292,21 +293,6 @@ public function analyseFile(
292
293
unset($ unmatchedLineIgnores [$ fileKey ]);
293
294
}
294
295
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
-
310
296
return new FileAnalyserResult (
311
297
$ fileErrors ,
312
298
$ this ->filteredPhpErrors ,
Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ interface IgnoreErrorExtension
27
27
28
28
public const EXTENSION_TAG = 'phpstan.ignoreErrorExtension ' ;
29
29
30
- public function shouldIgnore (Error $ error , ? Node $ node , Scope $ scope ): bool ;
30
+ public function shouldIgnore (Error $ error , Node $ node , Scope $ scope ): bool ;
31
31
32
32
}
You can’t perform that action at this time.
0 commit comments