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

Bug #10757 Error in ControlSignatureSniff
Submitted: 2007-04-17 16:38 UTC
From: temp Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 0.5.0)
PHP Version: 5.2.1 OS: Linux
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 : 24 - 9 = ?

 
 [2007-04-17 16:38 UTC] temp (Stephan Wentz)
Description: ------------ Code like this: foreach($db->query($sql, PDO::FETCH_ASSOC) as $row) produces an Error in a ControlSignatureSniff error: Expected "foreach (...)\r\n"; found "foreach((...)\r\n" The getPatterns()-method contains this: "foreach (...)\r\n", Test script: --------------- foreach($db->query($sql, PDO::FETCH_ASSOC) as $row) {} Expected result: ---------------- No error ;-) Actual result: -------------- Expected "foreach (...)\r\n"; found "foreach((...)\r\n"

Comments

 [2007-04-17 16:43 UTC] temp (Stephan Wentz)
Gee, not actual a bug - I was confused by ((... why is this displayed? The actual error was on my side, there was no space...
 [2007-04-17 22:18 UTC] squiz (Greg Sherwood)
I think we can still call this a bug with the error message itself. I'll have a look into fixing it.
 [2007-04-23 04:02 UTC] squiz (Greg Sherwood)
This bug has been fixed in CVS. 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. New error message for this code is: Expected "foreach (...) {\n"; found "foreach(...) {}"