PHPStorm - Force array() String Declaration With Code Style

279 Views Asked by At

In PHPStorm, you can force arrays to be declared as [] in the "Code Style" section of Settings.

enter image description here

Is there anyway to do the opposite and force arrays to be declared with array()? For example, I would like the following:

$myArray = ['one', 'two'];

to become

$myArray = array('one', 'two');

when I reformat a script using the editor.

1

There are 1 best solutions below

0
Dmitrii On BEST ANSWER

There's an Intention for this: convert array

Unfortunately there's no way to have it performed automatically on "reformat code".