Search code examples
phpideeditorphpstorm

phpstorm next-line braces


I recently started using PHPStorm. Now I have a simple question but I cant find the answer.

So, I want that the braces of funtions, classes etc. go automatically in the next line, like:

function xyz(){  
}  

will be

function xyz()  
{  
}  

without pressing CTRL + ALT + L all the time. Is there a way to do it?
I appreciate any answers.


Solution

  • You probably want the setting (this is the way to get there on OSX at least):

    • Preferences > Editor > Code Style > PHP
      • Tab: Wrapping and Braces
      • Braces placement
        • Other: Next line