0

I would like to have this indentation like Zend does on objects:

$this->getResponse()
     ->appendBody('Hello World');

But what I have now is:

$this->getResponse()
  ->appendBody('Hello World');

and I don't have any idea how I can do in this way. Thanks.

2 Answers 2

1

php-mode is a fairly primitive mode that doesn't quite get the semantics of PHP. It's based on cc-mode so you can tweak its indentation settings by tweaking cc-mode's settings. There is an overview of the settings here, but cc-mode has a lot more that you can play with. Take a look at this question as well.

Sign up to request clarification or add additional context in comments.

Comments

0

Recent releases of php-mode (available via MELPA) can do what you want; simply set php-lineup-cascaded-calls to t in your emacs configuration.

(setq php-lineup-cascaded-calls t)

Or use the customization interface M-x customize-group RET php RET.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.