Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0e42081

Browse files
clxmstaabondrejmirtes
authored andcommitted
faster IgnoredError->shouldIgnore()
1 parent 0f6245b commit 0e42081

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

‎src/Analyser/IgnoredError.php‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,11 @@ public static function shouldIgnore(
5454
$ignoredErrorPattern = str_replace([preg_quote('\r\n'), preg_quote('\r')], preg_quote('\n'), $ignoredErrorPattern);
5555

5656
if ($path !== null) {
57-
$fileExcluder = new FileExcluder($fileHelper, [$path], []);
58-
5957
if (\Nette\Utils\Strings::match($errorMessage, $ignoredErrorPattern) === null) {
6058
return false;
6159
}
6260

61+
$fileExcluder = new FileExcluder($fileHelper, [$path], []);
6362
$isExcluded = $fileExcluder->isExcludedFromAnalysing($error->getFilePath());
6463
if (!$isExcluded && $error->getTraitFilePath() !== null) {
6564
return $fileExcluder->isExcludedFromAnalysing($error->getTraitFilePath());

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /