@@ -158,7 +158,7 @@ discard block |
||
158 | 158 | |
159 | 159 | foreach ($options as $key => $value) { |
160 | 160 | $key = preg_replace('/^\-\-/', '', $key); |
161 | - if (! isset($options[$key])) { |
|
161 | + if (!isset($options[$key])) { |
|
162 | 162 | $options[$key] = $value; |
163 | 163 | } |
164 | 164 | } |
@@ -171,7 +171,7 @@ discard block |
||
171 | 171 | */ |
172 | 172 | public function commandExists(string $commandName): bool |
173 | 173 | { |
174 | - return ! empty($this->_commands[$commandName]); |
|
174 | + return !empty($this->_commands[$commandName]); |
|
175 | 175 | } |
176 | 176 | |
177 | 177 | /** |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | foreach ($files as $file) { |
207 | 207 | $className = $locator->findQualifiedNameFromPath($file); |
208 | 208 | |
209 | - if ($className === false || ! class_exists($className)) { |
|
209 | + if ($className === false || !class_exists($className)) { |
|
210 | 210 | continue; |
211 | 211 | } |
212 | 212 | |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $class = new ReflectionClass($className); |
233 | 233 | $logger = $logger ?: Services::logger(); |
234 | 234 | |
235 | - if (! $class->isInstantiable() || ! $class->isSubclassOf(Command::class)) { |
|
235 | + if (!$class->isInstantiable() || !$class->isSubclassOf(Command::class)) { |
|
236 | 236 | throw CLIException::invalidCommand($className); |
237 | 237 | } |
238 | 238 | |
@@ -259,13 +259,13 @@ discard block |
||
259 | 259 | $value = (array) $value; |
260 | 260 | |
261 | 261 | $description = $value[0]; |
262 | - if (! is_string($description)) { |
|
262 | + if (!is_string($description)) { |
|
263 | 263 | continue; |
264 | 264 | } |
265 | 265 | |
266 | 266 | $default = $value[1] ?? null; |
267 | 267 | $filter = $value[2] ?? null; |
268 | - if ($filter !== null && ! is_callable($filter)) { |
|
268 | + if ($filter !== null && !is_callable($filter)) { |
|
269 | 269 | $filter = null; |
270 | 270 | } |
271 | 271 | |
@@ -277,7 +277,7 @@ discard block |
||
277 | 277 | $value = (array) $value; |
278 | 278 | |
279 | 279 | $description = $value[0]; |
280 | - if (! is_string($description)) { |
|
280 | + if (!is_string($description)) { |
|
281 | 281 | continue; |
282 | 282 | } |
283 | 283 | |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | } |
288 | 288 | |
289 | 289 | $console = $this; |
290 | - $action = function (?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
290 | + $action = function(?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) { |
|
291 | 291 | $this->name(); // ne pas retirer. car en cas, d'absence, cs-fixer mettra cette fonction en static. Et php-cli generera une erreur |
292 | 292 | |
293 | 293 | foreach ($instance->required as $package) { |
@@ -298,9 +298,9 @@ discard block |
||
298 | 298 | /** @var Interactor $io */ |
299 | 299 | $io = $console->io(); |
300 | 300 | |
301 | - if (! InstalledVersions::isInstalled($package)) { |
|
301 | + if (!InstalledVersions::isInstalled($package)) { |
|
302 | 302 | $io->info('Cette commande nécessite le package "' . $package . '" mais vous ne l\'avez pas', true); |
303 | - if (! $io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
303 | + if (!$io->confirm('Voulez-vous l\'installer maintenant ?')) { |
|
304 | 304 | return; |
305 | 305 | } |
306 | 306 | |
@@ -316,7 +316,7 @@ discard block |
||
316 | 316 | } |
317 | 317 | |
318 | 318 | $suppress = $suppress ?: $console->suppress; |
319 | - if (! $suppress) { |
|
319 | + if (!$suppress) { |
|
320 | 320 | $console->start($instance); |
321 | 321 | } |
322 | 322 | |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | |
332 | 332 | $result = $instance->setOptions($options)->setArguments($arguments)->execute($parameters); |
333 | 333 | |
334 | - if (! $suppress) { |
|
334 | + if (!$suppress) { |
|
335 | 335 | $console->end(); |
336 | 336 | } |
337 | 337 | |
@@ -346,7 +346,7 @@ discard block |
||
346 | 346 | |
347 | 347 | private function registerException(Logger $logger) |
348 | 348 | { |
349 | - $this->onException(static function (Throwable $e, int $exitCode) use ($logger): void { |
|
349 | + $this->onException(static function(Throwable $e, int $exitCode) use ($logger): void { |
|
350 | 350 | $logger->error((string) $e, ['exitCode' => $exitCode, 'klinge' => true]); |
351 | 351 | }); |
352 | 352 | } |