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

Indent chained/static method call inside of function calls correctly

Open alanpearce opened this issue 12 years ago • 1 comments

PHP mode doesn't seem to want to indent a method call following a static method call inside a function call.

foo(db::baz()
->quux());

It's the same whether foo is a function, static function or method. The quux call is never indented.

Compared to outside a function call, which gets indented by one tab/indent-level:

db::baz()
    ->quux;

Or a method call following another method call, which gets aligned:

foo($db->baz()
       ->quux());

It would be great if this was made consistent with the behaviour outside of function calls. I hope that's clear. :)

alanpearce avatar Oct 09 '13 08:10 alanpearce

I definitely agree it would be great if PHP Mode were consistent about this. Thanks for bringing up the issue. I will try to address it for the upcoming release.

ejmr avatar Oct 09 '13 08:10 ejmr

It looks like this issue has already been resolved. Thank you.

zonuexe avatar Oct 27 '22 16:10 zonuexe