@@ -9,7 +9,7 @@ |
||
| 9 | 9 | $search = new \SplFileInfo($realPath); |
| 10 | 10 | |
| 11 | 11 | return $this->in($search->getPath())->filter( |
| 12 | - function (\SplFileInfo $found) use ($search) { |
|
| 12 | + function(\SplFileInfo $found) use ($search) { |
|
| 13 | 13 | return $search->getRealPath() === $found->getRealPath(); |
| 14 | 14 | } |
| 15 | 15 | ); |
@@ -136,7 +136,7 @@ discard block |
||
| 136 | 136 | .array_reduce(array_merge(array($synopsis), |
| 137 | 137 | $command->getAliases(), |
| 138 | 138 | $command->getUsages()), |
| 139 | - function ($carry, $usage) { |
|
| 139 | + function($carry, $usage) { |
|
| 140 | 140 | return $carry.'* `'.$usage.'`'."\n"; |
| 141 | 141 | }) |
| 142 | 142 | ); |
@@ -160,14 +160,14 @@ discard block |
||
| 160 | 160 | $this->write($title."\n".str_repeat('=', Helper::strlen($title))); |
| 161 | 161 | |
| 162 | 162 | $commands = array_filter($description->getCommands(), |
| 163 | - function (Command $command) { |
|
| 163 | + function(Command $command) { |
|
| 164 | 164 | return $command instanceof DocumentedCommand; |
| 165 | 165 | }); |
| 166 | 166 | |
| 167 | 167 | $this->write("\n\n"); |
| 168 | 168 | $this->write(implode("\n", |
| 169 | 169 | array_map( |
| 170 | - function (Command $command) use ($description) { |
|
| 170 | + function(Command $command) use ($description) { |
|
| 171 | 171 | return sprintf( |
| 172 | 172 | "* [`%s`](#%s)\n > %s", |
| 173 | 173 | $command->getName(), |
@@ -201,14 +201,14 @@ discard block |
||
| 201 | 201 | { |
| 202 | 202 | $options = $definition->getOptions(); |
| 203 | 203 | $options = array_filter($options, |
| 204 | - function (InputOption $option) { |
|
| 204 | + function(InputOption $option) { |
|
| 205 | 205 | return !in_array( |
| 206 | 206 | $option->getName(), |
| 207 | 207 | ['help', 'quiet', 'verbose', 'version', 'ansi', 'no-ansi', 'no-interaction'] |
| 208 | 208 | ); |
| 209 | 209 | }); |
| 210 | 210 | usort($options, |
| 211 | - function (InputOption $a, InputOption $b) { |
|
| 211 | + function(InputOption $a, InputOption $b) { |
|
| 212 | 212 | $aRequired = $a->isValueRequired() ? 1 : 0; |
| 213 | 213 | $bRequired = $b->isValueRequired() ? 1 : 0; |
| 214 | 214 | if ($aRequired == $bRequired) { |
@@ -46,14 +46,14 @@ |
||
| 46 | 46 | |
| 47 | 47 | private function normalizer(): \Closure |
| 48 | 48 | { |
| 49 | - return function ($answer): string { |
|
| 49 | + return function($answer): string { |
|
| 50 | 50 | return trim((string)$answer); |
| 51 | 51 | }; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | private function validator(OptionProvider $optionProvider): \Closure |
| 55 | 55 | { |
| 56 | - return function (string $answer) use ($optionProvider): string { |
|
| 56 | + return function(string $answer) use ($optionProvider): string { |
|
| 57 | 57 | if (!$answer) { |
| 58 | 58 | throw new \Exception('No answer was given. Try again.'); |
| 59 | 59 | } |
@@ -49,7 +49,7 @@ |
||
| 49 | 49 | $this->style, |
| 50 | 50 | $process, |
| 51 | 51 | null, |
| 52 | - function ($type, $buffer) use ($useProgress, $displayProgressText, $progressBar) { |
|
| 52 | + function($type, $buffer) use ($useProgress, $displayProgressText, $progressBar) { |
|
| 53 | 53 | if ($useProgress) { |
| 54 | 54 | if ($displayProgressText && Process::OUT === $type) { |
| 55 | 55 | $progressBar->setMessage(substr(preg_replace('#\s+#', ' ', $buffer), 0, 100)); |
@@ -15,7 +15,7 @@ |
||
| 15 | 15 | $ids = array_keys($container->findTaggedServiceIds('console.command', true)); |
| 16 | 16 | |
| 17 | 17 | $refs = array_map( |
| 18 | - function ($id) { |
|
| 18 | + function($id) { |
|
| 19 | 19 | return new Reference($id); |
| 20 | 20 | }, |
| 21 | 21 | $ids |
@@ -20,7 +20,7 @@ |
||
| 20 | 20 | { |
| 21 | 21 | return new self( |
| 22 | 22 | ...array_map( |
| 23 | - function (string $host) { |
|
| 23 | + function(string $host) { |
|
| 24 | 24 | return Hostname::parse($host); |
| 25 | 25 | }, |
| 26 | 26 | $value |