@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ) |
53 | 53 | ); |
54 | 54 | |
55 | - return array_map(function ($row, $key) use ($style, $length, $itemExtra) { |
|
55 | + return array_map(function($row, $key) use ($style, $length, $itemExtra) { |
|
56 | 56 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
57 | 57 | |
58 | 58 | if ($key === 0) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getSelectAction() : ?callable |
72 | 72 | { |
73 | - return function (CliMenu $cliMenu) { |
|
73 | + return function(CliMenu $cliMenu) { |
|
74 | 74 | $parentItem = $cliMenu->getItemByIndex($cliMenu->getSelectedItemIndex()); |
75 | 75 | |
76 | 76 | $siblings = $parentItem instanceof SplitItem |
@@ -79,14 +79,14 @@ discard block |
||
79 | 79 | |
80 | 80 | $filtered = array_filter( |
81 | 81 | $siblings, |
82 | - function (MenuItemInterface $item) { |
|
82 | + function(MenuItemInterface $item) { |
|
83 | 83 | return $item instanceof self; |
84 | 84 | } |
85 | 85 | ); |
86 | 86 | |
87 | 87 | array_walk( |
88 | 88 | $filtered, |
89 | - function (RadioItem $item) { |
|
89 | + function(RadioItem $item) { |
|
90 | 90 | $item->setUnchecked(); |
91 | 91 | } |
92 | 92 | ); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ) |
53 | 53 | ); |
54 | 54 | |
55 | - return array_map(function ($row, $key) use ($style, $length, $itemExtra) { |
|
55 | + return array_map(function($row, $key) use ($style, $length, $itemExtra) { |
|
56 | 56 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
57 | 57 | |
58 | 58 | if ($key === 0) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | */ |
71 | 71 | public function getSelectAction() : ?callable |
72 | 72 | { |
73 | - return function (CliMenu $cliMenu) { |
|
73 | + return function(CliMenu $cliMenu) { |
|
74 | 74 | $this->toggle(); |
75 | 75 | $cliMenu->redraw(); |
76 | 76 |
@@ -118,16 +118,16 @@ discard block |
||
118 | 118 | } |
119 | 119 | |
120 | 120 | $length = $style->getDisplaysExtra() |
121 | - ? floor($style->getContentWidth() / $numberOfItems) - (mb_strlen($style->getItemExtra()) + 2) |
|
122 | - : floor($style->getContentWidth() / $numberOfItems); |
|
121 | + ? floor($style->getContentWidth()/$numberOfItems) - (mb_strlen($style->getItemExtra()) + 2) |
|
122 | + : floor($style->getContentWidth()/$numberOfItems); |
|
123 | 123 | |
124 | 124 | $length -= $this->gutter; |
125 | 125 | $length = (int) $length; |
126 | 126 | |
127 | - $missingLength = $style->getContentWidth() % $numberOfItems; |
|
127 | + $missingLength = $style->getContentWidth()%$numberOfItems; |
|
128 | 128 | |
129 | 129 | return $this->buildRows( |
130 | - array_map(function ($index, $item) use ($selected, $length, $style) { |
|
130 | + array_map(function($index, $item) use ($selected, $length, $style) { |
|
131 | 131 | $isSelected = $selected && $index === $this->selectedItemIndex; |
132 | 132 | |
133 | 133 | if ($item instanceof CheckboxItem || $item instanceof RadioItem) { |
@@ -177,7 +177,7 @@ discard block |
||
177 | 177 | $extraPadLength = $style->getDisplaysExtra() ? 2 + mb_strlen($style->getItemExtra()) : 0; |
178 | 178 | |
179 | 179 | return array_map( |
180 | - function ($i) use ($cells, $length, $missingLength, $extraPadLength) { |
|
180 | + function($i) use ($cells, $length, $missingLength, $extraPadLength) { |
|
181 | 181 | return $this->buildRow($cells, $i, $length, $missingLength, $extraPadLength); |
182 | 182 | }, |
183 | 183 | range(0, max(array_map('count', $cells)) - 1) |
@@ -191,7 +191,7 @@ discard block |
||
191 | 191 | implode( |
192 | 192 | '', |
193 | 193 | array_map( |
194 | - function ($cell) use ($index, $length, $extraPadLength) { |
|
194 | + function($cell) use ($index, $length, $extraPadLength) { |
|
195 | 195 | return $cell[$index] ?? str_repeat(' ', $length + $this->gutter + $extraPadLength); |
196 | 196 | }, |
197 | 197 | $cells |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | bool $isSelected, |
209 | 209 | string $itemExtra |
210 | 210 | ) : array { |
211 | - return array_map(function ($row, $index) use ($length, $style, $isSelected, $itemExtra) { |
|
211 | + return array_map(function($row, $index) use ($length, $style, $isSelected, $itemExtra) { |
|
212 | 212 | $invertedColoursSetCode = $isSelected |
213 | 213 | ? $style->getInvertedColoursSetCode() |
214 | 214 | : ''; |