How to provide long syntax for array declaration in phpstorm?

I pretty often use the syntax of a short array [] instead of a longer array() . Now the server environment forces me to use a longer one.

PhpStorm allows you to force a shorter syntax for arrays in code style> Php> Array ad style> Force ad style:

PhpStorm Code Style Array Declartion Style Force Short Style

Now I want to achieve the opposite.

It would be desirable if this were automatically replaced, but this would already help to mark the style of the short declaration as a mistake.

+6
source share
1 answer

From the project settings> PHP, select the PHP language level to 5.3 and mark the syntax of the short array as an error.

+11
source

Source: https://habr.com/ru/post/976677/


All Articles