Php code indentation Follow
I need these chunks of code to be indented properly like this:
$this->render('rights', array( 'admin' => $admin, 'editor' => $editor, 'author' => $author, ));
and widget snippet:
<?php $this->widget('zii.widgets.CMenu', array( 'items' => array( array('label' => 'label', 'url' => 'url') ) )); ?>
With default settings PHPStorm indents this code like this:
$this->render('rights', array( 'admin' => $admin, 'editor' => $editor, 'author' => $author, ));
I went to Settings->Code Style->Wrapping and Braces and changed following options:
- Array initializer -> Align when multiple (uncheck)
- Method call arguments -> Align when multiple (uncheck)
The result is:
$this->render('rights', array( 'admin' => $admin, 'editor' => $editor, 'author' => $author, ));
Still not the style I want, but that's all I managed to accomplish. Can you please point me to the option I need to change? Thanks in advance.
Please sign in to leave a comment.
It's a bug in formatter: http://youtrack.jetbrains.net/issue/WI-5791?projectKey=WI
And no fix for 2 months. :(