Skip to content

Commit

Permalink
Ignore Name and Identifier nodes to reduce memory consumption (#108)
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm authored Sep 16, 2024
1 parent f64a1c7 commit 0133cfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/CommentMatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public static function matchComments(Node $node, string $pattern): iterable
{
if (
$node instanceof Node\Stmt\InlineHTML
|| $node instanceof Node\Name
|| $node instanceof Node\Identifier
|| $node instanceof \PHPStan\Node\CollectedDataNode // see https://github.com/phpstan/phpstan/discussions/11701
) {
// prevent unnecessary work / reduce memory consumption
Expand Down

0 comments on commit 0133cfa

Please sign in to comment.