Change curly based array and string to square bracket
$string = 'test';
-echo $string{0};
+echo $string[0];
$array = ['test'];
-echo $array{0};
+echo $array[0];
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php74\Rector\ArrayDimFetch\CurlyToSquareBracketArrayStringRector;
return RectorConfig::configure()
->withRules([
CurlyToSquareBracketArrayStringRector::class,
]);