PHP Terminal App

https://github.com/ElliottLandsborough/php-terminal-app

CircleCI Code Style License: MIT Codacy Badge

How to install

composer install
./bin/app

How to test

composer install
./vendor/bin/phpunit

How to test with docker

docker-compose up

Notes

I know this is a small app but I still prefer the symfony component in case we want to expand later. It works with all @ nicknames other than '@restart'. Equivalents were taken from the crontab manpage.

Original input based on specification

./path-to-app * * * * * /usr/bin/php --version

New input format adds the type of command and quotes around the cron line

./bin/app parseCron "* * * * * /usr/bin/php --version"

Input

./bin/app parseCron "*/10 1,2,3 5-11 1 6 /usr/bin/php --version"

Output

+--------------+------------------------+
| Minute       | 0 10 20 30 40 50       |
| Hour         | 1 2 3                  |
| Day of month | 5 6 7 8 9 10 11        |
| Month        | 1                      |
| Day of week  | 6                      |
| Command      | /usr/bin/php --version |
+--------------+------------------------+