Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm – Prevent array brackets aligning

Tags:

php

phpstorm

PhpStorm is aligning the brackets from an array.

DB::table('something')->create([
                                   'title' => 'John',
                                   'description' => 'Doe',
                               ]); // I don't want to align it this way...


DB::table('something')->create([
    'title' => 'John',
    'description' => 'Doe',
]); // But this way...

Where do I change this at Settings/Preferences > Editor > Code Style > PHP ?

like image 754
Matthijs Avatar asked Jun 25 '16 09:06

Matthijs


1 Answers

Finally figured this out!

Go to Preferences > Editor > Code Style > PHP > Wrapping and Braces. Uncheck Align when multiline under Function call arguments.

PhpStorm Preferences Screenshot

like image 124
DJ Tarazona Avatar answered Nov 13 '22 11:11

DJ Tarazona