The PHP Polymorphism library provides an easy way to add polymorphism to your own code.
Run this command to add this library to your composer.json
file:
composer require ganbarodigital/php-mv-polymorphism
See our docs page for a tutorial and reference documentation.