PHPStorm - 使用代码样式强制 array() 字符串声明
PHPStorm - Force array() String Declaration With Code Style
在 PHPStorm 中,您可以在设置的 "Code Style" 部分强制将数组声明为 []
。
有没有办法做相反的事情并强制用 array()
声明数组?例如,我想要以下内容:
$myArray = ['one', 'two'];
成为
$myArray = array('one', 'two');
当我使用编辑器重新格式化脚本时。
有一个意图:
遗憾的是,无法在 "reformat code" 上自动执行。
在 PHPStorm 中,您可以在设置的 "Code Style" 部分强制将数组声明为 []
。
有没有办法做相反的事情并强制用 array()
声明数组?例如,我想要以下内容:
$myArray = ['one', 'two'];
成为
$myArray = array('one', 'two');
当我使用编辑器重新格式化脚本时。
有一个意图:
遗憾的是,无法在 "reformat code" 上自动执行。