src/Parser.php
public function help()
    {
        echo PHP_EOL;
        $output = new Output;
        $output->write('Available Commands', [
            'color'     => 'red',
            'bold'      => true,
            'underline' => true,
        ]);
        echo PHP_EOL;

        $maxlen = 0;
        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            if ($len > $maxlen) {
                $maxlen = $len;
            }

        }

        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            $output->write(' ')
                ->write($key, ['color' => 'yellow'])
                ->write(str_repeat(' ', $maxlen - $len))
                ->write(' - ')
                ->write($description);

            echo PHP_EOL;
        }

        echo PHP_EOL;

    }
public function help()
    {
        echo PHP_EOL;
        $output = new Output;
        $output->write('Available Commands', [
            'color'     => 'red',
            'bold'      => true,
            'underline' => true,
        ]);
        echo PHP_EOL;

        $maxlen = 0;
        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            if ($len > $maxlen) {
                $maxlen = $len;
            }

        }

        foreach ($this->supportedArgs as $key => $description) {
            $len = strlen($key);
            $output->write(' ')
                ->write($key, ['color' => 'yellow'])
                ->write(str_repeat(' ', $maxlen - $len))
                ->write(' - ')
                ->write($description);

            echo PHP_EOL;
        }

        echo PHP_EOL;

    }
public function help ( ) { echo PHP_EOL ; $ output = new Output ; $ output -> write ( 'Available Commands' , [ 'color' => 'red' , 'bold' => true , 'underline' => true , ] ) ; echo PHP_EOL ; $ maxlen = 0 ; foreach ( $ this -> supportedArgs as $ key => $ description ) { $ len = strlen ( $ key ) ; if ( $ len > $ maxlen ) { $ maxlen = $ len ; } } foreach ( $ this -> supportedArgs as $ key => $ description ) { $ len = strlen ( $ key ) ; $ output -> write ( ' ' ) -> write ( $ key , [ 'color' => 'yellow' ] ) -> write ( str_repeat ( ' ' , $ maxlen - $ len ) ) -> write ( ' - ' ) -> write ( $ description ) ; echo PHP_EOL ; } echo PHP_EOL ; }
Outputs the help menu.

@return PhpCli\Parser Returns $this, for object-chaining.
Outputs the help menu .