@@ -191,7 +191,7 @@ discard block |
||
| 191 | 191 | |
| 192 | 192 | private function processItemShortcut(MenuItemInterface $item) : void |
| 193 | 193 | { |
| 194 | - $this->processIndividualShortcut($item, function (CliMenu $menu) use ($item) { |
|
| 194 | + $this->processIndividualShortcut($item, function(CliMenu $menu) use ($item) { |
|
| 195 | 195 | $menu->executeAsSelected($item); |
| 196 | 196 | }); |
| 197 | 197 | } |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | private function processSplitItemShortcuts(SplitItem $splitItem) : void |
| 200 | 200 | { |
| 201 | 201 | foreach ($splitItem->getItems() as $item) { |
| 202 | - $this->processIndividualShortcut($item, function (CliMenu $menu) use ($splitItem, $item) { |
|
| 202 | + $this->processIndividualShortcut($item, function(CliMenu $menu) use ($splitItem, $item) { |
|
| 203 | 203 | $current = $splitItem->getSelectedItemIndex(); |
| 204 | 204 | |
| 205 | 205 | $splitItem->setSelectedItemIndex( |
@@ -430,7 +430,7 @@ discard block |
||
| 430 | 430 | |
| 431 | 431 | private function itemsHaveExtra(array $items) : bool |
| 432 | 432 | { |
| 433 | - return !empty(array_filter($items, function (MenuItemInterface $item) { |
|
| 433 | + return !empty(array_filter($items, function(MenuItemInterface $item) { |
|
| 434 | 434 | return $item->showsItemExtra(); |
| 435 | 435 | })); |
| 436 | 436 | } |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | : $this->selectedItem++; |
| 312 | 312 | |
| 313 | 313 | if ($this->selectedItem !== null && !array_key_exists($this->selectedItem, $this->items)) { |
| 314 | - $this->selectedItem = $direction === 'UP' |
|
| 314 | + $this->selectedItem = $direction === 'UP' |
|
| 315 | 315 | ? (int) end($itemKeys) |
| 316 | 316 | : (int) reset($itemKeys); |
| 317 | 317 | } |
@@ -463,7 +463,7 @@ discard block |
||
| 463 | 463 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | - array_map(function ($item, $index) use ($frame) { |
|
| 466 | + array_map(function($item, $index) use ($frame) { |
|
| 467 | 467 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 468 | 468 | }, $this->items, array_keys($this->items)); |
| 469 | 469 | |
@@ -514,7 +514,7 @@ discard block |
||
| 514 | 514 | $borderColour = ''; |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | - return array_map(function ($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 517 | + return array_map(function($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 518 | 518 | return sprintf( |
| 519 | 519 | "%s%s%s%s%s%s%s%s%s%s%s%s\n", |
| 520 | 520 | str_repeat(' ', $this->style->getMargin()), |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ) |
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | - return array_map(function ($row, $key) use ($style, $length) { |
|
| 48 | + return array_map(function($row, $key) use ($style, $length) { |
|
| 49 | 49 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
| 50 | 50 | |
| 51 | 51 | if ($key === 0) { |