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

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)    

 [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.


 [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." ( 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)