@@ -459,7 +459,7 @@ discard block |
||
459 | 459 | $this->_streamMode = $options['streamMode'] ?? $this->_streamMode; |
460 | 460 | |
461 | 461 | if (isset($options['stream'])) { |
462 | - if (! $options['stream'] instanceof StreamInterface) { |
|
462 | + if (!$options['stream'] instanceof StreamInterface) { |
|
463 | 463 | throw new InvalidArgumentException('Stream option must be an object that implements StreamInterface'); |
464 | 464 | } |
465 | 465 | $this->stream = $options['stream']; |
@@ -475,7 +475,7 @@ discard block |
||
475 | 475 | $this->_setStatus($options['status']); |
476 | 476 | } |
477 | 477 | |
478 | - if (! isset($options['charset'])) { |
|
478 | + if (!isset($options['charset'])) { |
|
479 | 479 | $options['charset'] = config('app.charset'); |
480 | 480 | } |
481 | 481 | $this->_charset = $options['charset']; |
@@ -523,7 +523,7 @@ discard block |
||
523 | 523 | $charset = true; |
524 | 524 | } |
525 | 525 | |
526 | - if ($charset && ! str_contains($type, ';')) { |
|
526 | + if ($charset && !str_contains($type, ';')) { |
|
527 | 527 | $this->_setHeader('Content-Type', "{$type}; charset={$this->_charset}"); |
528 | 528 | } else { |
529 | 529 | $this->_setHeader('Content-Type', $type); |
@@ -603,7 +603,7 @@ discard block |
||
603 | 603 | protected function _clearHeader(string $header): void |
604 | 604 | { |
605 | 605 | $normalized = strtolower($header); |
606 | - if (! isset($this->headerNames[$normalized])) { |
|
606 | + if (!isset($this->headerNames[$normalized])) { |
|
607 | 607 | return; |
608 | 608 | } |
609 | 609 | $original = $this->headerNames[$normalized]; |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | throw HttpException::invalidStatusCode($code); |
671 | 671 | } |
672 | 672 | |
673 | - if (! array_key_exists($code, $this->_statusCodes) && empty($reasonPhrase)) { |
|
673 | + if (!array_key_exists($code, $this->_statusCodes) && empty($reasonPhrase)) { |
|
674 | 674 | throw HttpException::unkownStatusCode($code); |
675 | 675 | } |
676 | 676 | |
@@ -763,7 +763,7 @@ discard block |
||
763 | 763 | if ($mapped) { |
764 | 764 | return is_array($mapped) ? current($mapped) : $mapped; |
765 | 765 | } |
766 | - if (! str_contains($contentType, '/')) { |
|
766 | + if (!str_contains($contentType, '/')) { |
|
767 | 767 | throw new InvalidArgumentException(sprintf('`%s` est un content type invalide.', $contentType)); |
768 | 768 | } |
769 | 769 | |
@@ -846,7 +846,7 @@ discard block |
||
846 | 846 | */ |
847 | 847 | public function withCache($since, $time = '+1 day'): static |
848 | 848 | { |
849 | - if (! is_int($time)) { |
|
849 | + if (!is_int($time)) { |
|
850 | 850 | $time = strtotime($time); |
851 | 851 | if ($time === false) { |
852 | 852 | throw new InvalidArgumentException( |
@@ -1314,7 +1314,7 @@ discard block |
||
1314 | 1314 | */ |
1315 | 1315 | public function getCookie(string $name): ?array |
1316 | 1316 | { |
1317 | - if (! $this->hasCookie($name)) { |
|
1317 | + if (!$this->hasCookie($name)) { |
|
1318 | 1318 | return null; |
1319 | 1319 | } |
1320 | 1320 | |
@@ -1326,7 +1326,7 @@ discard block |
||
1326 | 1326 | */ |
1327 | 1327 | public function hasCookie(string $name, ?string $value = null): bool |
1328 | 1328 | { |
1329 | - if (! $this->_cookies->has($name)) { |
|
1329 | + if (!$this->_cookies->has($name)) { |
|
1330 | 1330 | return false; |
1331 | 1331 | } |
1332 | 1332 | |
@@ -1403,7 +1403,7 @@ discard block |
||
1403 | 1403 | |
1404 | 1404 | $extension = strtolower($file->getExtension()); |
1405 | 1405 | $mapped = $this->getMimeType($extension); |
1406 | - if ((! $extension || ! $mapped) && $options['download'] === null) { |
|
1406 | + if ((!$extension || !$mapped) && $options['download'] === null) { |
|
1407 | 1407 | $options['download'] = true; |
1408 | 1408 | } |
1409 | 1409 | |
@@ -1465,12 +1465,12 @@ discard block |
||
1465 | 1465 | if (str_contains($path, '../') || str_contains($path, '..\\')) { |
1466 | 1466 | throw new LoadException('The requested file contains `..` and will not be read.'); |
1467 | 1467 | } |
1468 | - if (! is_file($path)) { |
|
1468 | + if (!is_file($path)) { |
|
1469 | 1469 | $path = APP_PATH . $path; |
1470 | 1470 | } |
1471 | 1471 | |
1472 | 1472 | $file = new SplFileInfo($path); |
1473 | - if (! $file->isFile() || ! $file->isReadable()) { |
|
1473 | + if (!$file->isFile() || !$file->isReadable()) { |
|
1474 | 1474 | if (on_dev()) { |
1475 | 1475 | throw new LoadException(sprintf('The requested file %s was not found or not readable', $path)); |
1476 | 1476 | } |
@@ -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 | |
@@ -343,8 +343,8 @@ discard block |
||
343 | 343 | public function resolveGroups() |
344 | 344 | { |
345 | 345 | foreach ($this->queue as $queue) { |
346 | - if (is_string($queue) && ! empty($this->groups[$queue])) { |
|
347 | - if (! is_array($this->groups[$queue])) { |
|
346 | + if (is_string($queue) && !empty($this->groups[$queue])) { |
|
347 | + if (!is_array($this->groups[$queue])) { |
|
348 | 348 | continue; |
349 | 349 | } |
350 | 350 |