Menu

#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


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.