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

Request #11562 space after opening paranthesis (
Submitted: 2007-07-08 04:29 UTC Modified: 2007-07-11 18:05 UTC
From: cweiske Assigned: squiz
Status: Bogus Package: PHP_CodeSniffer (version 0.7.0)
PHP Version: Irrelevant OS:
Roadmaps: (Not assigned)    
Subscription  


 [2007-07-08 04: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 04: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 18:05 UTC] squiz (Greg Sherwood)
Closing