[Console] Remove an unused argument and fix a small cs issue

This commit is contained in:
Jakub Zalas 2015-06-05 14:31:22 +01:00
parent 9f5a6c6b66
commit ec14143922

View File

@ -488,7 +488,7 @@ class Application
if (empty($namespaces)) { if (empty($namespaces)) {
$message = sprintf('There are no commands defined in the "%s" namespace.', $namespace); $message = sprintf('There are no commands defined in the "%s" namespace.', $namespace);
if ($alternatives = $this->findAlternatives($namespace, $allNamespaces, array())) { if ($alternatives = $this->findAlternatives($namespace, $allNamespaces)) {
if (1 == count($alternatives)) { if (1 == count($alternatives)) {
$message .= "\n\nDid you mean this?\n "; $message .= "\n\nDid you mean this?\n ";
} else { } else {
@ -537,7 +537,7 @@ class Application
$message = sprintf('Command "%s" is not defined.', $name); $message = sprintf('Command "%s" is not defined.', $name);
if ($alternatives = $this->findAlternatives($name, $allCommands, array())) { if ($alternatives = $this->findAlternatives($name, $allCommands)) {
if (1 == count($alternatives)) { if (1 == count($alternatives)) {
$message .= "\n\nDid you mean this?\n "; $message .= "\n\nDid you mean this?\n ";
} else { } else {
@ -1082,7 +1082,7 @@ class Application
} }
} }
$alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2*$threshold; }); $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
asort($alternatives); asort($alternatives);
return array_keys($alternatives); return array_keys($alternatives);