The class contains unused private methods. These private class methods are dead code, and do nothing. It is recommended to remove these unused private methods.
It is also recommended that you review these unused private methods if they were added for later use in the code, but the author missed using them.
class User
{
public function getName(): string
{
return 'John';
}
// invalid: setMessage() method is never unused
private function setMessage(string $name): void
{
$this->name = $name;
}
}
Make sure to remove private methods that are not used:
class User
{
public function getName(): string
{
return 'John';
}
}