简体   繁体   English

PhpStorm - 同一行上的括号格式

[英]PhpStorm - parenthesis formatting on the same line

How to configure PhpStorm to place parenthesis on the same line when formatting is triggered ( Ctrl + Alt + L )?如何配置 PhpStorm 在触发格式化时将括号放在同一行( Ctrl + Alt + L )? It currently formats in this way:它目前以这种方式格式化:

function()
{

}

and I want it to format like that我希望它像这样格式化

function() {

}
  1. Settings/Preferences
  2. Editor | Code Style | PHP | Wrapping and Braces
  3. Braces placement | In function declaration = End of line
  1. Settings/Preferences设置/首选项
  2. Editor |编辑 | Code Style |代码风格 | PHP | PHP | Braces Placement大括号放置
  3. In function declaration = End of line在函数声明中 = 行尾
  4. Place braces for empty functions/methods on one line将空函数/方法的大括号放在一行上

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM