Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.6.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)    
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:
Solve the problem : 20 - 3 = ?

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


 [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: 1f2f63e9f666ee3