@@ -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 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ) |
| 46 | 46 | ); |
| 47 | 47 | |
| 48 | - return array_map(function ($row, $key) use ($style, $length) { |
|
| 48 | + return array_map(function($row, $key) use ($style, $length) { |
|
| 49 | 49 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
| 50 | 50 | |
| 51 | 51 | if ($key === 0) { |
@@ -125,16 +125,16 @@ discard block |
||
| 125 | 125 | $this->calculateItemExtra(); |
| 126 | 126 | |
| 127 | 127 | $length = $this->largestItemExtra > 0 |
| 128 | - ? floor($style->getContentWidth() / $numberOfItems) - ($this->largestItemExtra + 2) |
|
| 129 | - : floor($style->getContentWidth() / $numberOfItems); |
|
| 128 | + ? floor($style->getContentWidth()/$numberOfItems) - ($this->largestItemExtra + 2) |
|
| 129 | + : floor($style->getContentWidth()/$numberOfItems); |
|
| 130 | 130 | |
| 131 | 131 | $length -= $this->gutter; |
| 132 | 132 | $length = (int) $length; |
| 133 | 133 | |
| 134 | - $missingLength = $style->getContentWidth() % $numberOfItems; |
|
| 134 | + $missingLength = $style->getContentWidth()%$numberOfItems; |
|
| 135 | 135 | |
| 136 | 136 | return $this->buildRows( |
| 137 | - array_map(function ($index, $item) use ($selected, $length, $style) { |
|
| 137 | + array_map(function($index, $item) use ($selected, $length, $style) { |
|
| 138 | 138 | $isSelected = $selected && $index === $this->selectedItemIndex; |
| 139 | 139 | |
| 140 | 140 | if ($item instanceof CheckboxItem || $item instanceof RadioItem) { |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $extraPadLength = $this->largestItemExtra > 0 ? 2 + $this->largestItemExtra : 0; |
| 182 | 182 | |
| 183 | 183 | return array_map( |
| 184 | - function ($i) use ($cells, $length, $missingLength, $extraPadLength) { |
|
| 184 | + function($i) use ($cells, $length, $missingLength, $extraPadLength) { |
|
| 185 | 185 | return $this->buildRow($cells, $i, $length, $missingLength, $extraPadLength); |
| 186 | 186 | }, |
| 187 | 187 | range(0, max(array_map('count', $cells)) - 1) |
@@ -195,7 +195,7 @@ discard block |
||
| 195 | 195 | implode( |
| 196 | 196 | '', |
| 197 | 197 | array_map( |
| 198 | - function ($cell) use ($index, $length, $extraPadLength) { |
|
| 198 | + function($cell) use ($index, $length, $extraPadLength) { |
|
| 199 | 199 | return $cell[$index] ?? str_repeat(' ', $length + $this->gutter + $extraPadLength); |
| 200 | 200 | }, |
| 201 | 201 | $cells |
@@ -212,7 +212,7 @@ discard block |
||
| 212 | 212 | bool $isSelected, |
| 213 | 213 | string $itemExtra |
| 214 | 214 | ) : array { |
| 215 | - return array_map(function ($row, $index) use ($length, $style, $isSelected, $itemExtra) { |
|
| 215 | + return array_map(function($row, $index) use ($length, $style, $isSelected, $itemExtra) { |
|
| 216 | 216 | $invertedColoursSetCode = $isSelected |
| 217 | 217 | ? $style->getInvertedColoursSetCode() |
| 218 | 218 | : ''; |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | ) |
| 61 | 61 | ); |
| 62 | 62 | |
| 63 | - return array_map(function ($row, $key) use ($style, $length) { |
|
| 63 | + return array_map(function($row, $key) use ($style, $length) { |
|
| 64 | 64 | $text = $this->disabled ? $style->getDisabledItemText($row) : $row; |
| 65 | 65 | |
| 66 | 66 | if ($key === 0) { |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | */ |
| 84 | 84 | public function getSelectAction() : ?callable |
| 85 | 85 | { |
| 86 | - return function (CliMenu $menu) { |
|
| 86 | + return function(CliMenu $menu) { |
|
| 87 | 87 | $this->showSubMenu($menu); |
| 88 | 88 | }; |
| 89 | 89 | } |