@@ -3,16 +3,16 @@ |
||
3 | 3 | use PhpSchool\CliMenu\CliMenu; |
4 | 4 | use PhpSchool\CliMenu\CliMenuBuilder; |
5 | 5 | |
6 | -require_once(__DIR__ . '/../vendor/autoload.php'); |
|
6 | +require_once(__DIR__.'/../vendor/autoload.php'); |
|
7 | 7 | |
8 | -$itemCallable = function (CliMenu $menu) { |
|
8 | +$itemCallable = function(CliMenu $menu) { |
|
9 | 9 | echo $menu->getSelectedItem()->getText(); |
10 | 10 | }; |
11 | 11 | |
12 | 12 | $menu = (new CliMenuBuilder) |
13 | 13 | ->setTitle('Basic CLI Menu') |
14 | 14 | ->addItem('First Item', $itemCallable) |
15 | - ->addItem('Make menu wider', function (CliMenu $menu) { |
|
15 | + ->addItem('Make menu wider', function(CliMenu $menu) { |
|
16 | 16 | $menu->getStyle()->setWidth($menu->getStyle()->getWidth() + 10); |
17 | 17 | $menu->redraw(); |
18 | 18 | }) |
@@ -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 | } |