@@ -287,7 +287,7 @@ discard block |
||
| 287 | 287 | protected function calculateContentWidth() : void |
| 288 | 288 | { |
| 289 | 289 | $this->contentWidth = $this->width |
| 290 | - - ($this->padding * 2) |
|
| 290 | + - ($this->padding*2) |
|
| 291 | 291 | - ($this->borderRightWidth + $this->borderLeftWidth); |
| 292 | 292 | } |
| 293 | 293 | |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | public function setMarginAuto() : self |
| 368 | 368 | { |
| 369 | 369 | $this->marginAuto = true; |
| 370 | - $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2); |
|
| 370 | + $this->margin = floor(($this->terminal->getWidth() - $this->width)/2); |
|
| 371 | 371 | |
| 372 | 372 | return $this; |
| 373 | 373 | } |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | : $this->selectedItem++; |
| 269 | 269 | |
| 270 | 270 | if (!array_key_exists($this->selectedItem, $this->items)) { |
| 271 | - $this->selectedItem = $direction === 'UP' |
|
| 271 | + $this->selectedItem = $direction === 'UP' |
|
| 272 | 272 | ? end($itemKeys) |
| 273 | 273 | : reset($itemKeys); |
| 274 | 274 | } elseif ($this->getSelectedItem()->canSelect()) { |
@@ -330,14 +330,14 @@ discard block |
||
| 330 | 330 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
| 331 | 331 | } |
| 332 | 332 | |
| 333 | - array_map(function ($item, $index) use ($frame) { |
|
| 333 | + array_map(function($item, $index) use ($frame) { |
|
| 334 | 334 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
| 335 | 335 | }, $this->items, array_keys($this->items)); |
| 336 | 336 | |
| 337 | 337 | $frame->addRows($this->drawMenuItem(new LineBreakItem())); |
| 338 | 338 | |
| 339 | 339 | if ($this->style->getBorderBottomWidth() > 0) { |
| 340 | - $frame->addRows($this->style>getBorderBottomRows()); |
|
| 340 | + $frame->addRows($this->style > getBorderBottomRows()); |
|
| 341 | 341 | } |
| 342 | 342 | |
| 343 | 343 | $frame->newLine(2); |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | $borderColour = ''; |
| 374 | 374 | } |
| 375 | 375 | |
| 376 | - return array_map(function ($row) use ($setColour, $invertedColour, $resetColour, $borderColour) { |
|
| 376 | + return array_map(function($row) use ($setColour, $invertedColour, $resetColour, $borderColour) { |
|
| 377 | 377 | return sprintf( |
| 378 | 378 | "%s%s%s%s%s%s%s%s%s%s%s%s\n", |
| 379 | 379 | str_repeat(' ', $this->style->getMargin()), |