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

Bug #20309 Use "member variable" term in sniff "processMemberVar" method
Submitted: 2014-06-23 18:53 UTC
From: aik099 Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.5.3)
PHP Version: 5.4.20 OS:
Roadmaps: (Not assigned)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 15 - 4 = ?

 
 [2014-06-23 18:53 UTC] aik099 (Alexander Obuhovich)
Description: ------------ Currently sniffs, that extend "PHP_CodeSniffer_Standards_AbstractVariableSniff" class and have non-empty "processMemberVar" method use both "member variable" and "variable" terms in error messages. I think this is confusing and in case, when error is reported for public class member variable we should write exactly "Public member variable" instead of just "variable". Without this it's hard to distinguish (just from error message) if an error is in class variable or just in a regular variable.

Comments

 [2014-06-24 06:22 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
I fixed a couple of camel case error messages here: https://github.com/squizlabs/PHP_CodeSniffer/commit/cad80e01036789ffc6120f606 2c2081216618d3c The other sniff that uses the word "variable" is the commenting one (Standards/Squiz/Sniffs/Commenting/VariableCommentSniff.php) but I'm not changing commenting sniffs because I've rewritten the way they all work in the 2.x version. But I have changed the error messages in the 2.x version here: https://github.com/squizlabs/PHP_CodeSniffer/commit/1bbcdfa64e6b72224d6c0e02 6c2a9be43ec25806