Replace calls to get_class() and get_parent_class() without arguments with self::class and parent::class.
class Example extends StdClass {
public function whoAreYou() {
- return get_class() . ' daughter of ' . get_parent_class();
+ return self::class . ' daughter of ' . parent::class;
}
}
Configure your rector.php
:
<?php
use Rector\Config\RectorConfig;
use Rector\Php83\Rector\FuncCall\RemoveGetClassGetParentClassNoArgsRector;
return RectorConfig::configure()
->withRules([
RemoveGetClassGetParentClassNoArgsRector::class,
]);