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

Bug #20044 PSR1 camelCase check does not ignore leading underscores
Submitted: 2013-08-19 22:06 UTC Modified: 2013-09-25 01:26 UTC
From: bibumathew Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.4.6)
PHP Version: 5.3.27 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  


 [2013-08-19 22:06 UTC] bibumathew (bibu mathew)
Description: ------------ PSR-1’s requirement for camelCase doesn’t preclude methods from starting with one underscores as long as the words that follow this prefix are camelCase and not snake_case. But code sniffer tool will raise error for functions that start with single underscores "Generic.NamingConventions.CamelCapsFunctionName.ScopeNotCamelCaps " code sniffer doesn’t have the proper exceptions needed to conform with PSR-1.

Comments

 [2013-08-20 04:38 UTC] squiz (Greg Sherwood)
-Summary: PSR1 camelCase +Summary: PSR1 camelCase check does not ignore leading underscores
 [2013-08-20 04:42 UTC] squiz (Greg Sherwood)
-Assigned To: +Assigned To: squiz
Fixed committed to github repo: https://github.com/squizlabs/PHP_CodeSniffer/commit/dfccab1abd59c0d9166201601a a1ff6f02991490 Also stops function names outside of classes being checked at all. PSR1 only mentions "methods" under the "Classes" heading.
 [2013-09-25 01:26 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed