lint/php-8.0/prefer-static-class
In the lint-recommended preset and every stricter one. In Rector’s rector/php80 set. Safe fix. Runs only when [php] version is 8.0 or later.
What it does
Change $this::class to static::class or self::class depends on class modifier
Configuration
[lint.rules]
"php-8.0/prefer-static-class" = "error"
To skip it in some files or lines, add an override or an ignore comment.
Replaces
ClassOnThisVariableObject(rector)