phpstorm - 如何在PhpStorm中的变量和运算符之间留出空间?

标签 phpstorm reformat

我使用的是Mac和Windows,但是代码重新格式化在Mac和Windows上的工作方式有所不同。

在Mac上

return response()->json([
    'access_token' => $jwtToken,
    'token_type'   => 'bearer',
    'expires_in'   => Auth::guard()->factory()->getTTL() * 60
]);

在Windows上
return response()->json([
    'access_token' => $jwtToken,
    'token_type' => 'bearer',
    'expires_in' => Auth::guard()->factory()->getTTL() * 60
]);

我想像在Mac上一样重新格式化代码。

如何调整代码重新格式化规则?

最佳答案

设置->编辑器->代码样式-> PHP->包装和花括号->数组初始化->对齐键值对

enter image description here

关于phpstorm - 如何在PhpStorm中的变量和运算符之间留出空间?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59517044/

相关文章:

macos - Intellij-idea:字母键的自动重复

sql - 使用 Access + Subquery 重新格式化数据

vim - vim如何重新格式化`gq`以避免触及TeX逐字记录部分?

PhpStorm 不识别类别名

php - 如何告诉 PhpStorm 定义了某个变量

macos - PhpStorm 8.0.2 总是要求允许传入的网络连接

angular - 如何在 PhpStorm/WebStorm 中调试 angular2 种子项目?

algorithm - 极坐标 -> 笛卡尔转换的快速算法

python-3.x - 如何重新格式化 CSV 中的日期以仅显示 MM/YYYY

intellij-idea - IntelliJ IDEA 12保持空白行