File tree 2 files changed +8
-4
lines changed
2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,9 @@ require dirname(__DIR__) . '/test/bootstrap.php';
14
14
15
15
// create app instance
16
16
$ 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 ' ,
20
20
]);
21
21
22
22
$ app ->setLogo ("
Original file line number Diff line number Diff line change 7
7
* @license https://github.com/inhere/php-console/blob/master/LICENSE
8
8
*/
9
9
10
+ use Inhere \Console \Application ;
10
11
use Inhere \Console \BuiltIn \PharController ;
11
12
use Inhere \Console \BuiltIn \SelfUpdateCommand ;
12
13
use Inhere \Console \Examples \Command \CorCommand ;
19
20
use Inhere \Console \IO \Input ;
20
21
use Inhere \Console \IO \Output ;
21
22
23
+ /** @var Application $app */
22
24
$ app ->command (DemoCommand::class);
23
25
$ app ->command ('exam ' , function (Input $ in , Output $ out ): void {
24
26
$ cmd = $ in ->getCommand ();
25
27
26
28
$ out ->info ('hello, this is a test command: ' . $ cmd );
27
- }, 'a description message ' );
29
+ }, [
30
+ 'desc ' => 'a description message ' ,
31
+ ]);
28
32
29
33
$ app ->command ('test ' , TestCommand::class, [
30
34
'aliases ' => ['t ' ]
You can’t perform that action at this time.
0 commit comments