Nowadays, your best option for unused PHP code is probably PHPStan extension called Dead Code Detector:
It can detect dead cycles, supports popular PHP libraries (like Symfony, Doctrine, PHPUnit, etc.) and can even remove the dead code by itself. You can customize it to your needs and use it in your CI.