Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#75 Array and fluent interfaces fails

php-mode-1.5.0
open
nobody
Indentation (6)
5
2009-12-08
2009-12-08
Anonymous
No

Indentation fails to follow PEAR coding standards:

arrays are indented using relative position of opening bracket
instead of indenting of +4 spaces, thus leading to exceed the
80 characters limit pretty fast.

Actual behaviour:
$longNameForPointLessArray = array(
0 => null,
1 => array(
0 => null
)
);

Expected behaviour:
$longNameForPointLessArray = array(
0 => null,
1 => array(
0 => null
)
);

When function arguments are spanned across multiple lines they seem
to suffer from the very same issue.

A similar issue is present when using fluent interfaces spanned
over multiple lines. The arrow operators should be aligned in
a row.

Actual behaviour:
$aObject = new Class();
$aObject->aMethod()
->anotherMethod()
->anotherMethod();

Expected behaviour:
$aObject = new Class();
$aObject->aMethod()
->anotherMethod()
->anotherMethod();

Discussion