| @@ 365-369 (lines=5) @@ | ||
| 362 | $this->parseArguments($args); |
|
| 363 | } else { |
|
| 364 | $this->args = (object) $args; |
|
| 365 | foreach ($options as $name) { |
|
| 366 | if (!array_key_exists($name, $this->options)) |
|
| 367 | throw new \Exception("Unknown option '{$name}'"); |
|
| 368 | $this->options[$name] = true; |
|
| 369 | } |
|
| 370 | } |
|
| 371 | ||
| 372 | return $this->fire(); |
|
| @@ 401-406 (lines=6) @@ | ||
| 398 | } |
|
| 399 | ||
| 400 | $arguments = []; |
|
| 401 | foreach ($args as &$arg) { |
|
| 402 | if (array_key_exists($arg, $this->options)) |
|
| 403 | $this->options[$arg] = true; |
|
| 404 | else |
|
| 405 | $arguments[] = $arg; |
|
| 406 | } |
|
| 407 | $arguments = T::join($arguments, ' '); |
|
| 408 | $this->args = $this->syntax->parse($arguments); |
|
| 409 | } |
|