PhpStorm - 防止数组括号对齐

标签 php phpstorm

PhpStorm 正在对齐数组中的括号。

DB::table('something')->create([
                                   'title' => 'John',
                                   'description' => 'Doe',
                               ]); // I don't want to align it this way...


DB::table('something')->create([
    'title' => 'John',
    'description' => 'Doe',
]); // But this way...

我在哪里更改此在 Settings/Preferences > Editor > Code Style > PHP ?

最佳答案

终于想通了!

转到首选项 > 编辑器 > 代码样式 > PHP > 环绕和大括号。取消勾选 Align when multilineFunction call arguments .

PhpStorm Preferences Screenshot

关于PhpStorm - 防止数组括号对齐,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38026985/

相关文章:

PhpStorm 忽略重新格式化时生成的代码

javascript - 删除javascript中的文本输入

php - 在 Sphinx 搜索中合并多个精确查询结果

JetBrains IDE : type-hinting the autonomous custom element instance 上的 Javascript

mysql - 如何为PhpStorm配置MySQL数据源?

phpstorm - phpstorm 黄色高亮代码 - 如何删除它?

php - Laravel 5.4 在 Markdown Mailable 中错误地混合了 HTML 组件

php - 在 MySQL 和 PHP 中创建好友关系

php - 使用 PHP 进行与环境无关的 301/302 重定向

javascript - PhpStorm调试器: How to ignore webpack dev server served script (node_modules)