Code style, if/while/etc braces on a new line?

I've been searching through and through but I can't seem to find an option for automatic code-styling to place curly braces of a control statement on a new line

currently it is formatting like this:

class Foo
{
     public function Foo()
     {
          if( thisresultstotrue() ) {
               perfformActionTrue();
          }
          else {
               performactionFalse();
          }
     }
}

However our coding style looks like this:

class Foo
{
     public function Foo()
     {
          if( thisresultstotrue() )
          {
               perfformActionTrue();
          }
          else
          {
               performactionFalse();
          }
     }
}



Any clue on how to change this?
2 comments
Comment actions Permalink

Hi Daan,

Please try Settings | Code Style | PHP | Wrapping and Braces | Braces placement | Other --> Next line

1
Comment actions Permalink

I had totally missed that one, thought it said "end of file" instead of "end of line" so I thought "this can't be the right option, skip it".

Thanks!

1

Please sign in to leave a comment.