public function handle(): void
    {
        /* Help Guide Header */
        $help = " -----------------------------------------------------------------\n";
        $help .= " | Command Line Interface\n";
        $help .= " | See more in https://github.com/senhungwong/command-line-interface\n";
        $help .= " -------------------------------------------------------------------\n";

        /* Get All Commands */
        $commands = CommandEntry::getCommands();

        /* See Specific Function's Description */
        if ($command = $this->getArgument('function-name')) {
            $command = new $commands[$command];
            $help .= " - " . $command->getCommand() . ": ";
            $help .= $command->getDescription() . "\n";
        }

        /* List All Commands */
        else {
            foreach ($commands as $command) {
                $command = new $command;
                $help .= " - ";
                $help .= $command->getCommand() . ": ";
                $help .= $command->getDescription() . "\n";
            }
        }

        echo $help;
    }
public function handle(): void
    {
        /* Help Guide Header */
        $help = " -----------------------------------------------------------------\n";
        $help .= " | Command Line Interface\n";
        $help .= " | See more in https://github.com/senhungwong/command-line-interface\n";
        $help .= " -------------------------------------------------------------------\n";

        /* Get All Commands */
        $commands = CommandEntry::getCommands();

        /* See Specific Function's Description */
        if ($command = $this->getArgument('function-name')) {
            $command = new $commands[$command];
            $help .= " - " . $command->getCommand() . ": ";
            $help .= $command->getDescription() . "\n";
        }

        /* List All Commands */
        else {
            foreach ($commands as $command) {
                $command = new $command;
                $help .= " - ";
                $help .= $command->getCommand() . ": ";
                $help .= $command->getDescription() . "\n";
            }
        }

        echo $help;
    }
public function handle ( ) : void { /* Help Guide Header */ $ help = " -----------------------------------------------------------------\n" ; $ help .= " | Command Line Interface\n" ; $ help .= " | See more in https://github.com/senhungwong/command-line-interface\n" ; $ help .= " -------------------------------------------------------------------\n" ; /* Get All Commands */ $ commands = CommandEntry :: getCommands ( ) ; /* See Specific Function's Description */ if ( $ command = $ this -> getArgument ( 'function-name' ) ) { $ command = new $ commands [ $ command ] ; $ help .= " - " . $ command -> getCommand ( ) . ": " ; $ help .= $ command -> getDescription ( ) . "\n" ; } /* List All Commands */ else { foreach ( $ commands as $ command ) { $ command = new $ command ; $ help .= " - " ; $ help .= $ command -> getCommand ( ) . ": " ; $ help .= $ command -> getDescription ( ) . "\n" ; } } echo $ help ; }
Help command handler

@return void
Help command handler