1、函数方法类等花括号与声明在同一行

在setting -> editor -> code style -> PHP -> Wrapping and Braces -> Braces placement
In function declaration 选择End of line

phpStorm代码格式化tip

phpStorm代码格式化tip

数组保持分行(原样)

在setting -> editor -> code style -> PHP -> Wrapping and Braces -> Keep when reformatting
Line breaks 勾选后保持原有的断行,下图的数组格式化后不会变成一行
Comment at first column 勾选后注释行不缩进
Control statement in one line ?不知道
Simple methods in one line 简单的函数、方法变成一行

phpStorm代码格式化tip

phpStorm代码格式化tip

函数注释

phpStorm代码格式化tip

相关文章:

  • 2021-07-19
  • 2022-02-08
  • 2021-08-20
  • 2021-05-19
  • 2021-11-05
  • 2021-07-02
  • 2021-12-21
  • 2021-10-12
猜你喜欢
  • 2022-12-23
  • 2021-05-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-23
  • 2022-12-23
相关资源
相似解决方案