F
F
Fastto2012-04-11 11:27:45
PHP
Fastto, 2012-04-11 11:27:45

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

3 answer(s)
C
CrazySquirrel, 2012-04-11
@CrazySquirrel

Look for xdebug, code coverage, dead code. It knows how to do it.

C
CrazySquirrel, 2012-04-11
@CrazySquirrel

2 and 3 are special options for xdebug that allow you to search for unused code.

V
Vyacheslav Plisko, 2012-04-11
@AmdY

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 question

Ask a Question

731 491 924 answers to any question