-
-
Notifications
You must be signed in to change notification settings - Fork 739
Closed
rectorphp/rector-src
#5770Labels
Description
Bug Report
| Subject | Details |
|---|---|
| Rector version | last dev-main |
| Installed as | composer dependency |
Minimal PHP Code Causing Issue
See https://getrector.com/demo/81e4f9cb-57f5-4240-9fb9-73256732da21
<?php
final class SkipArrayCallablesSelfWithConstructor
{
private array $args;
public function __construct(...$args)
{
$this->args = $args;
}
public function run(): array
{
$array = [3, 2, 1];
usort($array, [self::class, 'sort']);
return $array;
}
private function sort($a, $b)
{
return $a <=> $b;
}
}Responsible rules
RemoveUnusedPrivateMethodRector
Expected Behavior
Rectorphp should skip it.
In Addition
Reactions are currently unavailable