@@ 193-200 (lines=8) @@ | ||
190 | * |
|
191 | * @throws \RuntimeException When option given doesn't exist |
|
192 | */ |
|
193 | private function addShortOption($shortcut, $value) |
|
194 | { |
|
195 | if (!$this->definition->hasShortcut($shortcut)) { |
|
196 | throw new \RuntimeException(sprintf('The "-%s" option does not exist.', $shortcut)); |
|
197 | } |
|
198 | ||
199 | $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); |
|
200 | } |
|
201 | ||
202 | /** |
|
203 | * Adds a long option value. |
@@ 158-165 (lines=8) @@ | ||
155 | * |
|
156 | * @throws \InvalidArgumentException When option given doesn't exist |
|
157 | */ |
|
158 | private function addShortOption($shortcut, $value) |
|
159 | { |
|
160 | if (!$this->definition->hasShortcut($shortcut)) { |
|
161 | throw new \InvalidArgumentException(sprintf('The "-%s" option does not exist.', $shortcut)); |
|
162 | } |
|
163 | ||
164 | $this->addLongOption($this->definition->getOptionForShortcut($shortcut)->getName(), $value); |
|
165 | } |
|
166 | ||
167 | /** |
|
168 | * Adds a long option value. |