@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | // Si cela semble être une URL relative, alors convertissez-la en URL complète |
69 | 69 | // pour une meilleure sécurité. |
70 | - if (! str_starts_with($uri, 'http')) { |
|
70 | + if (!str_starts_with($uri, 'http')) { |
|
71 | 71 | $uri = site_url($uri); |
72 | 72 | } |
73 | 73 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | { |
137 | 137 | $request = $this->generator->getRequest(); |
138 | 138 | |
139 | - $intended = $request->method() === 'GET' && ! $request->expectsJson() |
|
139 | + $intended = $request->method() === 'GET' && !$request->expectsJson() |
|
140 | 140 | ? $this->generator->full() |
141 | 141 | : $this->generator->previous(); |
142 | 142 | |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $errors = [$key => $errors]; |
191 | 191 | } |
192 | 192 | |
193 | - if (! empty($errors)) { |
|
193 | + if (!empty($errors)) { |
|
194 | 194 | $this->session->flashErrors($errors, $key); |
195 | 195 | } |
196 | 196 |
@@ -38,7 +38,7 @@ |
||
38 | 38 | $this->queue = $queue; |
39 | 39 | $this->fallback = $fallback; |
40 | 40 | $this->queue->rewind(); |
41 | - $this->queue->resolveGroups(); |
|
41 | + $this->queue->resolveGroups(); |
|
42 | 42 | |
43 | 43 | return $this->handle($request); |
44 | 44 | } |
@@ -43,8 +43,8 @@ discard block |
||
43 | 43 | |
44 | 44 | /** |
45 | 45 | * Groupes de middlewares |
46 | - * |
|
47 | - * @var array<string, array> |
|
46 | + * |
|
47 | + * @var array<string, array> |
|
48 | 48 | */ |
49 | 49 | protected array $groups = []; |
50 | 50 | |
@@ -314,10 +314,10 @@ discard block |
||
314 | 314 | public function register(array $config) |
315 | 315 | { |
316 | 316 | $config += [ |
317 | - 'aliases' => [], |
|
318 | - 'globals' => [], |
|
319 | - 'groups' => [], |
|
320 | - 'build' => static fn () => null, |
|
317 | + 'aliases' => [], |
|
318 | + 'globals' => [], |
|
319 | + 'groups' => [], |
|
320 | + 'build' => static fn () => null, |
|
321 | 321 | ]; |
322 | 322 | |
323 | 323 | $this->aliases($config['aliases']); |
@@ -335,31 +335,31 @@ discard block |
||
335 | 335 | } |
336 | 336 | } |
337 | 337 | |
338 | - /** |
|
339 | - * Resout les groups pour definir les middlewares |
|
340 | - * |
|
341 | - * @internal |
|
342 | - */ |
|
343 | - public function resolveGroups() |
|
344 | - { |
|
345 | - foreach ($this->queue as $queue) { |
|
346 | - if (is_string($queue) && !empty($this->groups[$queue])) { |
|
347 | - if (! is_array($this->groups[$queue])) { |
|
348 | - continue; |
|
349 | - } |
|
350 | - |
|
351 | - $i = array_search($queue, $this->queue); |
|
352 | - $j = 0; |
|
353 | - |
|
354 | - unset($this->queue[$i]); |
|
355 | - |
|
356 | - foreach ($this->groups[$queue] as $middleware) { |
|
357 | - $this->insertAt(($i + $j), $middleware); |
|
358 | - $j++; |
|
359 | - } |
|
360 | - } |
|
361 | - } |
|
362 | - } |
|
338 | + /** |
|
339 | + * Resout les groups pour definir les middlewares |
|
340 | + * |
|
341 | + * @internal |
|
342 | + */ |
|
343 | + public function resolveGroups() |
|
344 | + { |
|
345 | + foreach ($this->queue as $queue) { |
|
346 | + if (is_string($queue) && !empty($this->groups[$queue])) { |
|
347 | + if (! is_array($this->groups[$queue])) { |
|
348 | + continue; |
|
349 | + } |
|
350 | + |
|
351 | + $i = array_search($queue, $this->queue); |
|
352 | + $j = 0; |
|
353 | + |
|
354 | + unset($this->queue[$i]); |
|
355 | + |
|
356 | + foreach ($this->groups[$queue] as $middleware) { |
|
357 | + $this->insertAt(($i + $j), $middleware); |
|
358 | + $j++; |
|
359 | + } |
|
360 | + } |
|
361 | + } |
|
362 | + } |
|
363 | 363 | |
364 | 364 | /** |
365 | 365 | * {@internal} |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | */ |
252 | 252 | public function seek(int $position): void |
253 | 253 | { |
254 | - if (! isset($this->queue[$position])) { |
|
254 | + if (!isset($this->queue[$position])) { |
|
255 | 255 | throw new OutOfBoundsException(sprintf('Invalid seek position (%s).', $position)); |
256 | 256 | } |
257 | 257 | |
@@ -271,7 +271,7 @@ discard block |
||
271 | 271 | */ |
272 | 272 | public function current(): MiddlewareInterface |
273 | 273 | { |
274 | - if (! isset($this->queue[$this->position])) { |
|
274 | + if (!isset($this->queue[$this->position])) { |
|
275 | 275 | throw new OutOfBoundsException(sprintf('Position actuelle non valide (%s).', $this->position)); |
276 | 276 | } |
277 | 277 | |
@@ -344,7 +344,7 @@ discard block |
||
344 | 344 | { |
345 | 345 | foreach ($this->queue as $queue) { |
346 | 346 | if (is_string($queue) && !empty($this->groups[$queue])) { |
347 | - if (! is_array($this->groups[$queue])) { |
|
347 | + if (!is_array($this->groups[$queue])) { |
|
348 | 348 | continue; |
349 | 349 | } |
350 | 350 |