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

Bug #16960 False positive for late static binding in Squiz/ScopeKeywordSpacingSniff
Submitted: 2009-12-31 16:43 UTC
From: thezero Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version CVS)
PHP Version: 5.3.1 OS:
Roadmaps: (Not assigned)    
Subscription  
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:
MUST BE VALID
Solve the problem : 11 + 22 = ?

 
 [2009-12-31 16:43 UTC] thezero (Jakub Tománek)
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

Comments

 [2010-01-11 02:54 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.