Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Request #16114 Find unused functions, methods, classes
Submitted: 2009-04-17 15:54 UTC
From: sebastian Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2009-04-17 15:54 UTC] sebastian (Sebastian Bergmann)
Description: ------------ Multi-File/Multi-Pass sniff that first collects a list of all declared functions and methods and then checks whether each is called at least once. A function/method that is not called should then be reported as an error.

Comments

 [2009-05-23 23:36 UTC] doconnor (Daniel O'Connor)
If you have any kind of code like: $foo->$bar(); Uh oh!
 [2009-05-26 16:22 UTC] sebastian (Sebastian Bergmann)
Just because we cannot cater to dynamic function/method invocation should not prevent us from implementing this.
 [2009-07-02 12:31 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: squiz
 [2011-04-07 11:55 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Open
 [2011-04-20 10:40 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
I'm closing this report because I'm not adding any new sniffs to PHPCS unless: - One gets contributed by someone - PEAR needs it because of a change to the standard - I happen to need it for something May as well not leave this request open when I'm not going to be able to get around to it due to other commitments. Thank you for your suggestion though. If anyone wants to contribute a sniff for this, please re-open this report.