Skip to content

Commit df9164c

Browse files
committed
refact: refacting some logic, begin v4 develop
1 parent 6b5096b commit df9164c

24 files changed

+83
-518
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
language: php
22

33
php:
4-
- '7.1'
4+
# - '7.1'
55
- '7.2'
66
- '7.3'
7+
- '7.4'
78

89
#matrix:
910
# include:

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# CHANGELOG
22

3+
## v4.0.x
4+
5+
> begin at: 2020.08.21
6+
7+
38
## v3.0.x
49

510
> publish at: 2019.01.03

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PHP console
22

33
[![License](https://img.shields.io/packagist/l/inhere/console.svg?style=flat-square)](LICENSE)
4-
[![Php Version](https://img.shields.io/badge/php-%3E=7.1.0-brightgreen.svg?maxAge=2592000)](https://packagist.org/packages/inhere/console)
4+
[![Php Version](https://img.shields.io/badge/php-%3E=7.3.0-brightgreen.svg?maxAge=2592000)](https://packagist.org/packages/inhere/console)
55
[![Latest Stable Version](http://img.shields.io/packagist/v/inhere/console.svg)](https://packagist.org/packages/inhere/console)
66

77
A simple, full-featured php command line application library.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">7.1.0",
25+
"php": ">7.3.0",
2626
"toolkit/cli-utils": "~1.0",
2727
"toolkit/stdlib": "~1.0",
2828
"toolkit/sys-utils": "~1.0"
2929
},
3030
"require-dev": {
31-
"phpunit/phpunit": "^7.5"
31+
"phpunit/phpunit": "~9.1"
3232
},
3333
"autoload": {
3434
"psr-4": {

src/AbstractApplication.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
use Inhere\Console\IO\Input;
1717
use Inhere\Console\IO\Output;
1818
use Inhere\Console\Contract\OutputInterface;
19-
use Inhere\Console\Traits\ApplicationHelpTrait;
20-
use Inhere\Console\Traits\InputOutputAwareTrait;
21-
use Inhere\Console\Traits\SimpleEventTrait;
19+
use Inhere\Console\Concern\ApplicationHelpTrait;
20+
use Inhere\Console\Concern\InputOutputAwareTrait;
21+
use Inhere\Console\Concern\SimpleEventTrait;
2222
use InvalidArgumentException;
2323
use Throwable;
2424
use Toolkit\Cli\Style;

src/AbstractHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
use Inhere\Console\IO\Input;
1414
use Inhere\Console\IO\InputDefinition;
1515
use Inhere\Console\IO\Output;
16-
use Inhere\Console\Traits\InputOutputAwareTrait;
17-
use Inhere\Console\Traits\UserInteractAwareTrait;
16+
use Inhere\Console\Concern\InputOutputAwareTrait;
17+
use Inhere\Console\Concern\UserInteractAwareTrait;
1818
use Inhere\Console\Util\FormatUtil;
1919
use Inhere\Console\Util\Helper;
2020
use InvalidArgumentException;

src/Component/Formatter/Alert.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,29 @@
1717
*/
1818
class Alert extends MessageFormatter
1919
{
20+
public const THEMES = [
21+
'default' => '<{@style}>{@message}</{@style}>',
22+
'theme1' => '<{@style}>[{@type}] {@message}</{@style}>',
23+
'lite' => '[<{@style}>{@type}</{@style}>] {@message}',
24+
];
25+
26+
public static function simple(string $message, string $style = 'info', array $opts = []): void
27+
{
28+
}
29+
30+
public static function block(string $message, string $style = 'info', array $opts = []): void
31+
{
32+
$opts = array_merge([
33+
'paddingX' => 1, // line
34+
'paddingY' => 1, // space
35+
36+
'icon' => '',
37+
'theme' => 'default',
38+
'template' => ''
39+
], $opts);
40+
}
41+
42+
public static function lite(string $message, string $style = 'info'): void
43+
{
44+
}
2045
}

src/Component/Style/Alert.php

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)