-
-
Notifications
You must be signed in to change notification settings - Fork 742
Closed
rectorphp/rector-src
#6920Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | 2.0.16 |
RemoveUnusedPrivateClassConstantRector rule has false positives
Minimal PHP Code Causing Issue
<?php declare(strict_types=1);
final readonly class Test
{
private const string SOME_CONST = '1';
public function hello(): string
{
return $this::SOME_CONST;
}
}becomes
final readonly class Test
{
- private const string SOME_CONST = '1';
-
public function hello(): string
{
return $this::SOME_CONST;Applied rules:
- RemoveUnusedPrivateClassConstantRector
Expected Behaviour
Should be skipped by this rule
Reactions are currently unavailable