@@ -100,9 +100,9 @@ discard block |
||
| 100 | 100 | } |
| 101 | 101 | |
| 102 | 102 | $length = $style->getDisplaysExtra() |
| 103 | - ? floor(($style->getContentWidth() - mb_strlen($style->getItemExtra()) + 2) / $numberOfItems) - $this->margin |
|
| 104 | - : floor($style->getContentWidth() / $numberOfItems) - $this->margin; |
|
| 105 | - $missingLength = $style->getContentWidth() % $numberOfItems; |
|
| 103 | + ? floor(($style->getContentWidth() - mb_strlen($style->getItemExtra()) + 2)/$numberOfItems) - $this->margin |
|
| 104 | + : floor($style->getContentWidth()/$numberOfItems) - $this->margin; |
|
| 105 | + $missingLength = $style->getContentWidth()%$numberOfItems; |
|
| 106 | 106 | |
| 107 | 107 | $lines = 0; |
| 108 | 108 | $cells = []; |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | sprintf('%s%s', $marker, $item->getText()), |
| 114 | 114 | $length |
| 115 | 115 | ); |
| 116 | - $cell = array_map(function ($row) use ($index, $length, $style, $isSelected) { |
|
| 116 | + $cell = array_map(function($row) use ($index, $length, $style, $isSelected) { |
|
| 117 | 117 | $invertedColoursSetCode = $isSelected |
| 118 | 118 | ? $style->getInvertedColoursSetCode() |
| 119 | 119 | : ''; |
@@ -283,7 +283,7 @@ discard block |
||
| 283 | 283 | : $this->selectedItem++; |
| 284 | 284 | |
| 285 | 285 | if (!array_key_exists($this->selectedItem, $this->items)) { |
| 286 | - $this->selectedItem = $direction === 'UP' |
|
| 286 | + $this->selectedItem = $direction === 'UP' |
|
| 287 | 287 | ? end($itemKeys) |
| 288 | 288 | : reset($itemKeys); |
| 289 | 289 | } elseif ($this->getSelectedItem()->canSelect()) { |
@@ -387,7 +387,7 @@ discard block |
||
| 387 | 387 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 388 | 388 | } |
| 389 | 389 | |
| 390 | - array_map(function ($item, $index) use ($frame) { |
|
| 390 | + array_map(function($item, $index) use ($frame) { |
|
| 391 | 391 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 392 | 392 | }, $this->items, array_keys($this->items)); |
| 393 | 393 | |
@@ -438,7 +438,7 @@ discard block |
||
| 438 | 438 | $borderColour = ''; |
| 439 | 439 | } |
| 440 | 440 | |
| 441 | - return array_map(function ($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 441 | + return array_map(function($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 442 | 442 | return sprintf( |
| 443 | 443 | "%s%s%s%s%s%s%s%s%s%s%s%s\n", |
| 444 | 444 | str_repeat(' ', $this->style->getMargin()), |