Passed
Push — main ( 1c2b2d...09fd06 )
by Dimitri
13:25 queued 13s
created
src/Http/ServerRequest.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         $this->cookies = $config['cookies'];
257 257
 
258 258
         if (isset($config['uri'])) {
259
-            if (! $config['uri'] instanceof UriInterface) {
259
+            if (!$config['uri'] instanceof UriInterface) {
260 260
                 throw new FrameworkException('The `uri` key must be an instance of ' . UriInterface::class);
261 261
             }
262 262
             $uri = $config['uri'];
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $ref = $this->getEnv('HTTP_REFERER');
397 397
 
398 398
         $base = /* Configure::read('App.fullBaseUrl') .  */ $this->webroot;
399
-        if (! empty($ref) && ! empty($base)) {
399
+        if (!empty($ref) && !empty($base)) {
400 400
             if ($local && strpos($ref, $base) === 0) {
401 401
                 $ref = substr($ref, strlen($base));
402 402
                 if ($ref === '' || strpos($ref, '//') === 0) {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
 
409 409
                 return $ref;
410 410
             }
411
-            if (! $local) {
411
+            if (!$local) {
412 412
                 return $ref;
413 413
             }
414 414
         }
@@ -460,7 +460,7 @@  discard block
 block discarded – undo
460 460
         }
461 461
 
462 462
         $type = strtolower($type);
463
-        if (! isset(static::$_detectors[$type])) {
463
+        if (!isset(static::$_detectors[$type])) {
464 464
             return false;
465 465
         }
466 466
         if ($args) {
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
         foreach ($detect['header'] as $header => $value) {
540 540
             $header = $this->getEnv('http_' . $header);
541 541
             if ($header !== null) {
542
-                if (! is_string($value) && ! is_bool($value) && is_callable($value)) {
542
+                if (!is_string($value) && !is_bool($value) && is_callable($value)) {
543 543
                     return $value($header);
544 544
                 }
545 545
 
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
     public function isAll(array $types): bool
613 613
     {
614 614
         foreach ($types as $type) {
615
-            if (! $this->is($type)) {
615
+            if (!$this->is($type)) {
616 616
                 return false;
617 617
             }
618 618
         }
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
     protected function normalizeHeaderName(string $name): string
716 716
     {
717 717
         $name = str_replace('-', '_', strtoupper($name));
718
-        if (! in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) {
718
+        if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) {
719 719
             $name = 'HTTP_' . $name;
720 720
         }
721 721
 
@@ -898,8 +898,8 @@  discard block
 block discarded – undo
898 898
         $new = clone $this;
899 899
 
900 900
         if (
901
-            ! is_string($method)
902
-            || ! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)
901
+            !is_string($method)
902
+            || !preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)
903 903
         ) {
904 904
             throw new InvalidArgumentException(sprintf(
905 905
                 'Unsupported HTTP method "%s" provided',
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
                 }
1144 1144
             }
1145 1145
 
1146
-            if (! isset($accept[$prefValue])) {
1146
+            if (!isset($accept[$prefValue])) {
1147 1147
                 $accept[$prefValue] = [];
1148 1148
             }
1149 1149
             if ($prefValue) {
@@ -1221,7 +1221,7 @@  discard block
 block discarded – undo
1221 1221
         if ($name === null) {
1222 1222
             return $this->data;
1223 1223
         }
1224
-        if (! is_array($this->data) && $name) {
1224
+        if (!is_array($this->data) && $name) {
1225 1225
             return $default;
1226 1226
         }
1227 1227
 
@@ -1362,7 +1362,7 @@  discard block
 block discarded – undo
1362 1362
      */
1363 1363
     public function withProtocolVersion($version): self
1364 1364
     {
1365
-        if (! preg_match('/^(1\.[01]|2)$/', $version)) {
1365
+        if (!preg_match('/^(1\.[01]|2)$/', $version)) {
1366 1366
             throw new InvalidArgumentException("Unsupported protocol version '{$version}' provided");
1367 1367
         }
1368 1368
         $new           = clone $this;
@@ -1384,7 +1384,7 @@  discard block
 block discarded – undo
1384 1384
     public function getEnv(string $key, ?string $default = null): ?string
1385 1385
     {
1386 1386
         $key = strtoupper($key);
1387
-        if (! array_key_exists($key, $this->_environment)) {
1387
+        if (!array_key_exists($key, $this->_environment)) {
1388 1388
             $this->_environment[$key] = env($key);
1389 1389
         }
1390 1390
 
@@ -1596,7 +1596,7 @@  discard block
 block discarded – undo
1596 1596
         $file = Arr::get($this->uploadedFiles, $path);
1597 1597
         if (is_array($file)) {
1598 1598
             foreach ($file as $f) {
1599
-                if (! ($f instanceof UploadedFile)) {
1599
+                if (!($f instanceof UploadedFile)) {
1600 1600
                     return null;
1601 1601
                 }
1602 1602
             }
@@ -1604,7 +1604,7 @@  discard block
 block discarded – undo
1604 1604
             return $file;
1605 1605
         }
1606 1606
 
1607
-        if (! ($file instanceof UploadedFile)) {
1607
+        if (!($file instanceof UploadedFile)) {
1608 1608
             return null;
1609 1609
         }
1610 1610
 
@@ -1652,7 +1652,7 @@  discard block
 block discarded – undo
1652 1652
                 continue;
1653 1653
             }
1654 1654
 
1655
-            if (! $file instanceof UploadedFileInterface) {
1655
+            if (!$file instanceof UploadedFileInterface) {
1656 1656
                 throw new InvalidArgumentException("Invalid file at '{$path}{$key}'");
1657 1657
             }
1658 1658
         }
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
         }
1704 1704
 
1705 1705
         $host = $uri->getHost();
1706
-        if (! $host) {
1706
+        if (!$host) {
1707 1707
             return $new;
1708 1708
         }
1709 1709
         $port = $uri->getPort();
@@ -1810,7 +1810,7 @@  discard block
 block discarded – undo
1810 1810
         $validLocales = config('app.supported_locales');
1811 1811
         // S'il ne s'agit pas d'un paramètre régional valide, définissez-le
1812 1812
         // aux paramètres régionaux par défaut du site.
1813
-        if (! in_array($locale, $validLocales, true)) {
1813
+        if (!in_array($locale, $validLocales, true)) {
1814 1814
             $locale = config('app.language');
1815 1815
         }
1816 1816
 
Please login to merge, or discard this patch.
src/Http/Uri.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -172,11 +172,11 @@  discard block
 block discarded – undo
172 172
 
173 173
         $authority = $this->host;
174 174
 
175
-        if (! empty($this->getUserInfo())) {
175
+        if (!empty($this->getUserInfo())) {
176 176
             $authority = $this->getUserInfo() . '@' . $authority;
177 177
         }
178 178
 
179
-        if (! empty($this->port) && ! $ignorePort) {
179
+        if (!empty($this->port) && !$ignorePort) {
180 180
             // N'ajoute pas de port s'il s'agit d'un port standard pour ce schéma
181 181
             if ($this->port !== $this->defaultPorts[$this->scheme]) {
182 182
                 $authority .= ':' . $this->port;
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
     {
196 196
         $userInfo = $this->user;
197 197
 
198
-        if ($this->showPassword === true && ! empty($this->password)) {
198
+        if ($this->showPassword === true && !empty($this->password)) {
199 199
             $userInfo .= ':' . $this->password;
200 200
         }
201 201
 
@@ -245,7 +245,7 @@  discard block
 block discarded – undo
245 245
         $vars = $this->query;
246 246
 
247 247
         if (array_key_exists('except', $options)) {
248
-            if (! is_array($options['except'])) {
248
+            if (!is_array($options['except'])) {
249 249
                 $options['except'] = [$options['except']];
250 250
             }
251 251
 
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
         } elseif (array_key_exists('only', $options)) {
256 256
             $temp = [];
257 257
 
258
-            if (! is_array($options['only'])) {
258
+            if (!is_array($options['only'])) {
259 259
                 $options['only'] = [$options['only']];
260 260
             }
261 261
 
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
     public static function createURIString(?string $scheme = null, ?string $authority = null, ?string $path = null, ?string $query = null, ?string $fragment = null): string
357 357
     {
358 358
         $uri = '';
359
-        if (! empty($scheme)) {
359
+        if (!empty($scheme)) {
360 360
             $uri .= $scheme . '://';
361 361
         }
362 362
 
363
-        if (! empty($authority)) {
363
+        if (!empty($authority)) {
364 364
             $uri .= $authority;
365 365
         }
366 366
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
     {
387 387
         $parts = parse_url($str);
388 388
 
389
-        if (empty($parts['host']) && ! empty($parts['path'])) {
389
+        if (empty($parts['host']) && !empty($parts['path'])) {
390 390
             $parts['host'] = $parts['path'];
391 391
             unset($parts['path']);
392 392
         }
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
         }
532 532
 
533 533
         // Ne peut pas avoir de début ?
534
-        if (! empty($query) && strpos($query, '?') === 0) {
534
+        if (!empty($query) && strpos($query, '?') === 0) {
535 535
             $query = substr($query, 1);
536 536
         }
537 537
 
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
         $temp = [];
597 597
 
598 598
         foreach ($this->query as $key => $value) {
599
-            if (! in_array($key, $params, true)) {
599
+            if (!in_array($key, $params, true)) {
600 600
                 continue;
601 601
             }
602 602
 
@@ -667,19 +667,19 @@  discard block
 block discarded – undo
667 667
      */
668 668
     protected function applyParts(array $parts)
669 669
     {
670
-        if (! empty($parts['host'])) {
670
+        if (!empty($parts['host'])) {
671 671
             $this->host = $parts['host'];
672 672
         }
673
-        if (! empty($parts['user'])) {
673
+        if (!empty($parts['user'])) {
674 674
             $this->user = $parts['user'];
675 675
         }
676
-        if (! empty($parts['path'])) {
676
+        if (!empty($parts['path'])) {
677 677
             $this->path = $this->filterPath($parts['path']);
678 678
         }
679
-        if (! empty($parts['query'])) {
679
+        if (!empty($parts['query'])) {
680 680
             $this->setQuery($parts['query']);
681 681
         }
682
-        if (! empty($parts['fragment'])) {
682
+        if (!empty($parts['fragment'])) {
683 683
             $this->fragment = $parts['fragment'];
684 684
         }
685 685
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
             $this->password = $parts['pass'];
702 702
         }
703 703
 
704
-        if (! empty($parts['path'])) {
704
+        if (!empty($parts['path'])) {
705 705
             $this->segments = explode('/', trim($parts['path'], '/'));
706 706
         }
707 707
     }
@@ -728,7 +728,7 @@  discard block
 block discarded – undo
728 728
         $transformed = clone $relative;
729 729
 
730 730
         // 5.2.2 Transformer les références dans une méthode non stricte (pas de schéma)
731
-        if (! empty($relative->getAuthority())) {
731
+        if (!empty($relative->getAuthority())) {
732 732
             $transformed->setAuthority($relative->getAuthority())
733 733
                 ->setPath($relative->getPath())
734 734
                 ->setQuery($relative->getQuery());
@@ -768,7 +768,7 @@  discard block
 block discarded – undo
768 768
      */
769 769
     protected function mergePaths(self $base, self $reference): string
770 770
     {
771
-        if (! empty($base->getAuthority()) && empty($base->getPath())) {
771
+        if (!empty($base->getAuthority()) && empty($base->getPath())) {
772 772
             return '/' . ltrim($reference->getPath(), '/ ');
773 773
         }
774 774
 
Please login to merge, or discard this patch.
src/Router/Dispatcher.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
             $controller = $routes->getDefaultController();
173 173
         }
174 174
 
175
-        if (! $fullName && is_string($controller)) {
175
+        if (!$fullName && is_string($controller)) {
176 176
             $controller = str_replace($routes->getDefaultNamespace(), '', $controller);
177 177
         }
178 178
 
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
                 require_once $routes_file;
272 272
             }
273 273
         }
274
-        if (empty($routes) || ! ($routes instanceof RouteCollection)) {
274
+        if (empty($routes) || !($routes instanceof RouteCollection)) {
275 275
             $routes = Services::routes();
276 276
         }
277 277
 
@@ -281,14 +281,14 @@  discard block
 block discarded – undo
281 281
         $routeMiddlewares = (array) $this->dispatchRoutes($routes);
282 282
 
283 283
         // The bootstrapping in a middleware
284
-        $this->middleware->append(function (ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface {
284
+        $this->middleware->append(function(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface {
285 285
             $returned = $this->startController($request, $response);
286 286
 
287 287
             // Closure controller has run in startController().
288
-            if (! is_callable($this->controller)) {
288
+            if (!is_callable($this->controller)) {
289 289
                 $controller = $this->createController($request, $response);
290 290
 
291
-                if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) {
291
+                if (!method_exists($controller, '_remap') && !is_callable([$controller, $this->method], false)) {
292 292
                     throw PageNotFoundException::methodNotFound($this->method);
293 293
                 }
294 294
 
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
          */
327 327
         $this->gatherOutput($this->middleware->handle($this->request));
328 328
 
329
-        if (! $returnResponse) {
329
+        if (!$returnResponse) {
330 330
             $this->sendResponse();
331 331
         }
332 332
 
@@ -374,14 +374,14 @@  discard block
 block discarded – undo
374 374
             return;
375 375
         }
376 376
 
377
-        if (is_cli() && ! on_test()) {
377
+        if (is_cli() && !on_test()) {
378 378
             // @codeCoverageIgnoreStart
379 379
             // $this->request = Services::clirequest($this->config);
380 380
         // @codeCoverageIgnoreEnd
381 381
         }
382 382
 
383 383
         $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1';
384
-        if (! is_numeric($version)) {
384
+        if (!is_numeric($version)) {
385 385
             $version = substr($version, strpos($version, '/') + 1);
386 386
         }
387 387
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
         // Supposons le succès jusqu'à preuve du contraire.
401 401
         $this->response = Services::response()->withStatus(200);
402 402
 
403
-        if (! is_cli() || on_test()) {
403
+        if (!is_cli() || on_test()) {
404 404
         }
405 405
 
406 406
         $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion());
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     {
437 437
         if ($cachedResponse = Services::cache()->read($this->generateCacheName())) {
438 438
             $cachedResponse = unserialize($cachedResponse);
439
-            if (! is_array($cachedResponse) || ! isset($cachedResponse['output']) || ! isset($cachedResponse['headers'])) {
439
+            if (!is_array($cachedResponse) || !isset($cachedResponse['output']) || !isset($cachedResponse['headers'])) {
440 440
                 throw new FrameworkException('Error unserializing page cache');
441 441
             }
442 442
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
      */
566 566
     protected function determinePath(): string
567 567
     {
568
-        if (! empty($this->path)) {
568
+        if (!empty($this->path)) {
569 569
             return $this->path;
570 570
         }
571 571
 
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
         }
618 618
 
619 619
         // Essayez de charger automatiquement la classe
620
-        if (! class_exists($this->controller, true) || $this->method[0] === '_') {
620
+        if (!class_exists($this->controller, true) || $this->method[0] === '_') {
621 621
             throw PageNotFoundException::controllerNotFound($this->controller, $this->method);
622 622
         }
623 623
 
@@ -705,7 +705,7 @@  discard block
 block discarded – undo
705 705
         // Affiche l'erreur 404
706 706
         $this->response = $this->response->withStatus($e->getCode());
707 707
 
708
-        if (! on_test()) {
708
+        if (!on_test()) {
709 709
             // @codeCoverageIgnoreStart
710 710
             if (ob_get_level() > 0) {
711 711
                 ob_end_flush();
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
             ob_end_flush(); // @codeCoverageIgnore
718 718
         }
719 719
 
720
-        throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : '');
720
+        throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : '');
721 721
     }
722 722
 
723 723
     /**
@@ -772,7 +772,7 @@  discard block
 block discarded – undo
772 772
     public function storePreviousURL($uri)
773 773
     {
774 774
         // Ignorer les requêtes CLI
775
-        if (is_cli() && ! on_test()) {
775
+        if (is_cli() && !on_test()) {
776 776
             return; // @codeCoverageIgnore
777 777
         }
778 778
 
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
         $this->middleware->prepend($this->spoofRequestMethod());
837 837
 
838 838
         $middlewaresFile = CONFIG_PATH . 'middlewares.php';
839
-        if (file_exists($middlewaresFile) && ! in_array($middlewaresFile, get_included_files(), true)) {
839
+        if (file_exists($middlewaresFile) && !in_array($middlewaresFile, get_included_files(), true)) {
840 840
             $middleware = require $middlewaresFile;
841 841
             if (is_callable($middleware)) {
842 842
                 $middlewareQueue = $middleware($this->middleware, $this->request);
@@ -853,11 +853,11 @@  discard block
 block discarded – undo
853 853
      */
854 854
     private function spoofRequestMethod(): callable
855 855
     {
856
-        return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) {
856
+        return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) {
857 857
             $post = $request->getParsedBody();
858 858
 
859 859
             // Ne fonctionne qu'avec les formulaires POST
860
-            if (strtoupper($request->getMethod()) === 'POST' && ! empty($post['_method'])) {
860
+            if (strtoupper($request->getMethod()) === 'POST' && !empty($post['_method'])) {
861 861
                 // Accepte seulement PUT, PATCH, DELETE
862 862
                 if (in_array(strtoupper($post['_method']), ['PUT', 'PATCH', 'DELETE'], true)) {
863 863
                     $request = $request->withMethod($post['_method']);
Please login to merge, or discard this patch.
src/Router/AutoRouter.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -101,14 +101,14 @@  discard block
 block discarded – undo
101 101
 
102 102
         $controllerName = $this->controllerName();
103 103
 
104
-        if (! $this->isValidSegment($controllerName)) {
104
+        if (!$this->isValidSegment($controllerName)) {
105 105
             throw new PageNotFoundException($this->controller . ' is not a valid controller name');
106 106
         }
107 107
 
108 108
         // Utilise le nom de la méthode s'il existe.
109 109
         // Si ce n'est pas le cas, ce n'est pas grave - le nom de la méthode par défaut
110 110
         // a déjà été défini.
111
-        if (! empty($segments)) {
111
+        if (!empty($segments)) {
112 112
             $this->setMethod(array_shift($segments) ?: $this->method);
113 113
         }
114 114
 
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         /** @var array $params An array of params to the controller method. */
121 121
         $params = [];
122 122
 
123
-        if (! empty($segments)) {
123
+        if (!empty($segments)) {
124 124
             $params = $segments;
125 125
         }
126 126
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $controller = strtolower($controller);
135 135
 
136 136
             foreach ($this->protectedControllers as $controllerInRoute) {
137
-                if (! is_string($controllerInRoute)) {
137
+                if (!is_string($controllerInRoute)) {
138 138
                     continue;
139 139
                 }
140 140
                 if (strtolower($controllerInRoute) !== $controller) {
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
                 $this->translateURIDashes ? str_replace('-', '_', $segments[0]) : $segments[0]
197 197
             );
198 198
             // dès que nous rencontrons un segment non conforme à PSR-4, arrêtons la recherche
199
-            if (! $this->isValidSegment($segmentConvert)) {
199
+            if (!$this->isValidSegment($segmentConvert)) {
200 200
                 return $segments;
201 201
             }
202 202
 
203 203
             $test = CONTROLLER_PATH . $this->directory . $segmentConvert;
204 204
 
205 205
             // tant que chaque segment n'est *pas* un fichier de contrôleur mais correspond à un répertoire, ajoutez-le à $this->répertoire
206
-            if (! is_file($test . '.php') && is_dir($test)) {
206
+            if (!is_file($test . '.php') && is_dir($test)) {
207 207
                 $this->setDirectory($segmentConvert, true, false);
208 208
                 array_shift($segments);
209 209
 
@@ -244,7 +244,7 @@  discard block
 block discarded – undo
244 244
             $segments = explode('/', trim($dir, '/'));
245 245
 
246 246
             foreach ($segments as $segment) {
247
-                if (! $this->isValidSegment($segment)) {
247
+                if (!$this->isValidSegment($segment)) {
248 248
                     return;
249 249
                 }
250 250
             }
@@ -263,7 +263,7 @@  discard block
 block discarded – undo
263 263
      */
264 264
     public function directory(): string
265 265
     {
266
-        return ! empty($this->directory) ? $this->directory : '';
266
+        return !empty($this->directory) ? $this->directory : '';
267 267
     }
268 268
 
269 269
     /**
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     private function controllerName()
275 275
     {
276
-        if (! is_string($this->controller)) {
276
+        if (!is_string($this->controller)) {
277 277
             return $this->controller;
278 278
         }
279 279
 
Please login to merge, or discard this patch.
src/Router/Router.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         // Toujours là ? Ensuite, nous pouvons essayer de faire correspondre l'URI avec
160 160
         // Contrôleurs/répertoires, mais l'application peut ne pas
161 161
         // vouloir ceci, comme dans le cas des API.
162
-        if (! $this->collection->shouldAutoRoute()) {
162
+        if (!$this->collection->shouldAutoRoute()) {
163 163
             $verb = strtolower($this->collection->getHTTPVerb());
164 164
 
165 165
             throw new PageNotFoundException("Can't find a route for '{$verb}: {$uri}'.");
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
      */
188 188
     public function controllerName()
189 189
     {
190
-        if (! is_string($this->controller)) {
190
+        if (!is_string($this->controller)) {
191 191
             return $this->controller;
192 192
         }
193 193
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
             return [
223 223
                 $routeArray[0], // Controller
224
-                $routeArray[1] ?? 'index',   // Method
224
+                $routeArray[1] ?? 'index', // Method
225 225
             ];
226 226
         }
227 227
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
                 // Cette route est-elle censée rediriger vers une autre ?
346 346
                 if ($this->collection->isRedirect($routeKey)) {
347 347
                     // remplacement des groupes de routes correspondants par des références : post/([0-9]+) -> post/$1
348
-                    $redirectTo = preg_replace_callback('/(\([^\(]+\))/', static function () {
348
+                    $redirectTo = preg_replace_callback('/(\([^\(]+\))/', static function() {
349 349
                         static $i = 1;
350 350
 
351 351
                         return '$' . $i++;
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
 
371 371
                 // Utilisons-nous Closures ? Si tel est le cas, nous devons collecter les paramètres dans un tableau
372 372
                 // afin qu'ils puissent être transmis ultérieurement à la méthode du contrôleur.
373
-                if (! is_string($handler) && is_callable($handler)) {
373
+                if (!is_string($handler) && is_callable($handler)) {
374 374
                     $this->controller = $handler;
375 375
 
376 376
                     // Supprime la chaîne d'origine du tableau matches
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 
465 465
         // $this->method contient déjà le nom de la méthode par défaut,
466 466
         // donc ne l'écrasez pas avec le vide.
467
-        if (! empty($method)) {
467
+        if (!empty($method)) {
468 468
             $this->setMethod($method);
469 469
         }
470 470
 
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             $this->method = $this->collection->getDefaultMethod();
488 488
         }
489 489
 
490
-        if (! is_file(CONTROLLER_PATH . $this->directory . $this->makeController($class) . '.php')) {
490
+        if (!is_file(CONTROLLER_PATH . $this->directory . $this->makeController($class) . '.php')) {
491 491
             return;
492 492
         }
493 493
 
Please login to merge, or discard this patch.
src/Router/RouteCollection.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
      */
220 220
     public function addPlaceholder($placeholder, ?string $pattern = null): self
221 221
     {
222
-        if (! is_array($placeholder)) {
222
+        if (!is_array($placeholder)) {
223 223
             $placeholder = [$placeholder => $pattern];
224 224
         }
225 225
 
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
             foreach ($collection as $name => $r) {
406 406
                 $key = key($r['route']);
407 407
 
408
-                if (! $withName) {
408
+                if (!$withName) {
409 409
                     $routes[$key] = $r['route'][$key];
410 410
                 } else {
411 411
                     $routes[$key] = [
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
      *
787 787
      * @param array|Closure|string $to
788 788
      */
789
-    public function match(array $verbs = [], string $from = '', $to = '', ?array $options = null): self
789
+    public function match(array $verbs = [], string $from = '', $to = '', ?array $options = null) : self
790 790
     {
791 791
         if (empty($from) || empty($to)) {
792 792
             throw new InvalidArgumentException('You must supply the parameters: from, to.');
@@ -931,7 +931,7 @@  discard block
 block discarded – undo
931 931
                 $to   = $route['route'][$from];
932 932
 
933 933
                 // on ignore les closures
934
-                if (! is_string($to)) {
934
+                if (!is_string($to)) {
935 935
                     continue;
936 936
                 }
937 937
 
@@ -1013,7 +1013,7 @@  discard block
 block discarded – undo
1013 1013
         // Construire notre chaîne résultante, en insérant les $params dans
1014 1014
         // les endroits appropriés.
1015 1015
         foreach ($matches[0] as $index => $pattern) {
1016
-            if (! preg_match('#^' . $pattern . '$#u', $params[$index])) {
1016
+            if (!preg_match('#^' . $pattern . '$#u', $params[$index])) {
1017 1017
                 throw RouterException::invalidParameterType();
1018 1018
             }
1019 1019
 
@@ -1058,7 +1058,7 @@  discard block
 block discarded – undo
1058 1058
         }
1059 1059
 
1060 1060
         // Limitation du nom d'hôte ?
1061
-        if (! empty($options['hostname'])) {
1061
+        if (!empty($options['hostname'])) {
1062 1062
             // @todo determine if there's a way to whitelist hosts?
1063 1063
             if (isset($_SERVER['HTTP_HOST']) && strtolower($_SERVER['HTTP_HOST']) !== strtolower($options['hostname'])) {
1064 1064
                 return;
@@ -1068,10 +1068,10 @@  discard block
 block discarded – undo
1068 1068
         }
1069 1069
 
1070 1070
         // Limitation du nom sous-domaine ?
1071
-        elseif (! empty($options['subdomain'])) {
1071
+        elseif (!empty($options['subdomain'])) {
1072 1072
             // Si nous ne correspondons pas au sous-domaine actuel, alors
1073 1073
             // nous n'avons pas besoin d'ajouter la route.
1074
-            if (! $this->checkSubdomains($options['subdomain'])) {
1074
+            if (!$this->checkSubdomains($options['subdomain'])) {
1075 1075
                 return;
1076 1076
             }
1077 1077
 
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
         }
1103 1103
 
1104 1104
         // S'il s'agit d'une redirection, aucun traitement
1105
-        if (! isset($options['redirect']) && is_string($to)) {
1105
+        if (!isset($options['redirect']) && is_string($to)) {
1106 1106
             // Si aucun espace de noms n'est trouvé, ajouter l'espace de noms par défaut
1107 1107
             if (strpos($to, '\\') === false || strpos($to, '\\') > 0) {
1108 1108
                 $namespace = $options['namespace'] ?? $this->defaultNamespace;
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
         // les routes manuelement définies doivent toujours être la "source de vérité".
1121 1121
         // cela ne fonctionne que parce que les routes découvertes sont ajoutées juste avant
1122 1122
         // pour tenter de router la requête.
1123
-        if (isset($this->routes[$verb][$name]) && ! $overwrite) {
1123
+        if (isset($this->routes[$verb][$name]) && !$overwrite) {
1124 1124
             return;
1125 1125
         }
1126 1126
 
@@ -1145,7 +1145,7 @@  discard block
 block discarded – undo
1145 1145
     private function checkSubdomains($subdomains): bool
1146 1146
     {
1147 1147
         // Les appels CLI ne peuvent pas être sur le sous-domaine.
1148
-        if (! isset($_SERVER['HTTP_HOST'])) {
1148
+        if (!isset($_SERVER['HTTP_HOST'])) {
1149 1149
             return false;
1150 1150
         }
1151 1151
 
@@ -1153,13 +1153,13 @@  discard block
 block discarded – undo
1153 1153
             $this->currentSubdomain = $this->determineCurrentSubdomain();
1154 1154
         }
1155 1155
 
1156
-        if (! is_array($subdomains)) {
1156
+        if (!is_array($subdomains)) {
1157 1157
             $subdomains = [$subdomains];
1158 1158
         }
1159 1159
 
1160 1160
         // Les routes peuvent être limitées à n'importe quel sous-domaine. Dans ce cas, cependant,
1161 1161
         // il nécessite la présence d'un sous-domaine.
1162
-        if (! empty($this->currentSubdomain) && in_array('*', $subdomains, true)) {
1162
+        if (!empty($this->currentSubdomain) && in_array('*', $subdomains, true)) {
1163 1163
             return true;
1164 1164
         }
1165 1165
 
@@ -1285,7 +1285,7 @@  discard block
 block discarded – undo
1285 1285
         $controllers = [];
1286 1286
 
1287 1287
         foreach ($routes as $handler) {
1288
-            if (! is_string($handler)) {
1288
+            if (!is_string($handler)) {
1289 1289
                 continue;
1290 1290
             }
1291 1291
 
Please login to merge, or discard this patch.
src/Cache/Handlers/File.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         parent::init($config);
71 71
 
72 72
         if ($this->_config['path'] === null) {
73
-            $this->_config['path'] = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'blitz-php' .DIRECTORY_SEPARATOR .'cache' . DIRECTORY_SEPARATOR;
73
+            $this->_config['path'] = sys_get_temp_dir() . DIRECTORY_SEPARATOR . 'blitz-php' . DIRECTORY_SEPARATOR . 'cache' . DIRECTORY_SEPARATOR;
74 74
         }
75 75
         if (substr($this->_config['path'], -1) !== DIRECTORY_SEPARATOR) {
76 76
             $this->_config['path'] .= DIRECTORY_SEPARATOR;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     public function set($key, $value, $ttl = null): bool
89 89
     {
90
-        if ($value === '' || ! $this->_init) {
90
+        if ($value === '' || !$this->_init) {
91 91
             return false;
92 92
         }
93 93
 
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             return false;
98 98
         }
99 99
 
100
-        if (! empty($this->_config['serialize'])) {
100
+        if (!empty($this->_config['serialize'])) {
101 101
             $value = serialize($value);
102 102
         }
103 103
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         $key = $this->_key($key);
132 132
 
133
-        if (! $this->_init || $this->_setKey($key) === false) {
133
+        if (!$this->_init || $this->_setKey($key) === false) {
134 134
             return $default;
135 135
         }
136 136
 
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 
168 168
         $data = trim($data);
169 169
 
170
-        if ($data !== '' && ! empty($this->_config['serialize'])) {
170
+        if ($data !== '' && !empty($this->_config['serialize'])) {
171 171
             $data = unserialize($data);
172 172
         }
173 173
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
     {
182 182
         $key = $this->_key($key);
183 183
 
184
-        if ($this->_setKey($key) === false || ! $this->_init) {
184
+        if ($this->_setKey($key) === false || !$this->_init) {
185 185
             return false;
186 186
         }
187 187
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function clear(): bool
205 205
     {
206
-        if (! $this->_init) {
206
+        if (!$this->_init) {
207 207
             return false;
208 208
         }
209 209
         $this->_File = null;
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
             }
229 229
 
230 230
             $realPath = $fileInfo->getRealPath();
231
-            if (! $realPath) {
231
+            if (!$realPath) {
232 232
                 unset($fileInfo);
233 233
 
234 234
                 continue;
235 235
             }
236 236
 
237 237
             $path = $realPath . DIRECTORY_SEPARATOR;
238
-            if (! in_array($path, $cleared, true)) {
238
+            if (!in_array($path, $cleared, true)) {
239 239
                 $this->_clearDirectory($path);
240 240
                 $cleared[] = $path;
241 241
             }
@@ -256,12 +256,12 @@  discard block
 block discarded – undo
256 256
      */
257 257
     protected function _clearDirectory(string $path): void
258 258
     {
259
-        if (! is_dir($path)) {
259
+        if (!is_dir($path)) {
260 260
             return;
261 261
         }
262 262
 
263 263
         $dir = dir($path);
264
-        if (! $dir) {
264
+        if (!$dir) {
265 265
             return;
266 266
         }
267 267
 
@@ -327,13 +327,13 @@  discard block
 block discarded – undo
327 327
         }
328 328
         $dir = $this->_config['path'] . $groups;
329 329
 
330
-        if (! is_dir($dir)) {
330
+        if (!is_dir($dir)) {
331 331
             mkdir($dir, 0775, true);
332 332
         }
333 333
 
334 334
         $path = new SplFileInfo($dir . $key);
335 335
 
336
-        if (! $createKey && ! $path->isFile()) {
336
+        if (!$createKey && !$path->isFile()) {
337 337
             return false;
338 338
         }
339 339
         if (
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
             }
353 353
             unset($path);
354 354
 
355
-            if (! $exists && ! chmod($this->_File->getPathname(), (int) $this->_config['mask'])) {
355
+            if (!$exists && !chmod($this->_File->getPathname(), (int) $this->_config['mask'])) {
356 356
                 trigger_error(sprintf(
357 357
                     'Could not apply permission mask "%s" on cache file "%s"',
358 358
                     $this->_File->getPathname(),
@@ -372,14 +372,14 @@  discard block
 block discarded – undo
372 372
         $dir     = new SplFileInfo($this->_config['path']);
373 373
         $path    = $dir->getPathname();
374 374
         $success = true;
375
-        if (! is_dir($path)) {
375
+        if (!is_dir($path)) {
376 376
             // phpcs:disable
377 377
             $success = @mkdir($path, 0775, true);
378 378
             // phpcs:enable
379 379
         }
380 380
 
381 381
         $isWritableDir = ($dir->isDir() && $dir->isWritable());
382
-        if (! $success || ($this->_init && ! $isWritableDir)) {
382
+        if (!$success || ($this->_init && !$isWritableDir)) {
383 383
             $this->_init = false;
384 384
             trigger_error(sprintf(
385 385
                 '%s is not writable',
@@ -423,8 +423,8 @@  discard block
 block discarded – undo
423 423
         );
424 424
         $filtered = new CallbackFilterIterator(
425 425
             $contents,
426
-            static function (SplFileInfo $current) use ($group, $prefix) {
427
-                if (! $current->isFile()) {
426
+            static function(SplFileInfo $current) use ($group, $prefix) {
427
+                if (!$current->isFile()) {
428 428
                     return false;
429 429
                 }
430 430
 
Please login to merge, or discard this patch.
src/Utilities/Jwt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
             $returned = $payload->data ?? $payload;
115 115
         }
116 116
 
117
-        if (! $full) {
117
+        if (!$full) {
118 118
             unset($returned->iat, $returned->iss, $returned->exp);
119 119
         }
120 120
 
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     {
145 145
         $authorization = self::getAuthorization();
146 146
 
147
-        if (! empty($authorization) && preg_match('/Bearer\s(\S+)/', $authorization, $matches)) {
147
+        if (!empty($authorization) && preg_match('/Bearer\s(\S+)/', $authorization, $matches)) {
148 148
             return $matches[1];
149 149
         }
150 150
 
Please login to merge, or discard this patch.
src/Utilities/Helpers.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     {
26 26
         static $_is_php;
27 27
 
28
-        if (! isset($_is_php[$version])) {
28
+        if (!isset($_is_php[$version])) {
29 29
             $_is_php[$version] = version_compare(PHP_VERSION, $version, '>=');
30 30
         }
31 31
 
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
         $host = explode(':', $_SERVER['HTTP_HOST'] ?? '')[0];
41 41
 
42 42
         return
43
-            ! empty($host) // Si c'est vide, ca veut certainement dire qu'on est en CLI, or le CLI << n'est pas >> utilisé en ligne
44
-            && ! in_array($host, ['localhost', '127.0.0.1'], true)
45
-            && ! preg_match('#\.dev$#', $host)
46
-            && ! preg_match('#\.test$#', $host)
47
-            && ! preg_match('#\.lab$#', $host)
48
-            && ! preg_match('#\.loc(al)?$#', $host)
49
-            && ! preg_match('#^192\.168#', $host);
43
+            !empty($host) // Si c'est vide, ca veut certainement dire qu'on est en CLI, or le CLI << n'est pas >> utilisé en ligne
44
+            && !in_array($host, ['localhost', '127.0.0.1'], true)
45
+            && !preg_match('#\.dev$#', $host)
46
+            && !preg_match('#\.test$#', $host)
47
+            && !preg_match('#\.lab$#', $host)
48
+            && !preg_match('#\.loc(al)?$#', $host)
49
+            && !preg_match('#^192\.168#', $host);
50 50
     }
51 51
 
52 52
     /**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     public static function isReallyWritable(string $file): bool
65 65
     {
66 66
         // If we're on a Unix server with safe_mode off we call is_writable
67
-        if (DIRECTORY_SEPARATOR === '/' || ! ini_get('safe_mode')) {
67
+        if (DIRECTORY_SEPARATOR === '/' || !ini_get('safe_mode')) {
68 68
             return is_writable($file);
69 69
         }
70 70
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
             return true;
85 85
         }
86
-        if (! is_file($file) || ($fp = @fopen($file, 'ab')) === false) {
86
+        if (!is_file($file) || ($fp = @fopen($file, 'ab')) === false) {
87 87
             return false;
88 88
         }
89 89
 
@@ -97,23 +97,23 @@  discard block
 block discarded – undo
97 97
         $path  = parse_url($url);
98 98
         $query = '';
99 99
 
100
-        if (! empty($path['host'])) {
100
+        if (!empty($path['host'])) {
101 101
             $r = $path['scheme'] . '://';
102
-            if (! empty($path['user'])) {
102
+            if (!empty($path['user'])) {
103 103
                 $r .= $path['user'];
104
-                if (! empty($path['pass'])) {
104
+                if (!empty($path['pass'])) {
105 105
                     $r .= ':' . $path['pass'] . '@';
106 106
                 }
107 107
                 $r .= '@';
108 108
             }
109
-            if (! empty($path['host'])) {
109
+            if (!empty($path['host'])) {
110 110
                 $r .= $path['host'];
111 111
             }
112
-            if (! empty($path['port'])) {
112
+            if (!empty($path['port'])) {
113 113
                 $r .= ':' . $path['port'];
114 114
             }
115 115
             $url = $r . $path['path'];
116
-            if (! empty($path['query'])) {
116
+            if (!empty($path['query'])) {
117 117
                 $query = '?' . $path['query'];
118 118
             }
119 119
         }
@@ -137,12 +137,12 @@  discard block
 block discarded – undo
137 137
         $non_displayables = [];
138 138
 
139 139
         if ($url_encoded) {
140
-            $non_displayables[] = '/%0[0-8bcef]/i';	// url encoded 00-08, 11, 12, 14, 15
141
-            $non_displayables[] = '/%1[0-9a-f]/i';	// url encoded 16-31
142
-            $non_displayables[] = '/%7f/i';	// url encoded 127
140
+            $non_displayables[] = '/%0[0-8bcef]/i'; // url encoded 00-08, 11, 12, 14, 15
141
+            $non_displayables[] = '/%1[0-9a-f]/i'; // url encoded 16-31
142
+            $non_displayables[] = '/%7f/i'; // url encoded 127
143 143
         }
144 144
 
145
-        $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S';	// 00-08, 11, 12, 14-31, 127
145
+        $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127
146 146
 
147 147
         do {
148 148
             $str = preg_replace($non_displayables, '', $str, -1, $count);
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
                 return $data;
186 186
             }
187 187
 
188
-            if (! in_array($context, ['html', 'js', 'css', 'url', 'attr'], true)) {
188
+            if (!in_array($context, ['html', 'js', 'css', 'url', 'attr'], true)) {
189 189
                 throw new InvalidArgumentException('Invalid escape context provided.');
190 190
             }
191 191
 
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             }
197 197
 
198 198
             static $escaper;
199
-            if (! $escaper) {
199
+            if (!$escaper) {
200 200
                 $escaper = new \Laminas\Escaper\Escaper($encoding);
201 201
             }
202 202
 
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
             $double  = true;
262 262
         }
263 263
 
264
-        return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, $charset ?: $defaultCharset, $double);
264
+        return htmlspecialchars($text, ENT_QUOTES|ENT_SUBSTITUTE, $charset ?: $defaultCharset, $double);
265 265
     }
266 266
 
267 267
     /**
@@ -370,13 +370,13 @@  discard block
 block discarded – undo
370 370
     {
371 371
         if ($key === 'HTTPS') {
372 372
             if (isset($_SERVER['HTTPS'])) {
373
-                return ! empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
373
+                return !empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off';
374 374
             }
375 375
             if (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
376
-                return ! empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https';
376
+                return !empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https';
377 377
             }
378 378
             if (isset($_SERVER['HTTP_FRONT_END_HTTPS'])) {
379
-                return ! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off';
379
+                return !empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off';
380 380
             }
381 381
 
382 382
             return strpos(self::env('SCRIPT_URI'), 'https://') === 0;
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
                 $name     = self::env('SCRIPT_NAME');
414 414
                 $filename = self::env('SCRIPT_FILENAME');
415 415
                 $offset   = 0;
416
-                if (! strpos($name, '.php')) {
416
+                if (!strpos($name, '.php')) {
417 417
                     $offset = 4;
418 418
                 }
419 419
 
@@ -481,13 +481,13 @@  discard block
 block discarded – undo
481 481
             $server_addr = $_SERVER['HTTP_HOST'] ?? ((strpos($_SERVER['SERVER_ADDR'], ':') !== false) ? '[' . $_SERVER['SERVER_ADDR'] . ']' : $_SERVER['SERVER_ADDR']);
482 482
 
483 483
             if (isset($_SERVER['SERVER_PORT'])) {
484
-                $server_addr .= ':' . ((! preg_match('#:' . $_SERVER['SERVER_PORT'] . '$#', $server_addr)) ? $_SERVER['SERVER_PORT'] : '80');
484
+                $server_addr .= ':' . ((!preg_match('#:' . $_SERVER['SERVER_PORT'] . '$#', $server_addr)) ? $_SERVER['SERVER_PORT'] : '80');
485 485
             }
486 486
 
487 487
             if (
488
-                (! empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
488
+                (!empty($_SERVER['HTTPS']) && strtolower($_SERVER['HTTPS']) !== 'off')
489 489
                 || (isset($_SERVER['HTTP_X_FORWARDED_PROTO']) && strtolower($_SERVER['HTTP_X_FORWARDED_PROTO']) === 'https')
490
-                || (! empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')
490
+                || (!empty($_SERVER['HTTP_FRONT_END_HTTPS']) && strtolower($_SERVER['HTTP_FRONT_END_HTTPS']) !== 'off')
491 491
             ) {
492 492
                 $base_url = 'https';
493 493
             } else {
@@ -535,7 +535,7 @@  discard block
 block discarded – undo
535 535
      */
536 536
     public static function deprecationWarning(string $message, int $stackFrame = 1)
537 537
     {
538
-        if (! (error_reporting() & E_USER_DEPRECATED)) {
538
+        if (!(error_reporting() & E_USER_DEPRECATED)) {
539 539
             return;
540 540
         }
541 541
 
Please login to merge, or discard this patch.