protected function parseOptions(string $arg, string $nextArg = null): bool
    {
        $value = \substr($nextArg, 0, 1) === '-' ? null : $nextArg;

        if (null === $option  = $this->optionFor($arg)) {
            return $this->handleUnknown($arg, $value);
        }

        $this->_lastVariadic = $option->variadic() ? $option->attributeName() : null;

        return false === $this->emit($option->attributeName(), $value) ? false : $this->setValue($option, $value);
    }
protected function parseOptions(string $arg, string $nextArg = null): bool
    {
        $value = \substr($nextArg, 0, 1) === '-' ? null : $nextArg;

        if (null === $option  = $this->optionFor($arg)) {
            return $this->handleUnknown($arg, $value);
        }

        $this->_lastVariadic = $option->variadic() ? $option->attributeName() : null;

        return false === $this->emit($option->attributeName(), $value) ? false : $this->setValue($option, $value);
    }
protected function parseOptions ( string $ arg , string $ nextArg = null ) : bool { $ value = \ substr ( $ nextArg , 0 , 1 ) === '-' ? null : $ nextArg ; if ( null === $ option = $ this -> optionFor ( $ arg ) ) { return $ this -> handleUnknown ( $ arg , $ value ) ; } $ this -> _lastVariadic = $ option -> variadic ( ) ? $ option -> attributeName ( ) : null ; return false === $ this -> emit ( $ option -> attributeName ( ) , $ value ) ? false : $ this -> setValue ( $ option , $ value ) ; }
Parse an option, emit its event and set value.

@param string      $arg
@param string|null $nextArg

@return bool Whether to eat next arg.
Parse an option emit its event and set value .