@@ 223-234 (lines=12) @@ | ||
220 | * |
|
221 | * @return CommandName[] The command names. |
|
222 | */ |
|
223 | public function getCommandNames($includeBase = true) |
|
224 | { |
|
225 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
226 | ||
227 | $commandNames = $this->commandNames; |
|
228 | ||
229 | if ($includeBase && $this->baseFormat) { |
|
230 | $commandNames = array_merge($this->baseFormat->getCommandNames(), $commandNames); |
|
231 | } |
|
232 | ||
233 | return $commandNames; |
|
234 | } |
|
235 | ||
236 | /** |
|
237 | * Returns whether the format contains any command names. |
|
@@ 301-313 (lines=13) @@ | ||
298 | * |
|
299 | * @return CommandOption[] The command options. |
|
300 | */ |
|
301 | public function getCommandOptions($includeBase = true) |
|
302 | { |
|
303 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
304 | ||
305 | $commandOptions = array_values($this->commandOptions); |
|
306 | ||
307 | if ($includeBase && $this->baseFormat) { |
|
308 | // prepend base command options |
|
309 | $commandOptions = array_merge($this->baseFormat->getCommandOptions(), $commandOptions); |
|
310 | } |
|
311 | ||
312 | return $commandOptions; |
|
313 | } |
|
314 | ||
315 | /** |
|
316 | * Returns whether the format contains a specific command option. |
@@ 209-220 (lines=12) @@ | ||
206 | * |
|
207 | * @return CommandName[] The command names. |
|
208 | */ |
|
209 | public function getCommandNames($includeBase = true) |
|
210 | { |
|
211 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
212 | ||
213 | $commandNames = $this->commandNames; |
|
214 | ||
215 | if ($includeBase && $this->baseFormat) { |
|
216 | $commandNames = array_merge($this->baseFormat->getCommandNames(), $commandNames); |
|
217 | } |
|
218 | ||
219 | return $commandNames; |
|
220 | } |
|
221 | ||
222 | /** |
|
223 | * Sets the command options of the built format. |
|
@@ 419-431 (lines=13) @@ | ||
416 | * |
|
417 | * @return CommandOption[] The command options. |
|
418 | */ |
|
419 | public function getCommandOptions($includeBase = true) |
|
420 | { |
|
421 | Assert::boolean($includeBase, 'The parameter $includeBase must be a boolean. Got: %s'); |
|
422 | ||
423 | $commandOptions = array_values($this->commandOptions); |
|
424 | ||
425 | if ($includeBase && $this->baseFormat) { |
|
426 | // prepend base command options |
|
427 | $commandOptions = array_merge($this->baseFormat->getCommandOptions(), $commandOptions); |
|
428 | } |
|
429 | ||
430 | return $commandOptions; |
|
431 | } |
|
432 | ||
433 | /** |
|
434 | * Sets the arguments of the built format. |