Skip to content

Commit cf9953f

Browse files
committed
update readme
1 parent 8e8284d commit cf9953f

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ git clone https://github.com/inhere/php-console.git // github
4444
```php
4545
use Inhere\Console\IO\Input;
4646
use Inhere\Console\IO\Output;
47-
use Inhere\Console\App;
47+
use Inhere\Console\Application;
4848

4949
$meta = [
5050
'name' => 'My Console App',
5151
'version' => '1.0.2',
5252
];
5353
$input = new Input;
5454
$output = new Output;
55-
$app = new App($meta, $input, $output);
55+
$app = new Application($meta, $input, $output);
5656

5757
// add command routes
5858
$app->command('demo', function (Input $in, Output $out) {

README_zh.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ git clone https://github.com/inhere/php-console.git // github
4949
// file: examples/app
5050
use Inhere\Console\IO\Input;
5151
use Inhere\Console\IO\Output;
52-
use Inhere\Console\App;
52+
use Inhere\Console\Application;
5353

5454
$meta = [
5555
'name' => 'My Console App',
5656
'version' => '1.0.2',
5757
];
5858
$input = new Input;
5959
$output = new Output;
60-
$app = new App($meta, $input, $output);
60+
$app = new Application($meta, $input, $output);
6161

6262
// add command routes
6363
$app->command('demo', function (Input $in, Output $out) {

examples/DemoCommand.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
use Inhere\Console\Command;
1212
use Inhere\Console\IO\Input;
13+
use Inhere\Console\IO\Output;
1314

1415
/**
1516
* Class DemoCommand
@@ -36,6 +37,9 @@ protected function configure()
3637

3738
/**
3839
* description text by annotation. it is invalid when configure() is exists
40+
* @param Input $input
41+
* @param Output $output
42+
* @return int|void
3943
*/
4044
public function execute($input, $output)
4145
{

0 commit comments

Comments
 (0)