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

Bug #19532 The PSR-2 standard don't recognize Null in class names.
Submitted: 2012-07-28 16:19 UTC
From: hinikato Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.3.5)
PHP Version: 5.3.9 OS: Windows 7
Roadmaps: (Not assigned)    
Subscription  


 [2012-07-28 16:19 UTC] hinikato (Hinikato Dubrai)
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" --------------------------------------------------------------------------------

Comments

 [2012-08-06 07:10 UTC] squiz (Greg Sherwood)
-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