0
votes

We are using one of the Squiz rules in our custom phpcs profile.

Sadly I am having some issues with getting PhpStorm set up to handle this correctly. This is what an array should look like.

$test = [
         1,
         2,
        ];

But PhpStorm formats it like this no matter what I do.

$test = [
    1,
    2,
];

Any ideas on how to get PhpStorm to format it correctly?

1

1 Answers

1
votes

Unfortunately there is no way of formatting this correctly except excluding that region from formatting so it would not get reformatted wrong.

It looks like it has been changed like that due to https://youtrack.jetbrains.com/issue/WI-28981. Another related issue is https://youtrack.jetbrains.com/issue/WI-23573.

Please submit a request to https://youtrack.jetbrains.com/issues/WI#newissue=yes and we'll check on that.