#!/usr/bin/env php
<?php

declare(strict_types=1);//optional

require_once 'vendor/autoload.php'; //if installed via composer

/**
 * This is the documentation that will appear when you type help.
 */
class Example {

    /**
    * This one is easy to run.
    * try runMe with --help to see this text.
    */
    public function runMe($anything = null) {
        //either return output or just output directly its up to you.
        echo "I work with no arguments.";
        if ($anything !== null) {
            echo " But thanks for providing me with: ";
            var_dump($anything);
        }
    }

    /**
    * This command will only run when all the requirements are met.
    */
    public function tryMe(bool $bool, string $string, float $float, int $int) {
        echo "I only run if you provide a bool, a string, a float and an int.";
        var_dump(func_get_args());
    }
};

$cli = new BHayes\CLI\CLI(new Example());
$cli->run();
