Editor formatting on if statements

Hi Community

So I know, it's probably a stupid question :-)
But i was playing around with the editor options and somehow I've changed the following behaviour:

When I'm directly in a PHP File and write if () { -> then press enter, the ending braclett is placed on the first position of the new line.
So this means that no indent or space is respectet, and I want to change this back.

Behaviour now:

    protected $marginRight = 15;        

      if () {
           if () {
 
}
}

    public function __construct(){}


What i want:

    protected $marginRight = 15;        

     if () {
          if () {

          }
     }

    public function __construct(){}

Does anybody has an idea?

Thanks and regards!
D

1 comment
Comment actions Permalink

Hi there,

1) "Settings (Preferences on Mac) | Code Style" -- please choose Default one and try reproducing it

2) Is this is a PURE php file (i.e. it starts with <?php and has no HTML parts? Please attach an example of such file (not copy-paste into reply .. but attach actual file).

0

Please sign in to leave a comment.