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

Request #11562 space after opening paranthesis (
Submitted: 2007-07-08 09:29 UTC
From: cweiske Assigned: squiz
Status: Bogus Package: PHP_CodeSniffer (version 0.7.0)
PHP Version: Irrelevant 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 : 32 - 11 = ?

 
 [2007-07-08 09:29 UTC] cweiske (Christian Weiske)
Description: ------------ When having nested function calls, you often distribute the parameters on a line of its own as in: return str_replace( array('@', '.'), array(' ^at^ ', '-dot-'), $this->text ); PHPCS does not allow this, although it is required to keep the line length below 85.

Comments

 [2007-07-08 09:43 UTC] squiz (Greg Sherwood)
PHPCS is following the PEAR coding standard, which reads: "Functions should be called with no spaces between the function name, the opening parenthesis, and the first parameter; spaces between commas and each parameter, and no space between the last parameter, the closing parenthesis, and the semicolon." (http://pear.php.net/manual/en/standards.funcalls.php) If PEAR change their CS, I'll change the sniff that checks for this rule. PEAR does not list any exceptions to this rule. Note that this standard is very clear, unlike the function declaration standard, which does not dictate that function params must be defined in a particular way.
 [2007-07-11 23:05 UTC] squiz (Greg Sherwood)
Closing