"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!
请先登录再写评论。
Hi Deric,
Please untick "Keep when reformatting | Line breaks" and try again
Cheers Andriy, that worked perfectly :)