PHP/redundant inheritance

From Woozle Writes Code
Jump to navigation Jump to search

By "redundant inheritance", I mean something like this:

interface A {}
interface A1 extends A {}
interface A2 extends A {}
interface B extends A1, A2 {}

Interface B is now redundantly inheriting from interface A.

The same thing can happen with traits:

trait A {}
trait A1 { use A; }
trait A2 { use A; }
trait B { use A1, A2; }

Trait B is now redundantly inheriting from trait A.

Discussion: toot.cat