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

Bug #16453 function declaration long line splitted error
Submitted: 2009-07-19 02:53 UTC
From: farell Assigned: squiz
Status: Closed Package: PHP_CodeSniffer (version 1.2.0RC3)
PHP Version: 5.2.5 OS: Windows
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 : 45 - 31 = ?

 
 [2009-07-19 02:53 UTC] farell (Laurent Laville)
Description: ------------ With a script that have a long line function declaration splitted as follow I got an ERROR. I don't think I break a PEAR standard rule here. What's wrong ? PHP Version is not available in list : I used PHP5.2.9-2 Test script: --------------- function &singleton(&$application, $notifications, $password = '', $options = array() ) { Expected result: ---------------- No ERROR Actual result: -------------- ERROR | Opening parenthesis of a multi-line function call must be the | last content on the line

Comments

 [2009-07-19 04:22 UTC] squiz (Greg Sherwood)
-Status: Open +Status: Assigned -Assigned To: +Assigned To: squiz
I think your code is fine. This just looks like a bug in the function call sniff, where it is obviously seeing something in here that it thinks is a function call rather than a function definition.
 [2009-07-22 08:56 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
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.