Completed
Pull Request — master (#100)
by
unknown
04:22 queued 02:38
created
src/MenuStyle.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -2,7 +2,6 @@
 block discarded – undo
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;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
     protected function calculateContentWidth() : void
301 301
     {
302 302
         $this->contentWidth = $this->width
303
-            - ($this->padding * 2)
303
+            - ($this->padding*2)
304 304
             - ($this->borderRightWidth + $this->borderLeftWidth);
305 305
     }
306 306
 
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
     public function setMarginAuto() : self
383 383
     {
384 384
         $this->marginAuto = true;
385
-        $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2);
385
+        $this->margin = floor(($this->terminal->getWidth() - $this->width)/2);
386 386
 
387 387
         $this->generateBorderRows();
388 388
 
Please login to merge, or discard this patch.
examples/basic-centered.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,16 +3,16 @@
 block discarded – undo
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
     })
Please login to merge, or discard this patch.