Completed
Pull Request — master (#103)
by
unknown
02:05
created
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.
src/MenuStyle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     protected function calculateContentWidth() : void
241 241
     {
242
-        $this->contentWidth = $this->width - ($this->padding * 2);
242
+        $this->contentWidth = $this->width - ($this->padding*2);
243 243
     }
244 244
 
245 245
     public function getFg() : string
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     public function setMarginAuto() : self
309 309
     {
310 310
         $this->marginAuto = true;
311
-        $this->margin = floor(($this->terminal->getWidth() - $this->width) / 2);
311
+        $this->margin = floor(($this->terminal->getWidth() - $this->width)/2);
312 312
         
313 313
         return $this;
314 314
     }
Please login to merge, or discard this patch.