-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Labels
Description
Abstract classes can contain abstract methods which are required to be overloaded, but they can also contain empty methods which are optional to overload.
abstract class Foo
{
// Required to be overloaded.
abstract public function bar($param);
// Optional to be overloaded.
public function baz($param) {
}
}
This standard will throw a Unused function parameter $param.(VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable)
warning for the second method bax()
.
While technically correct, IMHO it would be sane to make an exception for these kind of "optional overload" (empty) methods in abstract
classes.