} /**
* Adds a short option value.
*
* @throws InvalidOptionException When option given doesn't exist
*/
private function addShortOption(string
$shortcut, mixed
$value): void
{ if (!
$this->definition->
hasShortcut($shortcut)) { throw new InvalidOptionException(sprintf('The "-%s" option does not exist.',
$shortcut));
} $this->
addLongOption($this->definition->
getOptionForShortcut($shortcut)->
getName(),
$value);
} /**
* Adds a long option value.
*
* @throws InvalidOptionException When option given doesn't exist
* @throws InvalidOptionException When a required value is missing
*/