private function getOptionValue(OptionDefinition $definition)
    {
        $nameShort = $definition->getShort();
        $nameLong = $definition->getLong();
        $valueShort = $this->parser->getOptionShort($nameShort);
        $valueLong = $this->parser->getOptionLong($nameLong);
        if ($nameShort !== null && $nameLong !== null
            && $valueShort !== null && $valueLong !== null
            && $valueShort !== $valueLong
        ) {
            throw new GetoptException(
                'Both -' . $nameShort . ' and --' . $nameLong
                . ' given, with non-matching values. Make up your mind.'
            );
        }
        return $valueShort !== null ? $valueShort : $valueLong;
    }