@@ -213,7 +213,7 @@ public function getHelperSet()
213
213
}
214
214
215
215
/**
216
- * Set an input definition set to be used with this application.
216
+ * Set an input definition to be used with this application.
217
217
*
218
218
* @param InputDefinition $definition The input definition
219
219
*/
@@ -335,6 +335,8 @@ public function register($name)
335
335
/**
336
336
* Adds an array of command objects.
337
337
*
338
+ * If a Command is not enabled it will not be added.
339
+ *
338
340
* @param Command[] $commands An array of commands
339
341
*/
340
342
public function addCommands (array $ commands )
@@ -348,10 +350,11 @@ public function addCommands(array $commands)
348
350
* Adds a command object.
349
351
*
350
352
* If a command with the same name already exists, it will be overridden.
353
+ * If the command is not enabled it will not be added.
351
354
*
352
355
* @param Command $command A Command object
353
356
*
354
- * @return Command The registered command
357
+ * @return Command|null The registered command if enabled or null
355
358
*/
356
359
public function add (Command $ command )
357
360
{
@@ -420,9 +423,9 @@ public function has($name)
420
423
/**
421
424
* Returns an array of all unique namespaces used by currently registered commands.
422
425
*
423
- * It does not returns the global namespace which always exists.
426
+ * It does not return the global namespace which always exists.
424
427
*
425
- * @return array An array of namespaces
428
+ * @return string[] An array of namespaces
426
429
*/
427
430
public function getNamespaces ()
428
431
{
@@ -954,7 +957,7 @@ private function getSttyColumns()
954
957
/**
955
958
* Runs and parses mode CON if it's available, suppressing any error output.
956
959
*
957
- * @return string <width>x<height> or null if it could not be parsed
960
+ * @return string|null <width>x<height> or null if it could not be parsed
958
961
*/
959
962
private function getConsoleMode ()
960
963
{
@@ -1013,7 +1016,7 @@ public function extractNamespace($name, $limit = null)
1013
1016
* @param string $name The string
1014
1017
* @param array|\Traversable $collection The collection
1015
1018
*
1016
- * @return array A sorted array of similar string
1019
+ * @return string[] A sorted array of similar string
1017
1020
*/
1018
1021
private function findAlternatives ($ name , $ collection )
1019
1022
{
@@ -1121,7 +1124,7 @@ private function splitStringByWidth($string, $width)
1121
1124
*
1122
1125
* @param string $name The full name of the command
1123
1126
*
1124
- * @return array The namespaces of the command
1127
+ * @return string[] The namespaces of the command
1125
1128
*/
1126
1129
private function extractAllNamespaces ($ name )
1127
1130
{
0 commit comments