diff --git a/src/TodoByTicketCollector.php b/src/TodoByTicketCollector.php index 3a43dab..7e7c275 100644 --- a/src/TodoByTicketCollector.php +++ b/src/TodoByTicketCollector.php @@ -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