【问题标题】:PhpStorm – Prevent array brackets aligningPhpStorm - 防止数组括号对齐
【发布时间】:2016-06-25 09:31:06
【问题描述】:

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 phpstorm


    【解决方案1】:

    终于想通了!

    转到首选项 > 编辑器 > 代码样式 > PHP > 包装和大括号。取消选中Function call arguments下的Align when multiline

    【讨论】:

    • 非常感谢我找到了这个。我自己搜索了一段时间,但没有将函数调用参数与数组相关联。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2021-10-05
    • 2016-08-26
    • 2016-11-16
    • 1970-01-01
    • 2011-03-06
    • 1970-01-01
    • 2016-09-03
    相关资源
    最近更新 更多