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 e90df6d commit f64a1c7Copy full SHA for f64a1c7
src/utils/CommentMatcher.php
@@ -16,11 +16,17 @@ final class CommentMatcher
16
*/
17
public static function matchComments(Node $node, string $pattern): iterable
18
{
19
+ if (
20
+ $node instanceof Node\Stmt\InlineHTML
21
+ || $node instanceof \PHPStan\Node\CollectedDataNode // see https://github.com/phpstan/phpstan/discussions/11701
22
+ ) {
23
+ // prevent unnecessary work / reduce memory consumption
24
+ return [];
25
+ }
26
+
27
if (
28
$node instanceof VirtualNode
29
|| $node instanceof Node\Expr
- || $node instanceof Node\Stmt\InlineHTML
- || $node instanceof \PHPStan\Node\CollectedDataNode // see https://github.com/phpstan/phpstan/discussions/11701
30
) {
31
// prevent duplicate errors
32
return [];
0 commit comments