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 = [
\'sh
In Phpstorm 2017.3 & later , This setting is located at File | Settings | Editor | Code Style | PHP | Wrapping and Braces | Array initializer | Align key-value pairs
PhpStorm 2019 and up: Settings -> editor -> PHP -> Wrapping and Braces -> Array initializer -> Align key-value pairs [*] (Linux OS)
In phpstorm 2019 it goes somewhere like this: (settings > editor > php > Wrapping and Braces > Assignment statement > Align consecutive assignments) PHPStorm 9 align assignments in PHP
Preferences → Editor → Code Style → PHP → Other → Align key-value pairs
Settings (Preferences on Mac) | Editor | Code Style | PHP | Other | Array declaration style -> Align key-value pairs
Since PhpStorm 2017.x version it is now located at Settings (Preferences on Mac) | Editor | Code Style | PHP | Wrapping and Braces --> Array initializer | Align key-value pairs