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!

0
6 comments

Could you please provide a code sample?

0
Avatar
Permanently deleted user

$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
Permanently deleted user

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
Avatar
Permanently deleted user

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

 

 




0

It's there:

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

1
Avatar
Permanently deleted user

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.