1 Replies Last post: Feb 5, 2013 2:36 PM by Maxim Makhankov  
Stephan Krauß Novice 127 posts since
May 30, 2011
Currently Being Moderated

Feb 2, 2013 10:56 PM

code sniffer and public methods in classes

Hello!

 

I tested the code sniffer in PhpStorm.
The sniffer can find unused private methods in classes.

 

I work with Zend Framework 1.12.

 

If the sniffer public methods in the model are not
be called in the controller classes?

 

Sniffer can find models that are not called by the controllers?

 

Sorry for my bad english.

 

Sincerely yours

 

Stephan

Maxim Makhankov JetBrains 69 posts since
May 31, 2012
Currently Being Moderated
Feb 5, 2013 2:36 PM in response to: Stephan Krauß
Re: code sniffer and public methods in classes

Stephan, PhpStorm only provides an integration with PHP CodeSniffer, and phpcs makes a validation of code standards. See http://pear.php.net/package/PHP_CodeSniffer/redirected.

The inspection "unused private method" is detected by PhpStorm itself (without using phpcs).

To configure Inspection Settings, provided by IDE, go to Settings | Inspections or just use the search field in Settings.

Capture.PNG

Feel free to vote for the issue WI-1063 "Add Zend Framework support" and add in an comment to the ticket what Zend framework specific inspections you need.

More Like This

  • Retrieving data ...