This project is about displaying different outputs for numeric values - every product of 3 should output "Fizz", every product of 5 "Buzz", and the product of both "FizzBuzz" (3 + 5).
It uses PSR-4 Autoloading for simple namespaces, in case further development is being done on this. It also is fully unit tested.
To run this project, please ensure you have PHP 7.4+ and composer installed.
If that's not the case, please refer to the following Downloads (most commonly used OS):
PHP:
- MacOS: https://www.php.net/manual/de/install.macosx.php
- Windows: https://www.php.net/manual/de/install.windows.php
Composer:
- MacOS: https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos
- Windows: https://getcomposer.org/doc/00-intro.md#installation-windows
Once you have successfully configured composer and PHP, simply clone this repository, navigate to it through the Terminal/Command Prompt and enter the following commands:
composer install --ignore-platform-reqs
Your Terminal/Command Prompt should look like this:
Now that you have all necessary dependencies/autoload maps configured, execute the following command to run this project:
php index.php
Expected output when running php:
Congratulations, you've successfuly ran the program! :)
To run Tests, enter the following command from the base of this directory!
Please make sure you've installed composer as mentioned above!
Windows: "./vendor/bin/phpunit" test --coverage-text
MAC: ./vendor/bin/phpunit test --coverage-text
Exit codes:
1 - Not permitted Division by Zero.
2 - Not supported Value.