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?

 

this  

should become this

but it's becoming this

 

 

Here are my wrapping and braces settings:



 

Thanks

 

 

4 comments

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.

0

Hi Eugene,

thanks for your help!

 

https://www.dropbox.com/s/1a9k40987i47uzw/Test.zip?dl=0 

Here is a testproject and the codestyle settings to import.

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

 

 

0

++Push++

No ideas how to manage this?

0

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: https://youtrack.jetbrains.com/issue/WI-6966
https://youtrack.jetbrains.com/issue/WI-30324
Please vote.

0

Please sign in to leave a comment.