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

ID: 16960
Updated by: gsherwood@squiz.net
Reported By: thezero at jyxo dot com
Summary: False positive for late static binding in
Squiz/ScopeKeywordSpacingSniff
-Status: Open
+Status: Closed
Type: Bug
Package: PHP_CodeSniffer
Package Version: CVS
PHP Version: 5.3.1
-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-12-31 11:43:09] thezero

Description:
------------
When using static keyword for calling a method using late static
binding, it is recongized as scope modifier.

Patch:
// PHP 5.3 late static binding
if (T_STATIC === $tokens[$stackPtr]['code'] && T_DOUBLE_COLON
=== $nextToken['code']) {
return;
}

Test script:
---------------
<?php
class Foo
{
public static function output()
{
static::bar();
}
}


Expected result:
----------------
FOUND 0 ERROR(S) AND 0 WARNING(S) AFFECTING 0 LINE(S) IN TOTAL

Actual result:
--------------
FOUND 1 ERROR(S) AND 0 WARNING(S) AFFECTING 1 LINE(S)
6 | ERROR | Scope keyword "static" must be followed by a single space

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

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouppear-bugs @
categoriesphp
postedJan 10, '10 at 9:55p
activeJan 10, '10 at 9:55p
posts1
users1
websitepear.php.net

1 user in discussion

Gsherwood: 1 post

People

Translate

site design / logo © 2022 Grokbase