
normalize_index_brace
¶Array index should always be written by using square braces.
--- Original
+++ New
@@ -1,2 +1,2 @@
<?php
-echo $sample{$index};
+echo $sample[$index];
The rule is part of the following rule sets:
Using the @PHP74Migration rule set will enable the normalize_index_brace
rule.
Using the @PHP80Migration rule set will enable the normalize_index_brace
rule.
Using the @PhpCsFixer rule set will enable the normalize_index_brace
rule.
Using the @Symfony rule set will enable the normalize_index_brace
rule.