protected function _parseOption($name, $params)
    {
        if (!isset($this->_options[$name])) {
            throw new ConsoleException($this->getOptionError($name));
        }
        $option = $this->_options[$name];
        $isBoolean = $option->isBoolean();
        $nextValue = $this->_nextToken();
        $emptyNextValue = (empty($nextValue) && $nextValue !== '0');
        if (!$isBoolean && !$emptyNextValue && !$this->_optionExists($nextValue)) {
            array_shift($this->_tokens);
            $value = $nextValue;
        } elseif ($isBoolean) {
            $value = true;
        } else {
            $value = $option->defaultValue();
        }
        if ($option->validChoice($value)) {
            if ($option->acceptsMultiple()) {
                $params[$name][] = $value;
            } else {
                $params[$name] = $value;
            }

            return $params;
        }

        return [];
    }