2016.3 Code Style doesn't work properly after updating from 2016.2 to 3

Answered

Hello!

After updating PhpStorm from 2016.2 to 3 the code style doesn't work properly for "Array declaration style" / "Align key-value pairs".
How could I setup it to work like before? Thank you in advance!

6 comments
Comment actions Permalink

Could you please provide a code sample?

0
Comment actions Permalink

$array = [
'a' => 1,
'b' => 2,
'c' => 3
];

After pressing Crtl + Alt + L I got all in one line.

"Align key-value pairs" is selected.

0
Avatar
Vladimir Luchansky
Comment actions Permalink

Please go to Settings\Preferences | Editor | Code Style | PHP > Wrapping and Braces and set "Array Initializer" to "Wrap Always", then check how Ctrl + Alt + L works.

1
Comment actions Permalink

Thank you for your answer. Which version of PhpStorm do you have? In 2016.3 there ist no "Wrap Always":

 

 




0
Comment actions Permalink

It's there:

(ignore that white text on light grey background nuance -- it's another issue, theme related)

1
Comment actions Permalink

I did not know that the text "Do not wrap" can be clicked :) 

Thank you very much!

1

Please sign in to leave a comment.