public function addOption(string $option, $value = null, string $glue = '=') : Executable
    {
        if ($value !== null) {
            // force space for multiple arguments e.g. --option 'foo' 'bar'
            if (is_array($value)) {
                $glue = ' ';
            }
            $value = $glue . $this->escapeArgument($value);
        } else {
            $value = '';
        }
        $this->options[] = $option . $value;

        return $this;
    }
public function addOption(string $option, $value = null, string $glue = '=') : Executable
    {
        if ($value !== null) {
            // force space for multiple arguments e.g. --option 'foo' 'bar'
            if (is_array($value)) {
                $glue = ' ';
            }
            $value = $glue . $this->escapeArgument($value);
        } else {
            $value = '';
        }
        $this->options[] = $option . $value;

        return $this;
    }
public function addOption ( string $ option , $ value = null , string $ glue = '=' ) : Executable { if ( $ value !== null ) { // force space for multiple arguments e.g. --option 'foo' 'bar' if ( is_array ( $ value ) ) { $ glue = ' ' ; } $ value = $ glue . $ this -> escapeArgument ( $ value ) ; } else { $ value = '' ; } $ this -> options [ ] = $ option . $ value ; return $ this ; }
Add option to list.

@param  string               $option
@param  mixed <string|array> $value
@param  string               $glue
@return \SebastianFeldmann\Cli\Command\Executable
Add option to list .