Feature #1495
Sniff: Operators have to be at beginning of line in multiline conditions
| Status: | Accepted | Start: | 2008-09-10 | |
| Priority: | Could have | Due date: | ||
| Assigned to: | Tim Eilers | % Done: | 0% |
|
| Category: | Check-Type: Sniff | |||
| Target version: | 1.0 | |||
Description
When using multiline conditions it should be like this:
if (weHaveALotOfCriteria()
&& notEverythingFitsIntoOneLine()
|| youJustTendToLikeIt()) {
doThis();
} else {
...
}
not like this
if (weHaveALotOfCriteria() &&
notEverythingFitsIntoOneLine() ||
youJustTendToLikeIt()) {
doThis();
} else {
...
}