@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | string $header = '', |
| 180 | 180 | string $footer = '' |
| 181 | 181 | ): self { |
| 182 | - $this->maxCommandWidth = !empty($items) ? max(array_map(function (Command $item) { |
|
| 182 | + $this->maxCommandWidth = !empty($items) ? max(array_map(function(Command $item) { |
|
| 183 | 183 | return strlen($item->getName()); |
| 184 | 184 | }, $items)) : 0; |
| 185 | 185 | |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | $maxLength = (int) max($lines) + 4; |
| 232 | 232 | $formatedUsage = (string) preg_replace_callback( |
| 233 | 233 | '~ ## ~', |
| 234 | - function () use (&$lines, $maxLength) { |
|
| 234 | + function() use (&$lines, $maxLength) { |
|
| 235 | 235 | $sizeOfLine = 0; |
| 236 | 236 | $currentLine = array_shift($lines); |
| 237 | 237 | if ($currentLine !== null) { |
@@ -387,11 +387,11 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | protected function sortItems(array $items, int &$max = 0): array |
| 389 | 389 | { |
| 390 | - $max = max(array_map(function ($item) { |
|
| 390 | + $max = max(array_map(function($item) { |
|
| 391 | 391 | return strlen($this->getName($item)); |
| 392 | 392 | }, $items)); |
| 393 | 393 | |
| 394 | - uasort($items, function ($a, $b) { |
|
| 394 | + uasort($items, function($a, $b) { |
|
| 395 | 395 | /* @var Parameter $b */ |
| 396 | 396 | /* @var Parameter $a */ |
| 397 | 397 | return $a->getName() <=> $b->getName(); |
@@ -220,7 +220,7 @@ discard block |
||
| 220 | 220 | { |
| 221 | 221 | $value = null; |
| 222 | 222 | if ($nextArg !== null && substr($nextArg, 0, 1) !== '-') { |
| 223 | - $value = $nextArg; |
|
| 223 | + $value = $nextArg; |
|
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | $option = $this->getOptionForArgument($arg); |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | /** @var array<Parameter> $missingItems */ |
| 297 | 297 | $missingItems = array_filter( |
| 298 | 298 | $this->options + $this->arguments, |
| 299 | - function ($item) { |
|
| 299 | + function($item) { |
|
| 300 | 300 | /** @var Parameter $item */ |
| 301 | 301 | return $item->isRequired() && in_array( |
| 302 | 302 | $this->values[$item->getAttributeName()], |
@@ -124,7 +124,7 @@ |
||
| 124 | 124 | $this->name = $name; |
| 125 | 125 | $this->version = $version; |
| 126 | 126 | |
| 127 | - $this->onExit = $onExit ? $onExit : function (int $exitCode = 0) { |
|
| 127 | + $this->onExit = $onExit ? $onExit : function(int $exitCode = 0) { |
|
| 128 | 128 | //@codeCoverageIgnoreStart |
| 129 | 129 | exit($exitCode); |
| 130 | 130 | //@codeCoverageIgnoreEnd |
@@ -584,13 +584,13 @@ |
||
| 584 | 584 | ->on([$this, 'showVersion']); |
| 585 | 585 | |
| 586 | 586 | $this->addOption('-V|--verbosity', 'Verbosity level', 0) |
| 587 | - ->on(function () { |
|
| 587 | + ->on(function() { |
|
| 588 | 588 | $this->set('verbosity', ++$this->verbosity); |
| 589 | 589 | |
| 590 | 590 | return false; |
| 591 | 591 | }); |
| 592 | 592 | |
| 593 | - $this->onExit(function (int $exitCode = 0) { |
|
| 593 | + $this->onExit(function(int $exitCode = 0) { |
|
| 594 | 594 | $this->terminate($exitCode); |
| 595 | 595 | }); |
| 596 | 596 | |