Eclipse PHP formatter - newline only for associative arrays

209 Views Asked by At

Is it possbile, by using Eclipse PHP Formatter custom rules, to have normal arrays formatted like this

$a = [1, 2, 3];

and associative arrays like this

$a = [
    'foo' => 'bar',
    'foo2' => 'bar2'
];

I've tried various options but without success.

1

There are 1 best solutions below

0
On BEST ANSWER

You can't have both (state in PDT 3.5 Mars). Array formatting settings is global for both, classic and associative arrays.

Please create enhance request on PDT bugzilla: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=PDT