Completed
Pull Request — master (#222)
by Aydin
01:53
created
src/MenuStyle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     protected function calculateContentWidth() : void
347 347
     {
348 348
         $this->contentWidth = $this->width
349
-            - ($this->paddingLeftRight * 2)
349
+            - ($this->paddingLeftRight*2)
350 350
             - ($this->borderRightWidth + $this->borderLeftWidth);
351 351
 
352 352
         if ($this->contentWidth < 0) {
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
 
526 526
     private function calculateMarginAuto(int $width) : void
527 527
     {
528
-        $this->margin = (int) floor(($this->terminal->getWidth() - ($width)) / 2);
528
+        $this->margin = (int) floor(($this->terminal->getWidth() - ($width))/2);
529 529
     }
530 530
 
531 531
     public function setMargin(int $margin) : self
Please login to merge, or discard this patch.
src/CliMenu.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
         $this->radioStyle      = new RadioStyle();
117 117
         $this->selectableStyle = new SelectableStyle();
118 118
 
119
-        $this->terminal->onSignal(SIGWINCH, function () {
119
+        $this->terminal->onSignal(SIGWINCH, function() {
120 120
             $this->style->windowResize();
121 121
 
122 122
             if ($this->isOpen()) {
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
                 : $this->selectedItem++;
359 359
 
360 360
             if ($this->selectedItem !== null && !array_key_exists($this->selectedItem, $this->items)) {
361
-                $this->selectedItem  = $direction === 'UP'
361
+                $this->selectedItem = $direction === 'UP'
362 362
                     ? (int) end($itemKeys)
363 363
                     : (int) reset($itemKeys);
364 364
             }
@@ -528,7 +528,7 @@  discard block
 block discarded – undo
528 528
             $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator())));
529 529
         }
530 530
 
531
-        array_map(function ($item, $index) use ($frame) {
531
+        array_map(function($item, $index) use ($frame) {
532 532
             $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem));
533 533
         }, $this->items, array_keys($this->items));
534 534
 
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
             $borderColour = '';
580 580
         }
581 581
 
582
-        return array_map(function ($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) {
582
+        return array_map(function($row) use ($invertedColoursSetCode, $invertedColoursUnsetCode, $borderColour) {
583 583
             return sprintf(
584 584
                 "%s%s%s%s%s%s%s%s%s%s%s%s\n",
585 585
                 str_repeat(' ', $this->style->getMargin()),
Please login to merge, or discard this patch.