@@ -215,7 +215,7 @@ discard block |
||
| 215 | 215 | : $this->selectedItem++; |
| 216 | 216 | |
| 217 | 217 | if (!array_key_exists($this->selectedItem, $this->items)) { |
| 218 | - $this->selectedItem = $direction === 'up' |
|
| 218 | + $this->selectedItem = $direction === 'up' |
|
| 219 | 219 | ? end($itemKeys) |
| 220 | 220 | : reset($itemKeys); |
| 221 | 221 | } elseif ($this->getSelectedItem()->canSelect()) { |
@@ -275,7 +275,7 @@ discard block |
||
| 275 | 275 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 276 | 276 | } |
| 277 | 277 | |
| 278 | - array_map(function ($item, $index) use ($frame) { |
|
| 278 | + array_map(function($item, $index) use ($frame) { |
|
| 279 | 279 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 280 | 280 | }, $this->items, array_keys($this->items)); |
| 281 | 281 | |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | ? $this->style->getSelectedUnsetCode() |
| 310 | 310 | : $this->style->getUnselectedUnsetCode(); |
| 311 | 311 | |
| 312 | - return array_map(function ($row) use ($setColour, $unsetColour) { |
|
| 312 | + return array_map(function($row) use ($setColour, $unsetColour) { |
|
| 313 | 313 | return sprintf( |
| 314 | 314 | "%s%s%s%s%s%s%s\n\r", |
| 315 | 315 | str_repeat(' ', $this->style->getMargin()), |
@@ -75,12 +75,12 @@ |
||
| 75 | 75 | { |
| 76 | 76 | //y |
| 77 | 77 | $textLines = count(explode("\n", $this->text)) + 2; |
| 78 | - $this->y = ceil($this->parentMenu->getCurrentFrame()->count() / 2) - ceil($textLines / 2) + 1; |
|
| 78 | + $this->y = ceil($this->parentMenu->getCurrentFrame()->count()/2) - ceil($textLines/2) + 1; |
|
| 79 | 79 | |
| 80 | 80 | //x |
| 81 | 81 | $parentStyle = $this->parentMenu->getStyle(); |
| 82 | - $dialogueHalfLength = (mb_strlen($this->text) + ($this->style->getPadding() * 2)) / 2; |
|
| 83 | - $widthHalfLength = ceil($parentStyle->getWidth() / 2); |
|
| 82 | + $dialogueHalfLength = (mb_strlen($this->text) + ($this->style->getPadding()*2))/2; |
|
| 83 | + $widthHalfLength = ceil($parentStyle->getWidth()/2); |
|
| 84 | 84 | $this->x = $widthHalfLength - $dialogueHalfLength; |
| 85 | 85 | } |
| 86 | 86 | |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | $this->emptyRow(); |
| 36 | 36 | |
| 37 | 37 | $confirmText = sprintf(' < %s > ', $confirmText); |
| 38 | - $leftFill = ($promptWidth / 2) - (mb_strlen($confirmText) / 2); |
|
| 38 | + $leftFill = ($promptWidth/2) - (mb_strlen($confirmText)/2); |
|
| 39 | 39 | |
| 40 | 40 | $this->write(sprintf( |
| 41 | 41 | '%s%s%s', |
@@ -404,7 +404,7 @@ discard block |
||
| 404 | 404 | */ |
| 405 | 405 | private function itemsHaveExtra(array $items) |
| 406 | 406 | { |
| 407 | - return !empty(array_filter($items, function (MenuItemInterface $item) { |
|
| 407 | + return !empty(array_filter($items, function(MenuItemInterface $item) { |
|
| 408 | 408 | return $item->showsItemExtra(); |
| 409 | 409 | })); |
| 410 | 410 | } |
@@ -481,7 +481,7 @@ discard block |
||
| 481 | 481 | */ |
| 482 | 482 | private function buildSubMenus(array $items) |
| 483 | 483 | { |
| 484 | - return array_map(function ($item) { |
|
| 484 | + return array_map(function($item) { |
|
| 485 | 485 | if (!is_string($item)) { |
| 486 | 486 | return $item; |
| 487 | 487 | } |