[PEPr] Comment on RFC::Coding standard enhancements
| From: | Philippe Jausions | Date: | Fri, 07 Mar 2008 17:10:44 +0000 |
| Subject: | [PEPr] Comment on RFC::Coding standard enhancements | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49304@lists.php.net to get a copy of this message | ||
Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for RFC::Coding
standard enhancements.
Comment:
Good to update the CS for these oft-encountered long lines.
My comments by section:
- "Split function definitions onto several lines". Not a big fan of ) {
on the same line. I'd rather see the ) on the same line as the last
parameter, and leave the { on its own line.
- "Split long if statements onto several lines". For better readability
expressions in parentheses should be indented by 1 for each grouping. i.e.
(Note: I'm not sure how that'll look on the comment once posted though)
if (($condition1
|| $condition2) <-- indent 6 spaces here
&& ($condition3 <-- indent 5 spaces here
&& $condition4) <-- indent 9 spaces here
) { <-- indent 4 spaces here (?)
//code here
}
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=538
--
Sent by PEPr, the automatic proposal system at http://pear.php.net