<?php
declare(strict_types=1);
namespace Bug;
final class Bug {
public function getString(): string {
return $this->getNull() ?? 'Hey';
}
private function getNull(): ?string {
return null;
}
}
The method should not be removed, as it is actually used.
Bug Report
Minimal PHP Code Causing Issue
See https://getrector.com/demo/07d5cff5-af68-474a-b118-69b15b6f1d6f
Responsible rules
RemoveUnusedPrivateMethodRectorExpected Behavior
The method should not be removed, as it is actually used.