I have interface X
interface X
{
public function foo($x, $y = 0);
}
then I have class
class xx implements X
{
public function foo($x, $y = 0)
{
// use $x, but not $y
}
}
This is perfectly normal, because I do not want to use optional $y
in this implementation of X
. But PMD yells that $y is unused parameter.
What can I do to easily change PMD behaviour? Only solution that I found was to suppress the warning with @SuppressWarnings(unused)
annotation, bet thats not what I really like.