Re: [PEPr] Comment on RFC::Coding standard enhancements

From: Date: Fri, 07 Mar 2008 17:17:48 +0000
Subject: Re: [PEPr] Comment on RFC::Coding standard enhancements
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49306@lists.php.net to get a copy of this message
Philippe Jausions wrote: > Philippe Jausions (http://pear.php.net/user/jausions) has commented on the proposal for > RFC::Coding standard enhancements. > > Comment: > > - "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 > } My count was wrong, but you get the idea if (($condition1 || $condition2) <-- indent 5 && ($condition3 <-- indent 4 || $condition4) <-- indent 8 ) { <-- indent 3 to align with "(" or 0 (?) // code here <-- indent 4 } > > Proposal information: > http://pear.php.net/pepr/pepr-proposal-show.php?id=538 >

« previous php.pear.dev (#49306) next »