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

ID: 16855
Updated by: gsherwood@squiz.net
Reported By: tomas at rehor dot name
Summary: Generic standard sniffs incorrectly for define()
method
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Operating System: Mac OS X 10.5
Package Version: 1.2.1
PHP Version: 5.2.5
-Assigned To:
+Assigned To: squiz
Roadmap Versions:
New Comment:

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




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

[2009-11-30 18:08:05] viliceq

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'.

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedNov 30, '09 at 9:56p
activeNov 30, '09 at 9:56p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase