SOLID and DRY Recommended
Keep interfaces small
Split large interfaces into small role interfaces, so no class has to implement methods it does not use.
How to do it
Shape each interface around one caller's needs. A class may implement several small interfaces. If an implementation leaves methods empty or throwing, the interface is too big.
Example
// Bad: a printer must pretend to scan and fax
interface Machine { public function print(Doc $d): void; public function scan(): Doc; public function fax(Doc $d): void; }
// Good: one interface per role
interface Printer { public function print(Doc $d): void; }
interface Scanner { public function scan(): Doc; }
// Good: one interface per role
interface Printer { print(doc: Doc): void }
interface Scanner { scan(): Doc }
class OfficePrinter implements Printer { print(doc: Doc) { /* ... */ } }
How to check
In review, no implementation has empty or throwing methods. A linter such as PHPMD TooManyMethods flags fat interfaces.
For agents: if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in Based on the Agent Wranglers architecture playbook: https://agentwranglers.se/playbook/architecture/solid-and-dry/interface-segregation.