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

Bug #16855 Generic standard sniffs incorrectly for define() method
Submitted: 2009-11-30 23:08 UTC
From: viliceq Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.1)
PHP Version: 5.2.5 OS: Mac OS X 10.5
Roadmaps: (Not assigned)    
Subscription  


 [2009-11-30 23:08 UTC] viliceq (Tomas Rehor)
Description: ------------ When Generic standard sniffs for parameters of define() function usage, it is too greedy and includes also define() methods of objects which has nothing to do with the default define() function. Test script: --------------- public static function cache_define (Core_Cache $Cache) { $Cache->define('list', 'upcoming-payments-list') ->version(1); } Expected result: ---------------- Passes sniffing Actual result: -------------- Error: Constants must be uppercase; Expected 'LIST' got 'list'.

Comments

 [2009-12-01 03:55 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Closed -Assigned To: +Assigned To: squiz
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.