Change get_called_class() to self::class on final class
final class SomeClass
{
public function callOnMe()
{
- var_dump(get_called_class());
+ var_dump(self::class);
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php55\Rector\FuncCall\GetCalledClassToSelfClassRector;
return RectorConfig::configure()
->withRules([
GetCalledClassToSelfClassRector::class,
]);