how does it work with frameworks? f.e. Symfony? there are usually lots of unused framework's code in almost any project
Usually a middle ground works best. Run it once on just your files and look at the undeclared classes then add the files from the framework that define those so you get at least one level of checks of your calls into the framework. Or just feed it everything, but it can take some time to scan thousands of files and if you aren't using most of that code it gets annoying.