ConvertStaticPrivateConstantToSelfRector

Replaces static::* access to private constants with self::*

 final class Foo
 {
     private const BAR = 'bar';

     public function run()
     {
-        $bar = static::BAR;
+        $bar = self::BAR;
     }
 }

Configure your rector.php:

<?php

use Rector\CodeQuality\Rector\ClassConstFetch\ConvertStaticPrivateConstantToSelfRector;
use Rector\Config\RectorConfig;

return RectorConfig::configure()
    ->withRules([
        ConvertStaticPrivateConstantToSelfRector::class,
    ]);
SETS:  Code Quality