Crell, Training exercise:
Try to replace all
$foo->isBeep()/$foo->canBar()
etc. calls with an instanceof check. $foo instanceof Beepable, $foo instanceof Bars, etc.What does that do to your data model? If you leverage parameter types instead of manual instanceof checks, how does that simplify your logic flow?
I don't expect it to work for every use case, especially in PHP, but it would be a valuable exercise to try.