1919/**
2020 * default command controller. there are some command usage examples(1)
2121 * Class HomeController
22+ *
2223 * @package Inhere\Console\Examples\Controller
2324 */
2425class HomeController extends Controller
@@ -34,15 +35,15 @@ protected static function commandAliases(): array
3435 {
3536 return [
3637 // now, 'home:i' is equals to 'home:index'
37- 'i ' => 'index ' ,
38- 'prg ' => 'progress ' ,
39- 'pgb ' => 'progressBar ' ,
40- 'l ' => 'list ' ,
41- 'af ' => 'artFont ' ,
42- 'ml ' => 'multiList ' ,
43- 'sl ' => 'splitLine ' ,
44- 'dt ' => 'dynamicText ' ,
45- 'da ' => ' defArg ' ,
38+ 'i ' => 'index ' ,
39+ 'prg ' => 'progress ' ,
40+ 'pgb ' => 'progressBar ' ,
41+ 'l ' => 'list ' ,
42+ 'af ' => 'artFont ' ,
43+ 'ml ' => 'multiList ' ,
44+ 'sl ' => 'splitLine ' ,
45+ 'dt ' => 'dynamicText ' ,
46+ 'defArg ' => [ ' da ' , ' defarg ' ] ,
4647 ];
4748 }
4849
@@ -108,6 +109,7 @@ public function disabledCommand(): void
108109
109110 /**
110111 * command `defArgCommand` config
112+ *
111113 * @throws LogicException
112114 */
113115 protected function defArgConfigure (): void
@@ -127,6 +129,7 @@ public function defArgCommand(): void
127129
128130 /**
129131 * a command for test throw exception
132+ *
130133 * @throws RuntimeException
131134 */
132135 public function exCommand (): void
@@ -181,6 +184,7 @@ public function colorCheckCommand(): void
181184
182185 /**
183186 * output art font text
187+ *
184188 * @options
185189 * --font Set the art font name(allow: {internalFonts}).
186190 * --italic Set the art font type is italic.
@@ -205,9 +209,10 @@ public function artFontCommand(): int
205209
206210 /**
207211 * dynamic notice message show: counterTxt. It is like progress txt, but no max value.
212+ *
213+ * @return int
208214 * @example
209215 * {script} {command}
210- * @return int
211216 */
212217 public function counterCommand (): int
213218 {
@@ -293,16 +298,19 @@ public function dynamicTextCommand(): void
293298
294299 /**
295300 * a progress bar example show, by Show::progressBar()
301+ *
296302 * @options
297303 * --type the progress type, allow: bar,txt. <cyan>txt</cyan>
298304 * --done-char the done show char. <info>=</info>
299305 * --wait-char the waiting show char. <info>-</info>
300306 * --sign-char the sign char show. <info>></info>
307+ *
308+ * @param Input $input
309+ *
310+ * @return int
301311 * @example
302312 * {script} {command}
303313 * {script} {command} --done-char '#' --wait-char ' '
304- * @param Input $input
305- * @return int
306314 */
307315 public function progressCommand ($ input ): int
308316 {
@@ -333,6 +341,7 @@ public function progressCommand($input): int
333341
334342 /**
335343 * a progress bar example show, by class ProgressBar
344+ *
336345 * @throws LogicException
337346 */
338347 public function progressBarCommand (): void
@@ -474,6 +483,7 @@ public function paddingCommand(): void
474483
475484 /**
476485 * a example for use arguments on command
486+ *
477487 * @usage home:useArg [arg1=val1 arg2=arg2] [options]
478488 * @example
479489 * home:useArg status=2 name=john arg0 -s=test --page=23 -d -rf --debug --test=false -a v1 --ab -c -g --cd val -h '' -i stat=online
@@ -513,6 +523,7 @@ public function envCommand(): void
513523 /**
514524 * This is a demo for download a file to local
515525 * @usage {command} url=url saveTo=[saveAs] type=[bar|text]
526+ *
516527 * @example {command} url=https://github.com/inhere/php-console/archive/master.zip type=bar
517528 */
518529 public function downCommand (): int
0 commit comments