Upgrade array callable to first class callable
final class SomeClass
{
public function run()
{
- $name = [$this, 'name'];
+ $name = $this->name(...);
}
public function name()
{
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php81\Rector\Array_\FirstClassCallableRector;
return RectorConfig::configure()
->withRules([
FirstClassCallableRector::class,
]);