PHP unused parameter validation is reported where shouldn't
Please consider the following PHP code:
class A {
public function foo($a, $b)
{
return $a;
}
}
class B extends A {
public function foo($a, $b)
{
return $a + $b;
}
}
Parameter $b is reported as unused in class A. IDE clearly understands that method foo is overridden by other classes that use parameter $b. Why reporting it as unused? Any way to get rid of this warning without suppressing it?
Please sign in to leave a comment.
It's a missing feature, we can ignore unused parameters of overriding methods but can't do the same for overridden ones. Please vote: https://youtrack.jetbrains.com/issue/WI-27462