$this->
addLongOption($this->definition->
getOptionForShortcut($shortcut)->
getName(),
$value);
} /**
* Adds a long option value.
*
* @throws RuntimeException When option given doesn't exist
*/
private function addLongOption(string
$name, mixed
$value): void
{ if (!
$this->definition->
hasOption($name)) { if (!
$this->definition->
hasNegation($name)) { throw new RuntimeException(sprintf('The "--%s" option does not exist.',
$name));
} $optionName =
$this->definition->
negationToName($name);
if (null !==
$value) { throw new RuntimeException(sprintf('The "--%s" option does not accept a value.',
$name));
} $this->options
[$optionName] = false;
return;
}