We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a0d727a commit 880ffbcCopy full SHA for 880ffbc
src/Parser/RichParser.php
@@ -12,6 +12,7 @@
12
use PHPStan\ShouldNotHappenException;
13
use function array_filter;
14
use function is_string;
15
+use function str_contains;
16
use function strpos;
17
use function substr;
18
use function substr_count;
@@ -112,9 +113,9 @@ private function getLinesToIgnore(array $tokens): array
112
113
$this->getLinesToIgnoreForTokenByIgnoreComment($text, $line, '@phpstan-ignore-line');
114
115
} else {
- if (strpos($text, '@phpstan-ignore-next-line') !== false) {
116
+ if (str_contains($text, '@phpstan-ignore-next-line')) {
117
$line++;
- } elseif (strpos($text, '@phpstan-ignore-line') === false) {
118
+ } elseif (!str_contains($text, '@phpstan-ignore-line')) {
119
continue;
120
}
121
0 commit comments