Oshan Rube
Oshan Rube

Reputation: 259

Phpstorm codestyle's put new newlines

how can i define PhpStorm code styling to put new lines for eg

if($foo == 'bar') {
    //do this
}

to be

if($foo == 'bar')
{
    //do this
}

i remember this being in earlier version but i cant find it in 7.1 please help

Upvotes: 0

Views: 91

Answers (2)

Luís Cruz
Luís Cruz

Reputation: 14980

You can accomplish that by going into Settings » [Project settings] » Code Style » PHP. Next, select tab "Wrapping and Braces" and at the top you will see the group "Braces placement".

In this group you could set "Other" to "Next line"

Upvotes: 1

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111899

You should go to Settings -> Code style -> PHP ->Wrapping and Braces, then expand Braces placement and for Other you should choose Next line

Upvotes: 1

Related Questions