phpstormphpstorm-2017.1

PhpStorm wrap traits


In PhpStorm, how would I make traits wrap? Under Editor | Code Style | PHP -> Wrapping and Braces there is no option to wrap traits.

I want to wrap my traits like so:

class Foo {

    use Concerns\SomeTrait,
        Concerns\AnotherTrait;

}

But PhpStorm automatically turns them into a oneliner:

class Foo {

    use Concerns\SomeTrait, Concerns\AnotherTrait;

}

Does any one know where this can be changed?


Solution

  • Go to settings/Editor/Code Style/PHP and check the option to keep line breaks when formatting:

    enter image description here