Skip to content

Commit 0133cfa

Browse files
authored
Ignore Name and Identifier nodes to reduce memory consumption (#108)
1 parent f64a1c7 commit 0133cfa

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/utils/CommentMatcher.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public static function matchComments(Node $node, string $pattern): iterable
1818
{
1919
if (
2020
$node instanceof Node\Stmt\InlineHTML
21+
|| $node instanceof Node\Name
22+
|| $node instanceof Node\Identifier
2123
|| $node instanceof \PHPStan\Node\CollectedDataNode // see https://github.com/phpstan/phpstan/discussions/11701
2224
) {
2325
// prevent unnecessary work / reduce memory consumption

0 commit comments

Comments
 (0)