@@ 338-342 (lines=5) @@ | ||
335 | $this->parseArguments($args); |
|
336 | } else { |
|
337 | $this->args = (object) $args; |
|
338 | foreach ($options as $name) { |
|
339 | if (!array_key_exists($name, $this->options)) |
|
340 | throw new \Exception("Unknown option '{$name}'"); |
|
341 | $this->options[$name] = true; |
|
342 | } |
|
343 | } |
|
344 | ||
345 | if (null === $this->action) |
|
@@ 370-375 (lines=6) @@ | ||
367 | } |
|
368 | ||
369 | $arguments = []; |
|
370 | foreach ($args as &$arg) { |
|
371 | if (array_key_exists($arg, $this->options)) |
|
372 | $this->options[$arg] = true; |
|
373 | else |
|
374 | $arguments[] = $arg; |
|
375 | } |
|
376 | $arguments = T::join($arguments, ' '); |
|
377 | $this->args = $this->syntax->parse($arguments); |
|
378 | } |