@@ -31,7 +31,7 @@ |
||
31 | 31 | */ |
32 | 32 | Command::macro( |
33 | 33 | 'select', |
34 | - function (string $message = '', array $options = [], bool $allowMultiple = true) { |
|
34 | + function(string $message = '', array $options = [], bool $allowMultiple = true) { |
|
35 | 35 | $helper = new SelectionHelper($this->input, $this->output); |
36 | 36 | $question = $allowMultiple ? new CheckboxInput($message, $options) : new RadioInput($message, $options); |
37 | 37 |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | { |
72 | 72 | $this->firstRun = true; |
73 | 73 | $this->output->writeln( |
74 | - '<info>' . $this->question->getMessage() . '</info> [<comment>SPACE=select</>, <comment>ENTER=submit</>]' |
|
74 | + '<info>'.$this->question->getMessage().'</info> [<comment>SPACE=select</>, <comment>ENTER=submit</>]' |
|
75 | 75 | ); |
76 | 76 | $this->repaint(); |
77 | 77 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } elseif (10 === ord($char)) { |
91 | 91 | //TODO handle valid state... |
92 | 92 | $this->clear(); |
93 | - $this->output->write('> ' . join(', ', $this->question->getSelections())); |
|
93 | + $this->output->write('> '.join(', ', $this->question->getSelections())); |
|
94 | 94 | $this->output->write($char); |
95 | 95 | break; |
96 | 96 | } |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | $chunkSize = $this->chunkSize(); |
234 | 234 | $chunks = $this->question->getChunks($chunkSize); |
235 | 235 | $columnSpace = floor(($this->terminalWidth() - ($chunkSize * 5)) / $chunkSize); |
236 | - return join(PHP_EOL, array_map(function ($entries) use ($chunks, $columnSpace) { |
|
236 | + return join(PHP_EOL, array_map(function($entries) use ($chunks, $columnSpace) { |
|
237 | 237 | $hasCursor = (bool) ($this->row === array_search($entries, $chunks)); |
238 | 238 | return $this->makeRow($entries, ($hasCursor ? $this->column : -10), $columnSpace); |
239 | 239 | }, $chunks)); |
@@ -246,9 +246,9 @@ discard block |
||
246 | 246 | */ |
247 | 247 | protected function makeRow(array $entries, int $activeColumn, int $columnSpace) |
248 | 248 | { |
249 | - return array_reduce($entries, function ($carry, $item) use ($entries, $activeColumn, $columnSpace) { |
|
249 | + return array_reduce($entries, function($carry, $item) use ($entries, $activeColumn, $columnSpace) { |
|
250 | 250 | $isActive = ($activeColumn === array_search($item, $entries)); |
251 | - return $carry . $this->makeCell($item, $isActive, $columnSpace); |
|
251 | + return $carry.$this->makeCell($item, $isActive, $columnSpace); |
|
252 | 252 | }, ''); |
253 | 253 | } |
254 | 254 | |
@@ -266,7 +266,7 @@ discard block |
||
266 | 266 | return sprintf( |
267 | 267 | $hasCursor ? ' <hl> %1$s %2$s </hl>' : ' <%3$s> %1$s %2$s </%3$s>', |
268 | 268 | ($selected ? '●' : '○'), |
269 | - $name . str_repeat(' ', $maxWidth - mb_strlen($name)), |
|
269 | + $name.str_repeat(' ', $maxWidth - mb_strlen($name)), |
|
270 | 270 | ($selected ? 'info' : 'comment') |
271 | 271 | ); |
272 | 272 | } |