@@ -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); |
@@ -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 |
@@ -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, []] |
@@ -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 | |
@@ -233,7 +233,7 @@ discard block |
||
| 233 | 233 | |
| 234 | 234 | $formatedUsage = (string) preg_replace_callback( |
| 235 | 235 | '~ ## ~', |
| 236 | - function () use (&$lines, $maxLength) { |
|
| 236 | + function() use (&$lines, $maxLength) { |
|
| 237 | 237 | $sizeOfLine = 0; |
| 238 | 238 | $currentLine = array_shift($lines); |
| 239 | 239 | if ($currentLine !== null) { |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | */ |
| 388 | 388 | protected function sortItems(array $items, int &$max = 0): array |
| 389 | 389 | { |
| 390 | - $results = array_map(function ($item) { |
|
| 390 | + $results = array_map(function($item) { |
|
| 391 | 391 | return strlen($this->getName($item)); |
| 392 | 392 | }, $items); |
| 393 | 393 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | $max = max($results); |
| 397 | 397 | } |
| 398 | 398 | |
| 399 | - uasort($items, function (Parameter|Command $a, Parameter|Command $b) { |
|
| 399 | + uasort($items, function(Parameter | Command $a, Parameter | Command $b) { |
|
| 400 | 400 | return $a->getName() <=> $b->getName(); |
| 401 | 401 | }); |
| 402 | 402 | |
@@ -408,7 +408,7 @@ discard block |
||
| 408 | 408 | * @param Parameter|Command $item |
| 409 | 409 | * @return string |
| 410 | 410 | */ |
| 411 | - protected function getName(Parameter|Command $item): string |
|
| 411 | + protected function getName(Parameter | Command $item): string |
|
| 412 | 412 | { |
| 413 | 413 | $name = $item->getName(); |
| 414 | 414 | if ($item instanceof Command) { |