File tree Expand file tree Collapse file tree 12 files changed +45
-26
lines changed Expand file tree Collapse file tree 12 files changed +45
-26
lines changed Original file line number Diff line number Diff line change 1+ language : php
2+
3+ php :
4+ - 7.1
5+ - 7.2
6+ - 7.3
7+
8+ # matrix:
9+ # include:
10+ # - php: 7.2
11+ # env: ANALYSIS='true'
12+
13+ before_script :
14+ - composer require php-coveralls/php-coveralls:^2.1.0
15+
16+ script :
17+ - phpunit --coverage-clover clover.xml
18+
19+ after_success :
20+ - vendor/bin/php-coveralls --coverage_clover=clover.xml --json_path=coveralls-upload.json -v
Original file line number Diff line number Diff line change 66 * Time: 18:37
77 */
88
9- namespace Inhere \Console \ Base ;
9+ namespace Inhere \Console ;
1010
1111use Inhere \Console \BuiltIn \ErrorHandler ;
12+ use Inhere \Console \Face \ApplicationInterface ;
1213use Inhere \Console \Face \CommandInterface ;
1314use Inhere \Console \Face \ErrorHandlerInterface ;
1415use Inhere \Console \IO \Input ;
2021use Inhere \Console \Components \Style \Style ;
2122use Inhere \Console \Utils \FormatUtil ;
2223use Inhere \Console \Utils \Helper ;
23- use Toolkit \Cli \Highlighter ;
2424
2525/**
2626 * Class AbstractApplication
Original file line number Diff line number Diff line change 66 * Time: 11:40
77 */
88
9- namespace Inhere \Console \ Base ;
9+ namespace Inhere \Console ;
1010
11- use Inhere \Console \Application ;
11+ use Inhere \Console \Face \ BaseCommandInterface ;
1212use Inhere \Console \Face \CommandInterface ;
1313use Inhere \Console \IO \Input ;
1414use Inhere \Console \IO \InputDefinition ;
Original file line number Diff line number Diff line change 88
99namespace Inhere \Console ;
1010
11- use Inhere \Console \Base \ AbstractApplication ;
11+ use Inhere \Console \AbstractApplication ;
1212use Inhere \Console \Utils \Helper ;
1313
1414/**
Original file line number Diff line number Diff line change 88
99namespace Inhere \Console \BuiltIn ;
1010
11- use Inhere \Console \Base \ AbstractApplication ;
11+ use Inhere \Console \AbstractApplication ;
1212use Inhere \Console \Face \ErrorHandlerInterface ;
1313use Toolkit \Cli \Highlighter ;
1414
Original file line number Diff line number Diff line change 88
99namespace Inhere \Console ;
1010
11- use Inhere \Console \Base \ AbstractCommand ;
11+ use Inhere \Console \AbstractCommand ;
1212use Inhere \Console \Face \CommandInterface ;
1313
1414/**
Original file line number Diff line number Diff line change 88
99namespace Inhere \Console ;
1010
11- use Inhere \Console \Base \ AbstractCommand ;
12- use Inhere \Console \Base \ControllerInterface ;
11+ use Inhere \Console \AbstractCommand ;
12+ use Inhere \Console \Face \ControllerInterface ;
1313use Inhere \Console \IO \Input ;
1414use Inhere \Console \IO \Output ;
1515use Inhere \Console \Utils \FormatUtil ;
Original file line number Diff line number Diff line change 66 * Time: 16:51
77 */
88
9- namespace Inhere \Console \Base ;
9+ namespace Inhere \Console \Face ;
1010
1111/**
1212 * Interface ApplicationInterface
1515interface ApplicationInterface
1616{
1717 // event name list
18- const ON_BEFORE_RUN = 'beforeRun ' ;
19- const ON_AFTER_RUN = 'afterRun ' ;
20- const ON_RUN_ERROR = 'runError ' ;
21- const ON_STOP_RUN = 'stopRun ' ;
22- const ON_NOT_FOUND = 'notFound ' ;
18+ public const ON_BEFORE_RUN = 'app. beforeRun ' ;
19+ public const ON_AFTER_RUN = 'app. afterRun ' ;
20+ public const ON_RUN_ERROR = 'app. runError ' ;
21+ public const ON_STOP_RUN = 'app. stopRun ' ;
22+ public const ON_NOT_FOUND = 'app. notFound ' ;
2323
2424 /**
2525 * @param bool $exit
Original file line number Diff line number Diff line change 66 * Time: 18:57
77 */
88
9- namespace Inhere \Console \Base ;
9+ namespace Inhere \Console \Face ;
1010
11+ use Inhere \Console \AbstractApplication ;
1112use Inhere \Console \IO \InputDefinition ;
1213
1314/**
1415 * Interface BaseCommandInterface
15- * @package Inhere\Console\Base
16+ * @package Inhere\Console\Face
1617 */
1718interface BaseCommandInterface
1819{
19- const OK = 0 ;
20- const ERR = 2 ;
20+ public const OK = 0 ;
21+ public const ERR = 2 ;
2122
2223 // name -> {name}
23- const ANNOTATION_VAR = '{%s} ' ; // '{$%s}';
24+ public const ANNOTATION_VAR = '{%s} ' ; // '{$%s}';
2425
2526 /**
2627 * run command
@@ -35,7 +36,7 @@ public function run(string $command = ''): int;
3536 public function getDefinition ();
3637
3738 /**
38- * @return AbstractApplication
39+ * @return AbstractApplication|ApplicationInterface
3940 */
4041 public function getApp (): AbstractApplication ;
4142
Original file line number Diff line number Diff line change 88
99namespace Inhere \Console \Face ;
1010
11- use Inhere \Console \Base \BaseCommandInterface ;
12-
1311/**
1412 * Interface CommandInterface
1513 * @package Inhere\Console\Face
You can’t perform that action at this time.
0 commit comments