阻止PhpStorm对齐关联数组 [英] Stop PhpStorm from aligning associative arrays
本文介绍了阻止PhpStorm对齐关联数组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当单击Cmd+Alt+L
重新格式化我的代码时,如何告诉PhpStorm(使用8.0.3版)保留以下数组:
How can I tell PhpStorm (using version 8.0.3) to keep the following array as is when clicking Cmd+Alt+L
to reformat my code:
$array = [
'short' => 1, // I want this...
'veryVeryVeryIncrediblyLong' => 123456789,
];
而不是这样做:
$array = [
'short' => 1, // Not this...
'veryVeryVeryIncrediblyLong' => 123456789,
];
推荐答案
设置(在Mac上为首选项)|编辑器代码样式| PHP |其他|数组声明样式->对齐键值对
这篇关于阻止PhpStorm对齐关联数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文