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

ID: 19532
Updated by: gsherwood@squiz.net
Reported By: hinikato at mail dot ru
Summary: The PSR-2 standard don't recognize Null in class
names.
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Windows 7
Package Version: 1.3.5
PHP Version: 5.3.9
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: squiz
This was actually a bug in the generic upper and lowercase constant
sniffs. Fixed in
the github repo:
https://github.com/squizlabs/PHP_CodeSniffer/commit/d2b335091060995c6bcba2330
1f2f63e9f666ee3


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

[2012-07-28 12:19:21] hinikato

Description:
------------
The phpcs with --standard=PSR2 reports "TRUE, FALSE and NULL must be
lowercase; expected "null" but found" for classes that contains Null in
their names, for example the following lines will be reported as
invalid:

use Zend\Log\Writer\Null as NullWriter;
// or
new \Zend\Log\Writer\Null()


Test script:
---------------
use Zend\Log\Writer\Null as NullWriter;
// or
new \Zend\Log\Writer\Null()

Expected result:
----------------
No errors should be displayed.

Actual result:
--------------
FILE:
D:\system\home\project\myak2\src\test\Myak\Log\ConsoleLoggerTest.php
--------------------------------------------------------------------------------
FOUND 1 ERROR(S) AFFECTING 1 LINE(S)
--------------------------------------------------------------------------------
6 | ERROR | TRUE, FALSE and NULL must be lowercase; expected "null" but
found
"Null"
--------------------------------------------------------------------------------

------------------------------------------------------------------------

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedAug 6, '12 at 1:03a
activeAug 6, '12 at 1:03a
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase