The User can generate Reports and send them via Email in different formats like HTML or JSON.
There is a bunch of bad practices, anti-patterns and broken SOLID principles in the given code. The objective of this test is to perform a needed refactor in order to have a maintainable, robust and understable application.
You can freely create files, classes, methods and tests. Also you can break the given code into the pieces that you consider.
- PHP 5.6 or higher installed.
- Git installed.
- Composer installed.
composer install
- To run the Unit Tests
/vendor/bin/phpunit src