Completed
Push — master ( 06534f...3f2ab1 )
by Aydin
11s
created
src/CliMenu.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
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()) {
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
             $frame->addRows($this->drawMenuItem(new LineBreakItem($this->style->getTitleSeparator())));
327 327
         }
328 328
 
329
-        array_map(function ($item, $index) use ($frame) {
329
+        array_map(function($item, $index) use ($frame) {
330 330
             $frame->addRows($this->drawMenuItem($item, $index === $this->selectedItem));
331 331
         }, $this->items, array_keys($this->items));
332 332
 
@@ -359,7 +359,7 @@  discard block
 block discarded – undo
359 359
             ? $this->style->getInvertedColoursSetCode()
360 360
             : '';
361 361
 
362
-        return array_map(function ($row) use ($setColour, $invertedColour, $resetColour) {
362
+        return array_map(function($row) use ($setColour, $invertedColour, $resetColour) {
363 363
             return sprintf(
364 364
                 "%s%s%s%s%s%s%s%s\n",
365 365
                 str_repeat(' ', $this->style->getMargin()),
Please login to merge, or discard this patch.
src/Dialogue/Confirm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
         $this->emptyRow();
37 37
 
38 38
         $confirmText = sprintf(' < %s > ', $confirmText);
39
-        $leftFill    = ($promptWidth / 2) - (mb_strlen($confirmText) / 2);
39
+        $leftFill    = ($promptWidth/2) - (mb_strlen($confirmText)/2);
40 40
 
41 41
         $this->write(sprintf(
42 42
             "%s%s%s%s%s%s%s\n",
Please login to merge, or discard this patch.
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
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.