@@ -182,7 +182,7 @@ |
||
182 | 182 | $argv += [null, null, null]; |
183 | 183 | |
184 | 184 | return |
185 | - // cmd |
|
185 | + // cmd |
|
186 | 186 | $this->commands[$argv[1]] |
187 | 187 | // cmd alias |
188 | 188 | ?? $this->commands[$this->aliases[$argv[1]] ?? null] |
@@ -45,7 +45,7 @@ |
||
45 | 45 | $this->version = $version; |
46 | 46 | |
47 | 47 | // @codeCoverageIgnoreStart |
48 | - $this->onExit = $onExit ?? function ($exitCode = 0) { |
|
48 | + $this->onExit = $onExit ?? function($exitCode = 0) { |
|
49 | 49 | exit($exitCode); |
50 | 50 | }; |
51 | 51 | // @codeCoverageIgnoreEnd |
@@ -74,14 +74,14 @@ |
||
74 | 74 | { |
75 | 75 | $this->option('-h, --help', 'Show help')->on([$this, 'showHelp']); |
76 | 76 | $this->option('-V, --version', 'Show version')->on([$this, 'showVersion']); |
77 | - $this->option('-v, --verbosity', 'Verbosity level', null, 0)->on(function () { |
|
77 | + $this->option('-v, --verbosity', 'Verbosity level', null, 0)->on(function() { |
|
78 | 78 | $this->set('verbosity', ($this->verbosity ?? 0) + 1); |
79 | 79 | |
80 | 80 | return false; |
81 | 81 | }); |
82 | 82 | |
83 | 83 | // @codeCoverageIgnoreStart |
84 | - $this->onExit(function ($exitCode = 0) { |
|
84 | + $this->onExit(function($exitCode = 0) { |
|
85 | 85 | exit($exitCode); |
86 | 86 | }); |
87 | 87 | // @codeCoverageIgnoreEnd |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | { |
106 | 106 | $value = \substr($nextArg, 0, 1) === '-' ? null : $nextArg; |
107 | 107 | |
108 | - if (null === $option = $this->optionFor($arg)) { |
|
108 | + if (null === $option = $this->optionFor($arg)) { |
|
109 | 109 | return $this->handleUnknown($arg, $value); |
110 | 110 | } |
111 | 111 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | protected function validate() |
201 | 201 | { |
202 | 202 | /** @var Parameter[] $missingItems */ |
203 | - $missingItems = \array_filter($this->_options + $this->_arguments, function ($item) { |
|
203 | + $missingItems = \array_filter($this->_options + $this->_arguments, function($item) { |
|
204 | 204 | /* @var Parameter $item */ |
205 | 205 | return $item->required() && \in_array($this->_values[$item->attributeName()], [null, []]); |
206 | 206 | }); |
@@ -117,7 +117,7 @@ |
||
117 | 117 | $first = reset($items); |
118 | 118 | $max = \strlen($first->name()); |
119 | 119 | |
120 | - \uasort($items, function ($a, $b) use (&$max) { |
|
120 | + \uasort($items, function($a, $b) use (&$max) { |
|
121 | 121 | /** @var Parameter $b */ |
122 | 122 | /** @var Parameter $a */ |
123 | 123 | $max = \max(\strlen($this->getName($a)), \strlen($this->getName($b)), $max); |