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!
Please sign in to leave a comment.
Could you please provide a code sample?
$array = [
'a' => 1,
'b' => 2,
'c' => 3
];
After pressing Crtl + Alt + L I got all in one line.
"Align key-value pairs" is selected.
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.
Thank you for your answer. Which version of PhpStorm do you have? In 2016.3 there ist no "Wrap Always":
It's there:
(ignore that white text on light grey background nuance -- it's another issue, theme related)
I did not know that the text "Do not wrap" can be clicked :)
Thank you very much!