How can I tell PhpStorm (using version 8.0.3) to keep the following array as is when clicking Cmd+Alt+L
to reformat my code:
$array = [
'short' => 1, // I want this...
'veryVeryVeryIncrediblyLong' => 123456789,
];
Instead of doing this:
$array = [
'short' => 1, // Not this...
'veryVeryVeryIncrediblyLong' => 123456789,
];
Since PhpStorm 2017.x version the appropriate option is located at:
Settings (Preferences on Mac) | Editor | Code Style
PHP | Wrapping and Braces
Array initializer | Align key-value pairs
Settings (Preferences on Mac) | Editor | Code Style | PHP
Other | Array declaration style -> Align key-value pairs