Answer the question
In order to leave comments, you need to log in
Finding unused class methods in a php project
An ancient project fell into the hands, it became necessary to find static methods of library classes that were not used in the project. I installed phpStorm on the
advice from here , it perfectly found unused constants, fields, variables, but did not find what I needed.
Please tell me the right tool!
Answer the question
In order to leave comments, you need to log in
Look for xdebug, code coverage, dead code. It knows how to do it.
2 and 3 are special options for xdebug that allow you to search for unused code.
The task is almost impossible, given the specifics of the language and calls to call_user_function *
In netbeans and other IDEs there is a "search for use" (when right-clicking on a method), but right now I am editing my validation class and it does not find anything, so the methods are called through this-> {'_'. $v['name']}();
So I advise you to use the golden rule: if it works, don't touch it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question