@@ -199,7 +199,7 @@ discard block |
||
199 | 199 | */ |
200 | 200 | protected function getRouteInformation(array $route, SampleURIGenerator $uriGenerator, MiddlewareCollector $middlewareCollector): ?array |
201 | 201 | { |
202 | - if (! isset($route['middleware'])) { |
|
202 | + if (!isset($route['middleware'])) { |
|
203 | 203 | $sampleUri = $uriGenerator->get($route['route']); |
204 | 204 | $middlewares = $middlewareCollector->get($route['method'], $sampleUri); |
205 | 205 | $route['middleware'] = implode(' ', array_map(Helpers::classBasename(...), $middlewares)); |
@@ -224,8 +224,8 @@ discard block |
||
224 | 224 | { |
225 | 225 | if ($route['handler'] instanceof Closure) { |
226 | 226 | $path = (new ReflectionFunction($route['handler']))->getFileName(); |
227 | - } elseif (is_string($route['handler']) && ! (str_contains($route['handler'], '(View) ') || str_contains($route['handler'], '(Closure) '))) { |
|
228 | - if (! class_exists($classname = explode('::', $route['handler'])[0])) { |
|
227 | + } elseif (is_string($route['handler']) && !(str_contains($route['handler'], '(View) ') || str_contains($route['handler'], '(Closure) '))) { |
|
228 | + if (!class_exists($classname = explode('::', $route['handler'])[0])) { |
|
229 | 229 | return false; |
230 | 230 | } |
231 | 231 | $path = (new ReflectionClass($classname))->getFileName(); |
@@ -241,13 +241,13 @@ discard block |
||
241 | 241 | */ |
242 | 242 | protected function filterRoute(array $route): ?array |
243 | 243 | { |
244 | - if (($this->option('name') && ! Text::contains((string) $route['name'], $this->option('name'))) |
|
245 | - || ($this->option('handler') && isset($route['handler']) && is_string($route['handler']) && ! Text::contains($route['handler'], $this->option('handler'))) |
|
246 | - || ($this->option('path') && ! Text::contains($route['uri'], $this->option('path'))) |
|
247 | - || ($this->option('method') && ! Text::contains($route['method'], strtoupper($this->option('method')))) |
|
248 | - || ($this->option('domain') && ! Text::contains((string) $route['domain'], $this->option('domain'))) |
|
244 | + if (($this->option('name') && !Text::contains((string) $route['name'], $this->option('name'))) |
|
245 | + || ($this->option('handler') && isset($route['handler']) && is_string($route['handler']) && !Text::contains($route['handler'], $this->option('handler'))) |
|
246 | + || ($this->option('path') && !Text::contains($route['uri'], $this->option('path'))) |
|
247 | + || ($this->option('method') && !Text::contains($route['method'], strtoupper($this->option('method')))) |
|
248 | + || ($this->option('domain') && !Text::contains((string) $route['domain'], $this->option('domain'))) |
|
249 | 249 | || ($this->option('except-vendor') && $route['vendor']) |
250 | - || ($this->option('only-vendor') && ! $route['vendor'])) { |
|
250 | + || ($this->option('only-vendor') && !$route['vendor'])) { |
|
251 | 251 | return null; |
252 | 252 | } |
253 | 253 | |
@@ -362,7 +362,7 @@ discard block |
||
362 | 362 | $options = ['sep' => '-', 'second' => ['fg' => Color::GREEN]]; |
363 | 363 | $this->justify('Nombre total de routes définies', (string) $total, $options); |
364 | 364 | $this->justify('Nombre de routes affichées', (string) $routes->count(), $options); |
365 | - if (! $this->option('method')) { |
|
365 | + if (!$this->option('method')) { |
|
366 | 366 | $this->border(char: '.'); |
367 | 367 | $methods = $routes->map(static fn ($route) => $route['method'])->unique()->sort()->all(); |
368 | 368 |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | |
60 | 60 | if (in_array($prefix, [null, true], true)) { |
61 | 61 | $prefix = 'hex2bin'; |
62 | - } elseif (! in_array($prefix, ['hex2bin', 'base64'], true)) { |
|
62 | + } elseif (!in_array($prefix, ['hex2bin', 'base64'], true)) { |
|
63 | 63 | $prefix = $this->choice('Veuillez utiliser un prefixe validee.', ['hex2bin', 'base64']); // @codeCoverageIgnore |
64 | 64 | } |
65 | 65 | |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | return; |
80 | 80 | } |
81 | 81 | |
82 | - if (! $this->setNewEncryptionKey($encodedKey)) { |
|
82 | + if (!$this->setNewEncryptionKey($encodedKey)) { |
|
83 | 83 | $this->writer->error('Erreur dans la configuration d\'une nouvelle clé de chiffrement dans le fichier `.env`.', true); |
84 | 84 | |
85 | 85 | return; |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | { |
110 | 110 | $currentKey = env('encryption.key', ''); |
111 | 111 | |
112 | - if ($currentKey !== '' && ! $this->confirmOverwrite()) { |
|
112 | + if ($currentKey !== '' && !$this->confirmOverwrite()) { |
|
113 | 113 | // Pas testable car require une entree au clavier |
114 | 114 | return false; // @codeCoverageIgnore |
115 | 115 | } |
@@ -133,8 +133,8 @@ discard block |
||
133 | 133 | $baseEnv = ROOTPATH . '.env.example'; |
134 | 134 | $envFile = ROOTPATH . '.env'; |
135 | 135 | |
136 | - if (! is_file($envFile)) { |
|
137 | - if (! is_file($baseEnv)) { |
|
136 | + if (!is_file($envFile)) { |
|
137 | + if (!is_file($baseEnv)) { |
|
138 | 138 | $this->writer->warn('Le fichier `.env.example` livré par défaut et le fichier `.env` personnalisé sont manquants.'); |
139 | 139 | $this->eol()->write('Voici votre nouvelle clé à la place: '); |
140 | 140 | $this->writer->warn($key, true); |