Skip to content

Commit d3ae67d

Browse files
committed
Rename ignore to shouldIgnore
1 parent af7cb74 commit d3ae67d

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Analyser/AnalyserResultFinalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public function finalize(AnalyserResult $analyserResult, bool $onlyFiles, bool $
9595

9696
$tempCollectorErrors = array_filter($tempCollectorErrors, function (string $error) use ($scope, $node) : bool {
9797
foreach ($this->ignoreErrorExtensionProvider->getExtensions() as $ignoreErrorExtension) {
98-
if ($ignoreErrorExtension->ignore($error, $node, $scope)) {
98+
if ($ignoreErrorExtension->shouldIgnore($error, $node, $scope)) {
9999
return false;
100100
}
101101
}

src/Analyser/FileAnalyser.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public function analyseFile(
146146
$error = $this->ruleErrorTransformer->transform($ruleError, $scope, $nodeType, $node->getStartLine());
147147

148148
foreach ($this->ignoreErrorExtensionProvider->getExtensions() as $ignoreErrorExtension) {
149-
if ($ignoreErrorExtension->ignore($error, $node, $scope)) {
149+
if ($ignoreErrorExtension->shouldIgnore($error, $node, $scope)) {
150150
continue 2;
151151
}
152152
}
@@ -292,7 +292,7 @@ public function analyseFile(
292292

293293
$fileErrors = array_filter($fileErrors, function (Error $error) use ($scope) : bool {
294294
foreach ($this->ignoreErrorExtensionProvider->getExtensions() as $ignoreErrorExtension) {
295-
if ($ignoreErrorExtension->ignore($error, null, $scope)) {
295+
if ($ignoreErrorExtension->shouldIgnore($error, null, $scope)) {
296296
return false;
297297
}
298298
}

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 ignore(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)