Skip to content

Commit

Permalink
Fix exhaustive memory consumption
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Sep 16, 2024
1 parent 6822306 commit 629c0e3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/TodoByTicketCollector.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,12 @@ public function processNode(Node $node, Scope $scope)
}
}

return $tickets;
// don't return empty array so we don't pollute the result cache
// see https://github.com/phpstan/phpstan/discussions/11701#discussioncomment-10660711
if ($tickets !== []) {
return $tickets;
}
return null;
}

private function createPattern(): string
Expand Down

0 comments on commit 629c0e3

Please sign in to comment.