FAQ
Edit report at https://pear.php.net/bugs/bug.php?id=19208&edit=1

ID: 19208
Updated by: gsherwood@squiz.net
Reported By: php at wallbash dot com
Summary: UpperCaseConstantName reports class members
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Linux
Package Version: 1.3.2
PHP Version: 5.3.8
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
Fixed in git repo


Previous Comments:
------------------------------------------------------------------------

[2012-01-09 14:02:45] edorian

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"
------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 9, '12 at 9:02p
activeJan 9, '12 at 9:02p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase