diff --git a/src/Symfony/Component/Console/Application.php b/src/Symfony/Component/Console/Application.php index 11990242e8..590460ca0d 100644 --- a/src/Symfony/Component/Console/Application.php +++ b/src/Symfony/Component/Console/Application.php @@ -213,7 +213,7 @@ class Application } /** - * Set an input definition set to be used with this application. + * Set an input definition to be used with this application. * * @param InputDefinition $definition The input definition */ @@ -335,6 +335,8 @@ class Application /** * Adds an array of command objects. * + * If a Command is not enabled it will not be added. + * * @param Command[] $commands An array of commands */ public function addCommands(array $commands) @@ -348,10 +350,11 @@ class Application * Adds a command object. * * If a command with the same name already exists, it will be overridden. + * If the command is not enabled it will not be added. * * @param Command $command A Command object * - * @return Command The registered command + * @return Command|null The registered command if enabled or null */ public function add(Command $command) { @@ -420,9 +423,9 @@ class Application /** * Returns an array of all unique namespaces used by currently registered commands. * - * It does not returns the global namespace which always exists. + * It does not return the global namespace which always exists. * - * @return array An array of namespaces + * @return string[] An array of namespaces */ public function getNamespaces() { @@ -954,7 +957,7 @@ class Application /** * Runs and parses mode CON if it's available, suppressing any error output. * - * @return string x or null if it could not be parsed + * @return string|null x or null if it could not be parsed */ private function getConsoleMode() { @@ -1013,7 +1016,7 @@ class Application * @param string $name The string * @param array|\Traversable $collection The collection * - * @return array A sorted array of similar string + * @return string[] A sorted array of similar string */ private function findAlternatives($name, $collection) { @@ -1121,7 +1124,7 @@ class Application * * @param string $name The full name of the command * - * @return array The namespaces of the command + * @return string[] The namespaces of the command */ private function extractAllNamespaces($name) {