@@ 491-499 (lines=9) @@ | ||
488 | if (empty($namespaces)) { |
|
489 | $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); |
|
490 | ||
491 | if ($alternatives = $this->findAlternatives($namespace, $allNamespaces, array())) { |
|
492 | if (1 == count($alternatives)) { |
|
493 | $message .= "\n\nDid you mean this?\n "; |
|
494 | } else { |
|
495 | $message .= "\n\nDid you mean one of these?\n "; |
|
496 | } |
|
497 | ||
498 | $message .= implode("\n ", $alternatives); |
|
499 | } |
|
500 | ||
501 | throw new \InvalidArgumentException($message); |
|
502 | } |
|
@@ 540-547 (lines=8) @@ | ||
537 | ||
538 | $message = sprintf('Command "%s" is not defined.', $name); |
|
539 | ||
540 | if ($alternatives = $this->findAlternatives($name, $allCommands, array())) { |
|
541 | if (1 == count($alternatives)) { |
|
542 | $message .= "\n\nDid you mean this?\n "; |
|
543 | } else { |
|
544 | $message .= "\n\nDid you mean one of these?\n "; |
|
545 | } |
|
546 | $message .= implode("\n ", $alternatives); |
|
547 | } |
|
548 | ||
549 | throw new \InvalidArgumentException($message); |
|
550 | } |