RE: [PEAR-QA] amendment to CS for indentation
| From: | Lukas Smith | Date: | Thu, 25 Sep 2003 06:47:48 +0000 |
| Subject: | RE: [PEAR-QA] amendment to CS for indentation | ||
| References: | 1 | Groups: | php.pear.qa |
| Request: | Send a blank email to pear-qa+get-213@lists.php.net to get a copy of this message | ||
> From: Greg Beaver [mailto:greg@chiaraquartet.net]
> Sent: Thursday, September 25, 2003 5:45 AM
>
> can we amend the one true brace rule to the following based on code in
> PEAR?
>
> if there are no linebreaks, use:
>
> if (blah) {
> }
>
> if there are linebreaks, use:
>
> if (blah ||
> someotherstuff)
> {
> }
>
> This is the most commonly used solution in PEAR packages that I've
seen,
> and it seems reasonable. I think it would also be reasonable to
> recommend this rather than require it.
I brought this up a while ago and nobody agreed.
I use by the way
if (blah
|| someotherstuff
) {
...
}
this allows me to comment out all but the first condition easily
if (blah
# || someotherstuff
) {
...
}
regards,
Lukas