@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace PhpSchool\CliMenu; |
4 | 4 | |
5 | -use PhpSchool\CliMenu\Exception\InvalidInstantiationException; |
|
6 | 5 | use PhpSchool\CliMenu\Terminal\TerminalFactory; |
7 | 6 | use PhpSchool\CliMenu\Util\ColourUtil; |
8 | 7 | use PhpSchool\Terminal\Terminal; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | protected function calculateContentWidth() : void |
253 | 253 | { |
254 | - $this->contentWidth = $this->width - ($this->padding * 2); |
|
254 | + $this->contentWidth = $this->width - ($this->padding*2); |
|
255 | 255 | } |
256 | 256 | |
257 | 257 | public function getFg() |
@@ -330,7 +330,7 @@ discard block |
||
330 | 330 | public function setMarginAuto() : self |
331 | 331 | { |
332 | 332 | $this->marginAuto = true; |
333 | - $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2); |
|
333 | + $this->margin = floor(($this->terminal->getWidth() - $this->width)/2); |
|
334 | 334 | |
335 | 335 | return $this; |
336 | 336 | } |
@@ -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 | }) |