Code Style - Brace placement in if-statements

Hi guys,


could you give me advice how i can manage my closing brace after an IF-Statement to keep on line ending, instead of new line?



should become this

but it's becoming this



Here are my wrapping and braces settings:





Comment actions Permalink

Hi Patrick,

Could you please create a sample project with the same settings and share it?
I've clicked the checkboxes for 20 minutes, but it still doesn't behave the same way as on the screenshots.

Comment actions Permalink

Hi Eugene,

thanks for your help! 

Here is a testproject and the codestyle settings to import.

If you remove the wrapping and then do autoformat it will wrap again



Comment actions Permalink


No ideas how to manage this?

Comment actions Permalink

Thank you, Patrick. It seems that there's no way to force PhpStorm to do so -  if you 'Binary Expressions' to anything apart from 'Do not wrap', it places the closing parenthesis to a new line.
Here are two feature requests on this matter:
Please vote.


Please sign in to leave a comment.