public function addOption(array $option): void
    {
        $this->validator->validateOption($option, $this->commands);
        $option['command'] = $option['command'] ?? '';
        $option['repeats'] = $option['repeats'] ?? false;
        $this->options[] = $option;
        $this->addToOptionCache('name', $option);
        $this->addToOptionCache('short_name', $option);
    }
public function addOption(array $option): void
    {
        $this->validator->validateOption($option, $this->commands);
        $option['command'] = $option['command'] ?? '';
        $option['repeats'] = $option['repeats'] ?? false;
        $this->options[] = $option;
        $this->addToOptionCache('name', $option);
        $this->addToOptionCache('short_name', $option);
    }
public function addOption ( array $ option ) : void { $ this -> validator -> validateOption ( $ option , $ this -> commands ) ; $ option [ 'command' ] = $ option [ 'command' ] ?? '' ; $ option [ 'repeats' ] = $ option [ 'repeats' ] ?? false ; $ this -> options [ ] = $ option ; $ this -> addToOptionCache ( 'name' , $ option ) ; $ this -> addToOptionCache ( 'short_name' , $ option ) ; }
Add an option to be parsed.
Arguments are presented as a structured array with the following possible keys.

name: The name of the option prefixed with a double dash --
short_name: A shorter single character option prefixed with a single dash -
type: Required for all options that take values. An option specified without a type is considered to be a
boolean flag.
repeats: A boolean value that states whether the option can be repeated or not. Repeatable options are returned
as arrays.
default: A default value for the option.
help: A help message for the option

@param array $option
@throws OptionExistsException
@throws InvalidArgumentDescriptionException
@throws UnknownCommandException
Add an option to be parsed . Arguments are presented as a structured array with the following possible keys .