Stop PhpStorm from aligning associative arrays

前端 未结 5 1084
失恋的感觉
失恋的感觉 2020-12-16 09:46

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         


        
5条回答
  •  情深已故
    2020-12-16 10:16

    Settings (Preferences on Mac) | Editor | Code Style | PHP | Other | Array declaration style -> Align key-value pairs

    enter image description here


    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

提交回复
热议问题