@@ -77,7 +77,7 @@ |
||
| 77 | 77 | */ |
| 78 | 78 | public function getRows(MenuStyle $style, bool $selected = false) : array |
| 79 | 79 | { |
| 80 | - $rows = array_map(function ($row) use ($style) { |
|
| 80 | + $rows = array_map(function($row) use ($style) { |
|
| 81 | 81 | $length = mb_strlen($row); |
| 82 | 82 | |
| 83 | 83 | $padding = $style->getContentWidth() - $length; |
@@ -78,7 +78,7 @@ |
||
| 78 | 78 | |
| 79 | 79 | $this->numberOfRows = count($rows); |
| 80 | 80 | |
| 81 | - return array_map(function ($row, $key) use ($style, $length) { |
|
| 81 | + return array_map(function($row, $key) use ($style, $length) { |
|
| 82 | 82 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
| 83 | 83 | |
| 84 | 84 | if ($key === 0) { |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | : $this->selectedItem++; |
| 193 | 193 | |
| 194 | 194 | if (!array_key_exists($this->selectedItem, $this->items)) { |
| 195 | - $this->selectedItem = $direction === 'up' |
|
| 195 | + $this->selectedItem = $direction === 'up' |
|
| 196 | 196 | ? end($itemKeys) |
| 197 | 197 | : reset($itemKeys); |
| 198 | 198 | } elseif ($this->getSelectedItem()->canSelect()) { |
@@ -247,7 +247,7 @@ discard block |
||
| 247 | 247 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 248 | 248 | } |
| 249 | 249 | |
| 250 | - array_map(function ($item, $index) use ($frame) { |
|
| 250 | + array_map(function($item, $index) use ($frame) { |
|
| 251 | 251 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 252 | 252 | }, $this->items, array_keys($this->items)); |
| 253 | 253 | |
@@ -296,7 +296,7 @@ discard block |
||
| 296 | 296 | ? $this->style->getSelectedUnsetCode() |
| 297 | 297 | : $this->style->getUnselectedUnsetCode(); |
| 298 | 298 | |
| 299 | - $rows = array_map(function ($row) use ($setColour, $unsetColour) { |
|
| 299 | + $rows = array_map(function($row) use ($setColour, $unsetColour) { |
|
| 300 | 300 | return sprintf( |
| 301 | 301 | "%s%s%s%s%s%s%s\n\r", |
| 302 | 302 | str_repeat(' ', $this->style->getMargin()), |
@@ -309,9 +309,9 @@ discard block |
||
| 309 | 309 | ); |
| 310 | 310 | }, $rows); |
| 311 | 311 | |
| 312 | - $item->setNumberOfRows( count( $rows ) ); |
|
| 312 | + $item->setNumberOfRows(count($rows)); |
|
| 313 | 313 | |
| 314 | - return array( $rows, $item ); |
|
| 314 | + return array($rows, $item); |
|
| 315 | 315 | } |
| 316 | 316 | |
| 317 | 317 | /** |