What is the question itself, since I mainly work with C #, I got used to Sharp formatting, and the formatting that PhpStorm does not quite suit me, of course, I went through the settings and configured the formatting to the maximum β€œas needed”, but one moment I or missed it or not there. General code snippet

if($i == 0) { while (true) { ... } } 

I’m not satisfied with the automatic formatting of curly braces {in particular, the opening ones, I want the bracket to open on a new line, in short, like this

 if($i == 0) { while (true) { ... } } 

for me it is more convenient and more familiar, and if there is a way to do this in PhpStorm, it will be good, but I repeat, I did not find such an opportunity.

    2 answers 2

    File β†’ Settings β†’

    Editor β†’ Code Style β†’ PHP β†’

    Wrapping and Braces β†’ Braces Placement β†’ Other β†’ Next line


    enter image description here

    • Yes that's it. As I myself did not notice) Thank - pavver
    • Not surprising. Jetbrains has a very broad interface and it’s hard to find anything there. - user194374

    Everything is configured here:

    enter image description here

    File β†’ Settings β†’ Editor β†’ CodeStyle β†’ PHP

    Specifically, brackets on the Wrapping and Braces

    • It is precisely the function I need there, and in general there are basically functions for parentheses "(" and not for curly "{", the parenthesis can be configured so that it behaves as I need it to be curly ........ - pavver
    • @pavver I mean no? Have you looked at the entire Wrapping and Braces tab? - Alexey Shimansky
    • @pavver kff wrote the same thing ...... however hello ...%) - Alexey Shimansky
    • kff pointed out exactly here the point that I unfortunately did not notice myself Wrapping and Braces β†’ Other β†’ Next line - pavver