@@ -201,19 +201,25 @@ protected function describeApplication(Application $application, array $options
201201$ commands =$ description ->getCommands ();
202202
203203foreach ($ description ->getNamespaces ()as $ namespace ) {
204+ $ namespace ['commands ' ] =array_filter ($ namespace ['commands ' ],function ($ name )use ($ commands ) {
205+ return isset ($ commands [$ name ]);
206+ });
207+
208+ if (empty ($ namespace ['commands ' ])) {
209+ continue ;
210+ }
211+
204212if (!$ describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !==$ namespace ['id ' ]) {
205213$ this ->writeText ("\n" );
206214$ this ->writeText (' <comment> ' .$ namespace ['id ' ].'</comment> ' ,$ options );
207215 }
208216
209217foreach ($ namespace ['commands ' ]as $ name ) {
210- if (isset ($ commands [$ name ])) {
211- $ this ->writeText ("\n" );
212- $ spacingWidth =$ width -strlen ($ name );
213- $ command =$ commands [$ name ];
214- $ commandAliases =$ this ->getCommandAliasesText ($ command );
215- $ this ->writeText (sprintf (' <info>%s</info>%s%s ' ,$ name ,str_repeat (' ' ,$ spacingWidth ),$ commandAliases .$ command ->getDescription ()),$ options );
216- }
218+ $ this ->writeText ("\n" );
219+ $ spacingWidth =$ width -strlen ($ name );
220+ $ command =$ commands [$ name ];
221+ $ commandAliases =$ this ->getCommandAliasesText ($ command );
222+ $ this ->writeText (sprintf (' <info>%s</info>%s%s ' ,$ name ,str_repeat (' ' ,$ spacingWidth ),$ commandAliases .$ command ->getDescription ()),$ options );
217223 }
218224 }
219225
@@ -234,9 +240,9 @@ private function writeText($content, array $options = array())
234240
235241/**
236242 * Formats command aliases to show them in the command description.
237- *
243+ *
238244 * @param Command $command
239- *
245+ *
240246 * @return string
241247 */
242248private function getCommandAliasesText ($ command )