@@ -314,7 +314,7 @@ discard block |
||
314 | 314 | if ($code instanceof \Closure) { |
315 | 315 | $r = new \ReflectionFunction($code); |
316 | 316 | if (null === $r->getClosureThis()) { |
317 | - set_error_handler(static function () {}); |
|
317 | + set_error_handler(static function() {}); |
|
318 | 318 | try { |
319 | 319 | if ($c = \Closure::bind($code, $this)) { |
320 | 320 | $code = $c; |
@@ -364,7 +364,7 @@ discard block |
||
364 | 364 | * |
365 | 365 | * @return $this |
366 | 366 | */ |
367 | - public function setDefinition(array|InputDefinition $definition): static |
|
367 | + public function setDefinition(array | InputDefinition $definition): static |
|
368 | 368 | { |
369 | 369 | if ($definition instanceof InputDefinition) { |
370 | 370 | $this->definition = $definition; |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | * |
410 | 410 | * @throws InvalidArgumentException When argument mode is not valid |
411 | 411 | */ |
412 | - public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
412 | + public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
413 | 413 | { |
414 | 414 | $this->definition->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)); |
415 | 415 | $this->fullDefinition?->addArgument(new InputArgument($name, $mode, $description, $default, $suggestedValues)); |
@@ -429,7 +429,7 @@ discard block |
||
429 | 429 | * |
430 | 430 | * @throws InvalidArgumentException If option mode is invalid or incompatible |
431 | 431 | */ |
432 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
432 | + public function addOption(string $name, string | array | null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
433 | 433 | { |
434 | 434 | $this->definition->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)); |
435 | 435 | $this->fullDefinition?->addOption(new InputOption($name, $shortcut, $mode, $description, $default, $suggestedValues)); |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | ]; |
557 | 557 | $replacements = [ |
558 | 558 | $name, |
559 | - $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'].' '.$name, |
|
559 | + $isSingleCommand ? $_SERVER['PHP_SELF'] : $_SERVER['PHP_SELF'] . ' ' . $name, |
|
560 | 560 | ]; |
561 | 561 | |
562 | 562 | return str_replace($placeholders, $replacements, $this->getHelp() ?: $this->getDescription()); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | parent::__construct($command->getName()); |
63 | 63 | |
64 | 64 | // init below enables calling {@see parent::run()} |
65 | - [$code, $processTitle, $ignoreValidationErrors] = \Closure::bind(function () { |
|
65 | + [$code, $processTitle, $ignoreValidationErrors] = \Closure::bind(function() { |
|
66 | 66 | return [$this->code, $this->processTitle, $this->ignoreValidationErrors]; |
67 | 67 | }, $command, Command::class)(); |
68 | 68 | |
@@ -91,13 +91,13 @@ discard block |
||
91 | 91 | return $this->command instanceof SignalableCommandInterface ? $this->command->getSubscribedSignals() : []; |
92 | 92 | } |
93 | 93 | |
94 | - public function handleSignal(int $signal, int|false $previousExitCode = 0): int|false |
|
94 | + public function handleSignal(int $signal, int | false $previousExitCode = 0): int | false |
|
95 | 95 | { |
96 | 96 | if (!$this->command instanceof SignalableCommandInterface) { |
97 | 97 | return false; |
98 | 98 | } |
99 | 99 | |
100 | - $event = $this->stopwatch->start($this->getName().'.handle_signal'); |
|
100 | + $event = $this->stopwatch->start($this->getName() . '.handle_signal'); |
|
101 | 101 | |
102 | 102 | $exit = $this->command->handleSignal($signal, $previousExitCode); |
103 | 103 | |
@@ -173,8 +173,8 @@ discard block |
||
173 | 173 | { |
174 | 174 | $this->command->setCode($code); |
175 | 175 | |
176 | - return parent::setCode(function (InputInterface $input, OutputInterface $output) use ($code): int { |
|
177 | - $event = $this->stopwatch->start($this->getName().'.code'); |
|
176 | + return parent::setCode(function(InputInterface $input, OutputInterface $output) use ($code): int { |
|
177 | + $event = $this->stopwatch->start($this->getName() . '.code'); |
|
178 | 178 | |
179 | 179 | $this->exitCode = $code($input, $output); |
180 | 180 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | $this->command->mergeApplicationDefinition($mergeArgs); |
193 | 193 | } |
194 | 194 | |
195 | - public function setDefinition(array|InputDefinition $definition): static |
|
195 | + public function setDefinition(array | InputDefinition $definition): static |
|
196 | 196 | { |
197 | 197 | $this->command->setDefinition($definition); |
198 | 198 | |
@@ -209,14 +209,14 @@ discard block |
||
209 | 209 | return $this->command->getNativeDefinition(); |
210 | 210 | } |
211 | 211 | |
212 | - public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
212 | + public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
213 | 213 | { |
214 | 214 | $this->command->addArgument($name, $mode, $description, $default, $suggestedValues); |
215 | 215 | |
216 | 216 | return $this; |
217 | 217 | } |
218 | 218 | |
219 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
219 | + public function addOption(string $name, string | array | null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
220 | 220 | { |
221 | 221 | $this->command->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues); |
222 | 222 | |
@@ -291,8 +291,8 @@ discard block |
||
291 | 291 | $output->getErrorOutput()->writeln((string) $event); |
292 | 292 | } |
293 | 293 | |
294 | - $this->duration = $event->getDuration().' ms'; |
|
295 | - $this->maxMemoryUsage = ($event->getMemory() >> 20).' MiB'; |
|
294 | + $this->duration = $event->getDuration() . ' ms'; |
|
295 | + $this->maxMemoryUsage = ($event->getMemory() >> 20) . ' MiB'; |
|
296 | 296 | |
297 | 297 | if ($this->isInteractive) { |
298 | 298 | $this->extractInteractiveInputs($input->getArguments(), $input->getOptions()); |
@@ -304,7 +304,7 @@ discard block |
||
304 | 304 | |
305 | 305 | protected function initialize(InputInterface $input, OutputInterface $output): void |
306 | 306 | { |
307 | - $event = $this->stopwatch->start($this->getName().'.init', 'command'); |
|
307 | + $event = $this->stopwatch->start($this->getName() . '.init', 'command'); |
|
308 | 308 | |
309 | 309 | $this->command->initialize($input, $output); |
310 | 310 | |
@@ -317,7 +317,7 @@ discard block |
||
317 | 317 | return; |
318 | 318 | } |
319 | 319 | |
320 | - $event = $this->stopwatch->start($this->getName().'.interact', 'command'); |
|
320 | + $event = $this->stopwatch->start($this->getName() . '.interact', 'command'); |
|
321 | 321 | |
322 | 322 | $this->command->interact($input, $output); |
323 | 323 | |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | |
327 | 327 | protected function execute(InputInterface $input, OutputInterface $output): int |
328 | 328 | { |
329 | - $event = $this->stopwatch->start($this->getName().'.execute', 'command'); |
|
329 | + $event = $this->stopwatch->start($this->getName() . '.execute', 'command'); |
|
330 | 330 | |
331 | 331 | $exitCode = $this->command->execute($input, $output); |
332 | 332 | |
@@ -350,7 +350,7 @@ discard block |
||
350 | 350 | continue; |
351 | 351 | } |
352 | 352 | |
353 | - $this->interactiveInputs['--'.$optName] = $optValue; |
|
353 | + $this->interactiveInputs['--' . $optName] = $optValue; |
|
354 | 354 | } |
355 | 355 | } |
356 | 356 | } |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | */ |
27 | 27 | final class LazyCommand extends Command |
28 | 28 | { |
29 | - private \Closure|Command $command; |
|
29 | + private \Closure | Command $command; |
|
30 | 30 | |
31 | 31 | public function __construct( |
32 | 32 | string $name, |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $this->getCommand()->mergeApplicationDefinition($mergeArgs); |
98 | 98 | } |
99 | 99 | |
100 | - public function setDefinition(array|InputDefinition $definition): static |
|
100 | + public function setDefinition(array | InputDefinition $definition): static |
|
101 | 101 | { |
102 | 102 | $this->getCommand()->setDefinition($definition); |
103 | 103 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | /** |
118 | 118 | * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
119 | 119 | */ |
120 | - public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
120 | + public function addArgument(string $name, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
121 | 121 | { |
122 | 122 | $this->getCommand()->addArgument($name, $mode, $description, $default, $suggestedValues); |
123 | 123 | |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | /** |
128 | 128 | * @param array|\Closure(CompletionInput,CompletionSuggestions):list<string|Suggestion> $suggestedValues The values used for input completion |
129 | 129 | */ |
130 | - public function addOption(string $name, string|array|null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array|\Closure $suggestedValues = []): static |
|
130 | + public function addOption(string $name, string | array | null $shortcut = null, ?int $mode = null, string $description = '', mixed $default = null, array | \Closure $suggestedValues = []): static |
|
131 | 131 | { |
132 | 132 | $this->getCommand()->addOption($name, $shortcut, $mode, $description, $default, $suggestedValues); |
133 | 133 |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | protected function configure(): void |
56 | 56 | { |
57 | 57 | $this |
58 | - ->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("'.implode('", "', array_keys($this->completionOutputs)).'")') |
|
58 | + ->addOption('shell', 's', InputOption::VALUE_REQUIRED, 'The shell type ("' . implode('", "', array_keys($this->completionOutputs)) . '")') |
|
59 | 59 | ->addOption('input', 'i', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'An array of input tokens (e.g. COMP_WORDS or argv)') |
60 | 60 | ->addOption('current', 'c', InputOption::VALUE_REQUIRED, 'The index of the "input" array that the cursor is in (e.g. COMP_CWORD)') |
61 | 61 | ->addOption('api-version', 'a', InputOption::VALUE_REQUIRED, 'The API version of the completion script') |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $message = sprintf('Completion script version is not supported ("%s" given, ">=%s" required).', $version, self::COMPLETION_API_VERSION); |
78 | 78 | $this->log($message); |
79 | 79 | |
80 | - $output->writeln($message.' Install the Symfony completion script again by using the "completion" command.'); |
|
80 | + $output->writeln($message . ' Install the Symfony completion script again by using the "completion" command.'); |
|
81 | 81 | |
82 | 82 | return 126; |
83 | 83 | } |
@@ -96,11 +96,11 @@ discard block |
||
96 | 96 | |
97 | 97 | $this->log([ |
98 | 98 | '', |
99 | - '<comment>'.date('Y-m-d H:i:s').'</>', |
|
99 | + '<comment>' . date('Y-m-d H:i:s') . '</>', |
|
100 | 100 | '<info>Input:</> <comment>("|" indicates the cursor position)</>', |
101 | - ' '.(string) $completionInput, |
|
101 | + ' ' . (string) $completionInput, |
|
102 | 102 | '<info>Command:</>', |
103 | - ' '.(string) implode(' ', $_SERVER['argv']), |
|
103 | + ' ' . (string) implode(' ', $_SERVER['argv']), |
|
104 | 104 | '<info>Messages:</>', |
105 | 105 | ]); |
106 | 106 | |
@@ -123,16 +123,16 @@ discard block |
||
123 | 123 | $completionInput->bind($command->getDefinition()); |
124 | 124 | |
125 | 125 | if (CompletionInput::TYPE_OPTION_NAME === $completionInput->getCompletionType()) { |
126 | - $this->log(' Completing option names for the <comment>'.($command instanceof LazyCommand ? $command->getCommand() : $command)::class.'</> command.'); |
|
126 | + $this->log(' Completing option names for the <comment>' . ($command instanceof LazyCommand ? $command->getCommand() : $command)::class . '</> command.'); |
|
127 | 127 | |
128 | 128 | $suggestions->suggestOptions($command->getDefinition()->getOptions()); |
129 | 129 | } else { |
130 | 130 | $this->log([ |
131 | - ' Completing using the <comment>'.($command instanceof LazyCommand ? $command->getCommand() : $command)::class.'</> class.', |
|
132 | - ' Completing <comment>'.$completionInput->getCompletionType().'</> for <comment>'.$completionInput->getCompletionName().'</>', |
|
131 | + ' Completing using the <comment>' . ($command instanceof LazyCommand ? $command->getCommand() : $command)::class . '</> class.', |
|
132 | + ' Completing <comment>' . $completionInput->getCompletionType() . '</> for <comment>' . $completionInput->getCompletionName() . '</>', |
|
133 | 133 | ]); |
134 | 134 | if (null !== $compval = $completionInput->getCompletionValue()) { |
135 | - $this->log(' Current value: <comment>'.$compval.'</>'); |
|
135 | + $this->log(' Current value: <comment>' . $compval . '</>'); |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $command->complete($completionInput, $suggestions); |
@@ -144,9 +144,9 @@ discard block |
||
144 | 144 | |
145 | 145 | $this->log('<info>Suggestions:</>'); |
146 | 146 | if ($options = $suggestions->getOptionSuggestions()) { |
147 | - $this->log(' --'.implode(' --', array_map(fn ($o) => $o->getName(), $options))); |
|
147 | + $this->log(' --' . implode(' --', array_map(fn ($o) => $o->getName(), $options))); |
|
148 | 148 | } elseif ($values = $suggestions->getValueSuggestions()) { |
149 | - $this->log(' '.implode(' ', $values)); |
|
149 | + $this->log(' ' . implode(' ', $values)); |
|
150 | 150 | } else { |
151 | 151 | $this->log(' <comment>No suggestions were provided</>'); |
152 | 152 | } |
@@ -207,6 +207,6 @@ discard block |
||
207 | 207 | } |
208 | 208 | |
209 | 209 | $commandName = basename($_SERVER['argv'][0]); |
210 | - file_put_contents(sys_get_temp_dir().'/sf_'.$commandName.'.log', implode(\PHP_EOL, (array) $messages).\PHP_EOL, \FILE_APPEND); |
|
210 | + file_put_contents(sys_get_temp_dir() . '/sf_' . $commandName . '.log', implode(\PHP_EOL, (array) $messages) . \PHP_EOL, \FILE_APPEND); |
|
211 | 211 | } |
212 | 212 | } |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $shell = $this->guessShell(); |
39 | 39 | [$rcFile, $completionFile] = match ($shell) { |
40 | 40 | 'fish' => ['~/.config/fish/config.fish', "/etc/fish/completions/$commandName.fish"], |
41 | - 'zsh' => ['~/.zshrc', '$fpath[1]/_'.$commandName], |
|
41 | + 'zsh' => ['~/.zshrc', '$fpath[1]/_' . $commandName], |
|
42 | 42 | default => ['~/.bashrc', "/etc/bash_completion.d/$commandName"], |
43 | 43 | }; |
44 | 44 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | } |
91 | 91 | |
92 | 92 | $shell = $input->getArgument('shell') ?? self::guessShell(); |
93 | - $completionFile = __DIR__.'/../Resources/completion.'.$shell; |
|
93 | + $completionFile = __DIR__ . '/../Resources/completion.' . $shell; |
|
94 | 94 | if (!file_exists($completionFile)) { |
95 | 95 | $supportedShells = $this->getSupportedShells(); |
96 | 96 | |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | |
119 | 119 | private function tailDebugLog(string $commandName, OutputInterface $output): void |
120 | 120 | { |
121 | - $debugFile = sys_get_temp_dir().'/sf_'.$commandName.'.log'; |
|
121 | + $debugFile = sys_get_temp_dir() . '/sf_' . $commandName . '.log'; |
|
122 | 122 | if (!file_exists($debugFile)) { |
123 | 123 | touch($debugFile); |
124 | 124 | } |
125 | 125 | $process = new Process(['tail', '-f', $debugFile], null, null, null, 0); |
126 | - $process->run(function (string $type, string $line) use ($output): void { |
|
126 | + $process->run(function(string $type, string $line) use ($output): void { |
|
127 | 127 | $output->write($line); |
128 | 128 | }); |
129 | 129 | } |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | |
140 | 140 | $shells = []; |
141 | 141 | |
142 | - foreach (new \DirectoryIterator(__DIR__.'/../Resources/') as $file) { |
|
142 | + foreach (new \DirectoryIterator(__DIR__ . '/../Resources/') as $file) { |
|
143 | 143 | if (str_starts_with($file->getBasename(), 'completion.') && $file->isFile()) { |
144 | 144 | $shells[] = $file->getExtension(); |
145 | 145 | } |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | public function __construct( |
33 | 33 | string $question, |
34 | 34 | private array $choices, |
35 | - string|bool|int|float|null $default = null, |
|
35 | + string | bool | int | float | null $default = null, |
|
36 | 36 | ) { |
37 | 37 | if (!$choices) { |
38 | 38 | throw new \LogicException('Choice question must have at least 1 choice available.'); |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $multiselect = $this->multiselect; |
118 | 118 | $isAssoc = $this->isAssoc($choices); |
119 | 119 | |
120 | - return function ($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { |
|
120 | + return function($selected) use ($choices, $errorMessage, $multiselect, $isAssoc) { |
|
121 | 121 | if ($multiselect) { |
122 | 122 | // Check for a separated comma values |
123 | 123 | if (!preg_match('/^[^,]+(?:,[^,]+)*$/', (string) $selected, $matches)) { |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | */ |
37 | 37 | public function __construct( |
38 | 38 | private string $question, |
39 | - private string|bool|int|float|null $default = null, |
|
39 | + private string | bool | int | float | null $default = null, |
|
40 | 40 | ) { |
41 | 41 | } |
42 | 42 | |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | /** |
52 | 52 | * Returns the default answer. |
53 | 53 | */ |
54 | - public function getDefault(): string|bool|int|float|null |
|
54 | + public function getDefault(): string | bool | int | float | null |
|
55 | 55 | { |
56 | 56 | return $this->default; |
57 | 57 | } |
@@ -146,7 +146,7 @@ discard block |
||
146 | 146 | |
147 | 147 | $callback = static fn () => $values; |
148 | 148 | } elseif ($values instanceof \Traversable) { |
149 | - $callback = static function () use ($values) { |
|
149 | + $callback = static function() use ($values) { |
|
150 | 150 | static $valueCache; |
151 | 151 | |
152 | 152 | return $valueCache ??= iterator_to_array($values, false); |
@@ -109,9 +109,9 @@ |
||
109 | 109 | } elseif ($val instanceof \DateTimeInterface) { |
110 | 110 | $replacements["{{$key}}"] = $val->format(\DateTimeInterface::RFC3339); |
111 | 111 | } elseif (\is_object($val)) { |
112 | - $replacements["{{$key}}"] = '[object '.$val::class.']'; |
|
112 | + $replacements["{{$key}}"] = '[object ' . $val::class . ']'; |
|
113 | 113 | } else { |
114 | - $replacements["{{$key}}"] = '['.\gettype($val).']'; |
|
114 | + $replacements["{{$key}}"] = '[' . \gettype($val) . ']'; |
|
115 | 115 | } |
116 | 116 | } |
117 | 117 |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | $argument->getName(), |
44 | 44 | str_repeat(' ', $spacingWidth), |
45 | 45 | // + 4 = 2 spaces before <info>, 2 spaces after </info> |
46 | - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $argument->getDescription()), |
|
46 | + preg_replace('/\s*[\r\n]\s*/', "\n" . str_repeat(' ', $totalWidth + 4), $argument->getDescription()), |
|
47 | 47 | $default |
48 | 48 | ), $options); |
49 | 49 | } |
@@ -58,10 +58,10 @@ discard block |
||
58 | 58 | |
59 | 59 | $value = ''; |
60 | 60 | if ($option->acceptValue()) { |
61 | - $value = '='.strtoupper($option->getName()); |
|
61 | + $value = '=' . strtoupper($option->getName()); |
|
62 | 62 | |
63 | 63 | if ($option->isValueOptional()) { |
64 | - $value = '['.$value.']'; |
|
64 | + $value = '[' . $value . ']'; |
|
65 | 65 | } |
66 | 66 | } |
67 | 67 | |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | $synopsis, |
78 | 78 | str_repeat(' ', $spacingWidth), |
79 | 79 | // + 4 = 2 spaces before <info>, 2 spaces after </info> |
80 | - preg_replace('/\s*[\r\n]\s*/', "\n".str_repeat(' ', $totalWidth + 4), $option->getDescription()), |
|
80 | + preg_replace('/\s*[\r\n]\s*/', "\n" . str_repeat(' ', $totalWidth + 4), $option->getDescription()), |
|
81 | 81 | $default, |
82 | 82 | $option->isArray() ? '<comment> (multiple values allowed)</comment>' : '' |
83 | 83 | ), $options); |
@@ -129,14 +129,14 @@ discard block |
||
129 | 129 | if ($description = $command->getDescription()) { |
130 | 130 | $this->writeText('<comment>Description:</comment>', $options); |
131 | 131 | $this->writeText("\n"); |
132 | - $this->writeText(' '.$description); |
|
132 | + $this->writeText(' ' . $description); |
|
133 | 133 | $this->writeText("\n\n"); |
134 | 134 | } |
135 | 135 | |
136 | 136 | $this->writeText('<comment>Usage:</comment>', $options); |
137 | 137 | foreach (array_merge([$command->getSynopsis(true)], $command->getAliases(), $command->getUsages()) as $usage) { |
138 | 138 | $this->writeText("\n"); |
139 | - $this->writeText(' '.OutputFormatter::escape($usage), $options); |
|
139 | + $this->writeText(' ' . OutputFormatter::escape($usage), $options); |
|
140 | 140 | } |
141 | 141 | $this->writeText("\n"); |
142 | 142 | |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $this->writeText("\n"); |
153 | 153 | $this->writeText('<comment>Help:</comment>', $options); |
154 | 154 | $this->writeText("\n"); |
155 | - $this->writeText(' '.str_replace("\n", "\n ", $help), $options); |
|
155 | + $this->writeText(' ' . str_replace("\n", "\n ", $help), $options); |
|
156 | 156 | $this->writeText("\n"); |
157 | 157 | } |
158 | 158 | } |
@@ -210,7 +210,7 @@ discard block |
||
210 | 210 | |
211 | 211 | if (!$describedNamespace && ApplicationDescription::GLOBAL_NAMESPACE !== $namespace['id']) { |
212 | 212 | $this->writeText("\n"); |
213 | - $this->writeText(' <comment>'.$namespace['id'].'</comment>', $options); |
|
213 | + $this->writeText(' <comment>' . $namespace['id'] . '</comment>', $options); |
|
214 | 214 | } |
215 | 215 | |
216 | 216 | foreach ($namespace['commands'] as $name) { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | $spacingWidth = $width - Helper::width($name); |
219 | 219 | $command = $commands[$name]; |
220 | 220 | $commandAliases = $name === $command->getName() ? $this->getCommandAliasesText($command) : ''; |
221 | - $this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases.$command->getDescription()), $options); |
|
221 | + $this->writeText(sprintf(' <info>%s</info>%s%s', $name, str_repeat(' ', $spacingWidth), $commandAliases . $command->getDescription()), $options); |
|
222 | 222 | } |
223 | 223 | } |
224 | 224 | |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | $aliases = $command->getAliases(); |
244 | 244 | |
245 | 245 | if ($aliases) { |
246 | - $text = '['.implode('|', $aliases).'] '; |
|
246 | + $text = '[' . implode('|', $aliases) . '] '; |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | return $text; |