php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

Indentation for control structure

Open tommas1988 opened this issue 11 years ago • 1 comments

I have indentation problem with long if statements using pear coding style expected indentation:

if (($condition1
    || $condition2)
    && $condition3
    && $condition4
) {
    //code here
}

reality is:

if (($condition1
|| $condition2)
&& $condition3
&& $condition4
) {
    //code here
}

Is that a bug?

tommas1988 avatar Feb 11 '14 08:02 tommas1988

The style is meant to conform to the PEAR coding style standards, so yes, they way PHP Mode indents that is an error. Thank you for the bug report. I have not much time lately for PHP Mode so I apologize in advanced if this takes a while to correct, but since there are other indentation bugs still unfixed I will try to get them (including this one) as soon as I can.

ejmr avatar Feb 11 '14 21:02 ejmr