我对phpstorm代码重新格式化有一些问题。
我的代码中有长行和单行。
$this->getSelect()->join('some_code_here')->join('some_code_here')->join('some_code_here')->join('some_code_here')->join('some_code_here');
$this->getSelect()->join('some_code_here')->join('some_code_here');
我想配置设置:
代码风格/PHP/换行和括号/链式方法调用
这个设置有4种变体:
Do not wrap (1)
Wrap if long (2)
Crop down if long (3)
Wrap always (4)
当我选择2或3时,我获得以下内容:
$this->getSelect()->join('some_code_here')->join('some_code_here')->join('some_code_here')->join(
'some_code_here'
)->join('some_code_here');
$this->getSelect()->join('some_code_here')->join('some_code_here');
当我选择第四个时,我会得到:
$this->getSelect()
->join('some_code_here')
->join('some_code_here')
->join('some_code_here')
->join('some_code_here')
->join('some_code_here');
$this->getSelect()
->join('some_code_here')
->join('some_code_here');
我的问题是:
如果方法很长(超过120个字符),是否有可能在每次调用之间换行?
期望的结果:
$this->getSelect()
->join('some_code_here')
->join('some_code_here')
->join('some_code_here')
->join('some_code_here')
->join('some_code_here');
$this->getSelect()->join('some_code_here')->join('some_code_here');