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

Bug #19208 UpperCaseConstantName reports class members
Submitted: 2012-01-09 19:02 UTC
From: edorian Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.2)
PHP Version: 5.3.8 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2012-01-09 19:02 UTC] edorian (Volker Dusch)
Description: ------------ If a class has a member named null, true or false the constant sniff will report an issue as it thinks the reference to that member is a constant. F.e. $x->null = 6; will produce a warning. Thanks, edo Test script: --------------- foo.php: ------------------- <?php $x = new stdClass(); $x->null = 7; ------------------- phpcs --standard=Generic foo.php Expected result: ---------------- No error Actual result: -------------- 4 | ERROR | TRUE, FALSE and NULL must be uppercase; expected "NULL" but | | found "null"

Comments

 [2012-01-10 03:03 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
Fixed in git repo