
array_syntax
¶PHP arrays should be declared using the configured syntax.
syntax
¶Whether to use the long
or short
array syntax.
Allowed values: 'long'
, 'short'
Default value: 'short'
With configuration: ['syntax' => 'long']
.
--- Original
+++ New
<?php
-[1,2];
+array(1,2);
The rule is part of the following rule sets:
Using the @PHP54Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP70Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP71Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP73Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP74Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP80Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP81Migration rule set will enable the array_syntax
rule with the default config.
Using the @PHP82Migration rule set will enable the array_syntax
rule with the default config.
Using the @PhpCsFixer rule set will enable the array_syntax
rule with the default config.
Using the @Symfony rule set will enable the array_syntax
rule with the default config.