This is what Collectors are great for - you can collect data when the whole project is analysed and then evaluate them in a single rule invoked at the end of the analysis.
Learn more: https://phpstan.org/developing-extensions/collectors
Some great community packages are implemented thanks to Collectors, like https://github.com/shipmonk-rnd/dead-code-detector.