I didn’t find any Coding style guide to answer my question. I have a simple IF with nested braces and several logic operators. How should I indent this:
if (
!$var
|| (
$this->var != $this->needed_var()
&& !$this->another_func()
&& !$this->another_func_two()
)
) {
// My code...
}
I find it uggly… Any help ?
I would suggest the Zend Framework Coding Standards. They cover this particular case under “Control Statements” as follows: