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