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