@@ -306,8 +306,8 @@ |
||
306 | 306 | public function setWidth(int $width) : self |
307 | 307 | { |
308 | 308 | $availableWidth = $this->terminal->getWidth() |
309 | - - ($this->margin * 2) |
|
310 | - - ($this->padding * 2) |
|
309 | + - ($this->margin*2) |
|
310 | + - ($this->padding*2) |
|
311 | 311 | - ($this->borderRightWidth + $this->borderLeftWidth); |
312 | 312 | |
313 | 313 | if ($width >= $availableWidth) { |
@@ -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()) { |
@@ -347,7 +347,7 @@ discard block |
||
347 | 347 | $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator()))); |
348 | 348 | } |
349 | 349 | |
350 | - array_map(function ($item, $index) use ($frame) { |
|
350 | + array_map(function($item, $index) use ($frame) { |
|
351 | 351 | $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem)); |
352 | 352 | }, $this->items, array_keys($this->items)); |
353 | 353 | |
@@ -394,7 +394,7 @@ discard block |
||
394 | 394 | $borderColour = ''; |
395 | 395 | } |
396 | 396 | |
397 | - return array_map(function ($row) use ($setColour, $unsetColour, $borderColour) { |
|
397 | + return array_map(function($row) use ($setColour, $unsetColour, $borderColour) { |
|
398 | 398 | return sprintf( |
399 | 399 | "%s%s%s%s%s%s%s%s%s%s%s\n", |
400 | 400 | str_repeat(' ', $this->style->getMargin()), |