Skip to content

Commit 2d5708f

Browse files
committed
update some examples
1 parent d237b6b commit 2d5708f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

examples/app

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ require dirname(__DIR__) . '/test/bootstrap.php';
1414

1515
// create app instance
1616
$app = new Application([
17-
'debug' => true,
18-
'rootPath' => dirname(__DIR__),
19-
'description' => 'This is demo console application',
17+
'debug' => true,
18+
'rootPath' => dirname(__DIR__),
19+
'desc' => 'This is demo console application',
2020
]);
2121

2222
$app->setLogo("

examples/commands.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* @license https://github.com/inhere/php-console/blob/master/LICENSE
88
*/
99

10+
use Inhere\Console\Application;
1011
use Inhere\Console\BuiltIn\PharController;
1112
use Inhere\Console\BuiltIn\SelfUpdateCommand;
1213
use Inhere\Console\Examples\Command\CorCommand;
@@ -19,12 +20,15 @@
1920
use Inhere\Console\IO\Input;
2021
use Inhere\Console\IO\Output;
2122

23+
/** @var Application $app */
2224
$app->command(DemoCommand::class);
2325
$app->command('exam', function (Input $in, Output $out): void {
2426
$cmd = $in->getCommand();
2527

2628
$out->info('hello, this is a test command: ' . $cmd);
27-
}, 'a description message');
29+
}, [
30+
'desc' => 'a description message',
31+
]);
2832

2933
$app->command('test', TestCommand::class, [
3034
'aliases' => ['t']

0 commit comments

Comments
 (0)