gpt4 book ai didi

php - 自动格式化/对齐数组 PhpStorm

转载 作者:行者123 更新时间:2023-12-05 08:54:58 28 4
gpt4 key购买 nike

我正在使用 Ubuntu。

如何告诉 PhpStorm 2017.3 在单击 Ctrl + Alt + Shift + L 重新格式化我的代码时保持以下数组不变:

<?php
return [

'page_not_found' => 'Page not Found',
'message_required' => 'Please enter your message',
];

对此

<?php
return [

'page_not_found' => 'Page not Found',
'message_required' => 'Please enter your message',
];

最佳答案

目前我正在回答有关 PHP 设置的问题(其他语言也类似。)

1) 打开PHP Storm

2) 转到设置

3) 找到editor tab > Code style > PHP

4) 现在您将找到选项 “Wrapping and braces”(第 3 个选项卡)

5) 现在在该选项卡的最后 3 个选项中,您将找到 Array Initializer(选择前 2 个选项。结帐屏幕截图)

screenshot

关于php - 自动格式化/对齐数组 PhpStorm,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47805578/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com