Passed
Pull Request — master (#230)
by Aydin
03:05
created
src/MenuItem/SplitItem.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -131,16 +131,16 @@  discard block
 block discarded – undo
131 131
         $largestItemExtra = $this->calculateItemExtra();
132 132
 
133 133
         $length = $largestItemExtra > 0
134
-            ? floor($style->getContentWidth() / $numberOfItems) - ($largestItemExtra + 2)
135
-            : floor($style->getContentWidth() / $numberOfItems);
134
+            ? floor($style->getContentWidth()/$numberOfItems) - ($largestItemExtra + 2)
135
+            : floor($style->getContentWidth()/$numberOfItems);
136 136
 
137 137
         $length -= $this->gutter;
138 138
         $length = (int) $length;
139 139
 
140
-        $missingLength = $style->getContentWidth() % $numberOfItems;
140
+        $missingLength = $style->getContentWidth()%$numberOfItems;
141 141
         
142 142
         return $this->buildRows(
143
-            mapWithKeys($this->items, function (int $index, MenuItemInterface $item) use ($selected, $length, $style) {
143
+            mapWithKeys($this->items, function(int $index, MenuItemInterface $item) use ($selected, $length, $style) {
144 144
                 $isSelected = $selected && $index === $this->selectedItemIndex;
145 145
 
146 146
                 $marker = '';
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
         $extraPadLength = $largestItemExtra > 0 ? 2 + $largestItemExtra : 0;
183 183
         
184 184
         return array_map(
185
-            function ($i) use ($cells, $length, $missingLength, $extraPadLength) {
185
+            function($i) use ($cells, $length, $missingLength, $extraPadLength) {
186 186
                 return $this->buildRow($cells, $i, $length, $missingLength, $extraPadLength);
187 187
             },
188 188
             range(0, max(array_map('count', $cells)) - 1)
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             implode(
197 197
                 '',
198 198
                 array_map(
199
-                    function ($cell) use ($index, $length, $extraPadLength) {
199
+                    function($cell) use ($index, $length, $extraPadLength) {
200 200
                         return $cell[$index] ?? str_repeat(' ', $length + $this->gutter + $extraPadLength);
201 201
                     },
202 202
                     $cells
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
         bool $isSelected,
214 214
         string $itemExtra
215 215
     ) : array {
216
-        return array_map(function ($row, $index) use ($length, $style, $isSelected, $itemExtra) {
216
+        return array_map(function($row, $index) use ($length, $style, $isSelected, $itemExtra) {
217 217
             $invertedColoursSetCode = $isSelected
218 218
                 ? $style->getInvertedColoursSetCode()
219 219
                 : '';
Please login to merge, or discard this patch.
src/MenuItem/AsciiArtItem.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         Assertion::inArray($position, [self::POSITION_CENTER, self::POSITION_RIGHT, self::POSITION_LEFT]);
50 50
 
51 51
         $this->setText($text);
52
-        $this->position  = $position;
52
+        $this->position = $position;
53 53
         $this->alternateText = $alt;
54 54
 
55 55
         $this->style = new DefaultStyle();
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 
68 68
         $padding = $style->getContentWidth() - $this->artLength;
69 69
 
70
-        return array_map(function ($row) use ($padding) {
70
+        return array_map(function($row) use ($padding) {
71 71
             switch ($this->position) {
72 72
                 case self::POSITION_LEFT:
73 73
                     break;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
                     break;
77 77
                 case self::POSITION_CENTER:
78 78
                 default:
79
-                    $left = (int) ceil($padding / 2);
79
+                    $left = (int) ceil($padding/2);
80 80
                     $row = sprintf('%s%s', str_repeat(' ', $left), $row);
81 81
                     break;
82 82
             }
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
      */
115 115
     public function setText(string $text) : void
116 116
     {
117
-        $this->text = implode("\n", array_map(function (string $line) {
117
+        $this->text = implode("\n", array_map(function(string $line) {
118 118
             return rtrim($line, ' ');
119 119
         }, explode("\n", $text)));
120 120
 
Please login to merge, or discard this patch.