@@ -57,8 +57,7 @@ discard block |
||
57 | 57 | * @class Interactor |
58 | 58 | * @package Platine\Console\IO |
59 | 59 | */ |
60 | -class Interactor |
|
61 | -{ |
|
60 | +class Interactor { |
|
62 | 61 | /** |
63 | 62 | * Stream reader instance |
64 | 63 | * @var Reader |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | * @param string|null $input |
77 | 76 | * @param string|null $output |
78 | 77 | */ |
79 | - public function __construct(?string $input = null, ?string $output = null) |
|
80 | - { |
|
78 | + public function __construct(?string $input = null, ?string $output = null) { |
|
81 | 79 | $this->reader = new Reader($input); |
82 | 80 | $this->writer = new Writer($output); |
83 | 81 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * @class Cursor |
53 | 53 | * @package Platine\Console\Output |
54 | 54 | */ |
55 | -class Cursor |
|
56 | -{ |
|
55 | +class Cursor { |
|
57 | 56 | /** |
58 | 57 | * Returns signal to move cursor up "count" times. |
59 | 58 | * @param int $count |
@@ -55,8 +55,7 @@ |
||
55 | 55 | * @class Table |
56 | 56 | * @package Platine\Console\Output |
57 | 57 | */ |
58 | -class Table |
|
59 | -{ |
|
58 | +class Table { |
|
60 | 59 | /** |
61 | 60 | * Render table data |
62 | 61 | * @param array<int, array<int, array<string, string>>> $rows |
@@ -803,7 +803,7 @@ |
||
803 | 803 | * @param array<int, mixed> $args |
804 | 804 | * @return $this|string |
805 | 805 | */ |
806 | - public function __call(string $method, array $args = []): self|string |
|
806 | + public function __call(string $method, array $args = []): self | string |
|
807 | 807 | { |
808 | 808 | if (method_exists($this->cursor, $method)) { |
809 | 809 | return $this->cursor->{$method}(...$args); |
@@ -609,8 +609,7 @@ discard block |
||
609 | 609 | * @method Writer darkgrayBgWhite(string $text, bool $eol = false) |
610 | 610 | * @method Writer darkgrayBgGray(string $text, bool $eol = false) |
611 | 611 | */ |
612 | -class Writer |
|
613 | -{ |
|
612 | +class Writer { |
|
614 | 613 | /** |
615 | 614 | * The output stream |
616 | 615 | * @var resource |
@@ -646,8 +645,7 @@ discard block |
||
646 | 645 | * @param string|null $path the output write path |
647 | 646 | * @param Color|null $color the color instance |
648 | 647 | */ |
649 | - public function __construct(?string $path = null, ?Color $color = null) |
|
650 | - { |
|
648 | + public function __construct(?string $path = null, ?Color $color = null) { |
|
651 | 649 | $stream = null; |
652 | 650 | if ($path !== null) { |
653 | 651 | $stream = fopen($path, 'w'); |
@@ -609,8 +609,7 @@ |
||
609 | 609 | * @method string darkgrayBgWhite(string $text) |
610 | 610 | * @method string darkgrayBgGray(string $text) |
611 | 611 | */ |
612 | -class Color |
|
613 | -{ |
|
612 | +class Color { |
|
614 | 613 | /** |
615 | 614 | * The color constants |
616 | 615 | */ |
@@ -123,7 +123,7 @@ |
||
123 | 123 | $this->name = $name; |
124 | 124 | $this->version = $version; |
125 | 125 | |
126 | - $this->onExit = $onExit ?? function (int $exitCode = 0) { |
|
126 | + $this->onExit = $onExit ?? function(int $exitCode = 0) { |
|
127 | 127 | //@codeCoverageIgnoreStart |
128 | 128 | exit($exitCode); |
129 | 129 | //@codeCoverageIgnoreEnd |
@@ -59,8 +59,7 @@ discard block |
||
59 | 59 | * @class Application |
60 | 60 | * @package Platine\Console |
61 | 61 | */ |
62 | -class Application |
|
63 | -{ |
|
62 | +class Application { |
|
64 | 63 | /** |
65 | 64 | * List of commands |
66 | 65 | * @var Command[] |
@@ -339,8 +338,7 @@ discard block |
||
339 | 338 | * @param array<int, string> $argv |
340 | 339 | * @return mixed |
341 | 340 | */ |
342 | - public function handle(array $argv) |
|
343 | - { |
|
341 | + public function handle(array $argv) { |
|
344 | 342 | if (count($argv) < 2) { |
345 | 343 | return $this->showHelp(); |
346 | 344 | } |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * @class Option |
53 | 53 | * @package Platine\Console\Input |
54 | 54 | */ |
55 | -class Option extends Parameter |
|
56 | -{ |
|
55 | +class Option extends Parameter { |
|
57 | 56 | /** |
58 | 57 | * The short option name |
59 | 58 | * @var string |
@@ -221,7 +221,7 @@ discard block |
||
221 | 221 | { |
222 | 222 | $value = null; |
223 | 223 | if ($nextArg !== null && substr($nextArg, 0, 1) !== '-') { |
224 | - $value = $nextArg; |
|
224 | + $value = $nextArg; |
|
225 | 225 | } |
226 | 226 | |
227 | 227 | $option = $this->getOptionForArgument($arg); |
@@ -300,7 +300,7 @@ discard block |
||
300 | 300 | /** @var Parameter[] $missingItems */ |
301 | 301 | $missingItems = array_filter( |
302 | 302 | $this->options + $this->arguments, |
303 | - function (Parameter $item) { |
|
303 | + function(Parameter $item) { |
|
304 | 304 | return $item->isRequired() && in_array( |
305 | 305 | $this->values[$item->getAttributeName()], |
306 | 306 | [null, []] |
@@ -56,8 +56,7 @@ |
||
56 | 56 | * @class Parser |
57 | 57 | * @package Platine\Console\Input |
58 | 58 | */ |
59 | -abstract class Parser |
|
60 | -{ |
|
59 | +abstract class Parser { |
|
61 | 60 | /** |
62 | 61 | * The last seen variadic option name |
63 | 62 | * @var string|null |
@@ -52,8 +52,7 @@ |
||
52 | 52 | * @class Argument |
53 | 53 | * @package Platine\Console\Input |
54 | 54 | */ |
55 | -class Argument extends Parameter |
|
56 | -{ |
|
55 | +class Argument extends Parameter { |
|
57 | 56 | /** |
58 | 57 | * {@inheritdoc} |
59 | 58 | */ |