"Code Style -> PHP" and brace placement

Hello all, I apologize if this is already known or if I'm just slow, but PhpStorm is giving me problems when I do code formatting with the "else" brace placement.  I'm attaching a screenshot showing my Php Code Style settings and another screen shot showing the problem that is occurring, and hopefully one of you can help me clear up if I have something set wrong!

What I'm guessing is happening is that it's looking at my preference for having 'else' on a new line, and also putting the else brace on a new line, instead of putting the else brace at the end of the line it's on.  Ideally what I would prefer is the following:

if (something) {
     ...
}
elseif (something_else) {
     ...
}
elseif (something_else2) {
     ...
}
...

Thanks for your help!

2 comments
Comment actions Permalink

Hi Deric,

Please untick "Keep when reformatting | Line breaks" and try again

0
Comment actions Permalink

Cheers Andriy, that worked perfectly :)

0

Please sign in to leave a comment.