我需要像这样正确缩进这些代码块:
$this->render('rights', array(
'admin' => $admin,
'editor' => $editor,
'author' => $author,
));
和小部件片段:
<?php $this->widget('zii.widgets.CMenu', array(
'items' => array(
array('label' => 'label', 'url' => 'url')
)
)); ?>
使用默认的 PHPStorm 设置,它会像这样缩进这段代码:
$this->render('rights', array(
'admin' => $admin,
'editor' => $editor,
'author' => $author,
));
我去了 Settings->Code Style->Wrapping and Braces 并更改了以下选项:
- 数组初始值设定项 -> 多个时对齐(取消选中)
- 方法调用参数 -> 多个时对齐(取消选中)
结果是:
$this->render('rights', array(
'admin' => $admin,
'editor' => $editor,
'author' => $author,
));
仍然不是我想要的风格,但这就是我设法完成的全部。您能否指出我需要更改的选项?