@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | : $this->selectedItem++; |
| 296 | 296 | |
| 297 | 297 | if ($this->selectedItem !== null && !array_key_exists($this->selectedItem, $this->items)) { |
| 298 | - $this->selectedItem = $direction === 'UP' |
|
| 298 | + $this->selectedItem = $direction === 'UP' |
|
| 299 | 299 | ? end($itemKeys) |
| 300 | 300 | : reset($itemKeys); |
| 301 | 301 | } |
@@ -424,7 +424,7 @@ discard block |
||
| 424 | 424 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 425 | 425 | } |
| 426 | 426 | |
| 427 | - array_map(function ($item, $index) use ($frame) { |
|
| 427 | + array_map(function($item, $index) use ($frame) { |
|
| 428 | 428 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 429 | 429 | }, $this->items, array_keys($this->items)); |
| 430 | 430 | |
@@ -475,7 +475,7 @@ discard block |
||
| 475 | 475 | $borderColour = ''; |
| 476 | 476 | } |
| 477 | 477 | |
| 478 | - return array_map(function ($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 478 | + return array_map(function($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) { |
|
| 479 | 479 | return sprintf( |
| 480 | 480 | "%s%s%s%s%s%s%s%s%s%s%s%s\n", |
| 481 | 481 | str_repeat(' ', $this->style->getMargin()), |
@@ -332,7 +332,7 @@ discard block |
||
| 332 | 332 | protected function calculateContentWidth() : void |
| 333 | 333 | { |
| 334 | 334 | $this->contentWidth = $this->width |
| 335 | - - ($this->paddingLeftRight * 2) |
|
| 335 | + - ($this->paddingLeftRight*2) |
|
| 336 | 336 | - ($this->borderRightWidth + $this->borderLeftWidth); |
| 337 | 337 | |
| 338 | 338 | if ($this->contentWidth < 0) { |
@@ -485,7 +485,7 @@ discard block |
||
| 485 | 485 | public function setMarginAuto() : self |
| 486 | 486 | { |
| 487 | 487 | $this->marginAuto = true; |
| 488 | - $this->margin = (int) floor(($this->terminal->getWidth() - $this->width) / 2); |
|
| 488 | + $this->margin = (int) floor(($this->terminal->getWidth() - $this->width)/2); |
|
| 489 | 489 | |
| 490 | 490 | $this->generateBorderRows(); |
| 491 | 491 | $this->generatePaddingTopBottomRows(); |