File tree Expand file tree Collapse file tree 6 files changed +12
-0
lines changed
Expand file tree Collapse file tree 6 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,13 @@ protected function showCommand(string $commandName) : void
4141 $ this ->console ->getLanguage ()->render ('cli ' , 'command ' ) . ': ' ,
4242 ForegroundColor::green
4343 ) . $ command ->getName ());
44+ $ value = $ command ->getGroup ();
45+ if ($ value !== null ) {
46+ CLI ::write (CLI ::style (
47+ $ this ->console ->getLanguage ()->render ('cli ' , 'group ' ) . ': ' ,
48+ ForegroundColor::green
49+ ) . $ value );
50+ }
4451 $ value = $ command ->getDescription ();
4552 if ($ value !== '' ) {
4653 CLI ::write (CLI ::style (
Original file line number Diff line number Diff line change 2222 'greet.afternoon ' => 'Good afternoon, {0}! ' ,
2323 'greet.evening ' => 'Good evening, {0}! ' ,
2424 'greet.morning ' => 'Good morning, {0}! ' ,
25+ 'group ' => 'Group ' ,
2526 'help.description ' => 'Shows command usage help. ' ,
2627 'index.description ' => 'Shows commands list. ' ,
2728 'index.option.greet ' => 'Shows greeting. ' ,
Original file line number Diff line number Diff line change 2222 'greet.afternoon ' => '¡Buenas tardes, {0}! ' ,
2323 'greet.evening ' => '¡Buenas noches, {0}! ' ,
2424 'greet.morning ' => '¡Buenos días, {0}! ' ,
25+ 'group ' => 'Grupo ' ,
2526 'help.description ' => 'Muestra ayuda de uso de comando. ' ,
2627 'index.description ' => 'Muestra la lista de comandos. ' ,
2728 'index.option.greet ' => 'Muestra saludo. ' ,
Original file line number Diff line number Diff line change 2222 'greet.afternoon ' => 'Boa tarde, {0}! ' ,
2323 'greet.evening ' => 'Boa noite, {0}! ' ,
2424 'greet.morning ' => 'Bom dia, {0}! ' ,
25+ 'group ' => 'Grupo ' ,
2526 'help.description ' => 'Mostra a ajuda de uso do comando. ' ,
2627 'index.description ' => 'Mostra a lista de comandos. ' ,
2728 'index.option.greet ' => 'Mostra saudação. ' ,
Original file line number Diff line number Diff line change 1515class Foo extends Command
1616{
1717 protected string $ name = 'foo ' ;
18+ protected string $ group = 'Foo ' ;
1819 protected string $ description = 'Foo command test ' ;
1920 protected array $ options = [
2021 '-o,--opt ' => 'Set option as true ' ,
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ public function testHelp() : void
2525 self ::assertStringNotContainsString ('Options ' , Stdout::getContents ());
2626 Stdout::reset ();
2727 $ console ->exec ('help foo ' );
28+ self ::assertStringContainsString ('Group ' , Stdout::getContents ());
2829 self ::assertStringContainsString ('Options ' , Stdout::getContents ());
2930 }
3031}
You can’t perform that action at this time.
0 commit comments