AccountController can't extend BaseAccount and BaseController at the same time. If I make all BaseAccount or BaseController methods empty, I can have an interface, but if I implement that interface in two different places, that is, I make a contract to implement a method in two different places, I will have duplicated code. Do interfaces solve DDD with code duplication?
interface A {
function doStuff() {
}
}
class B implements A {
function doStuff() {
// a code
}
}
class C implements A {
function doStuff() {
// the same code!!!
}
}