Passed
Push — main ( 2e6d72...537ce5 )
by Dimitri
16:31 queued 04:19
created
src/Router/Dispatcher.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
             $controller = $routes->getDefaultController();
176 176
         }
177 177
 
178
-        if (! $fullName && is_string($controller)) {
178
+        if (!$fullName && is_string($controller)) {
179 179
             $controller = str_replace($routes->getDefaultNamespace(), '', $controller);
180 180
         }
181 181
 
@@ -301,14 +301,14 @@  discard block
 block discarded – undo
301 301
             return;
302 302
         }
303 303
 
304
-        if (is_cli() && ! on_test()) {
304
+        if (is_cli() && !on_test()) {
305 305
             // @codeCoverageIgnoreStart
306 306
             // $this->request = Services::clirequest($this->config);
307 307
             // @codeCoverageIgnoreEnd
308 308
         }
309 309
 
310 310
         $version = $_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1';
311
-        if (! is_numeric($version)) {
311
+        if (!is_numeric($version)) {
312 312
             $version = substr($version, strpos($version, '/') + 1);
313 313
         }
314 314
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
         // Supposons le succès jusqu'à preuve du contraire.
328 328
         $this->response = Services::response()->withStatus(200);
329 329
 
330
-        if (! is_cli() || on_test()) {
330
+        if (!is_cli() || on_test()) {
331 331
         }
332 332
 
333 333
         $this->response = $this->response->withProtocolVersion($this->request->getProtocolVersion());
@@ -424,7 +424,7 @@  discard block
 block discarded – undo
424 424
         }
425 425
 
426 426
         // Essayez de charger automatiquement la classe
427
-        if (! class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) {
427
+        if (!class_exists($this->controller, true) || ($this->method[0] === '_' && $this->method !== '__invoke')) {
428 428
             throw PageNotFoundException::controllerNotFound($this->controller, $this->method);
429 429
         }
430 430
 
@@ -513,7 +513,7 @@  discard block
 block discarded – undo
513 513
 
514 514
         $this->outputBufferingEnd();
515 515
 
516
-        throw PageNotFoundException::pageNotFound(! on_prod() || is_cli() ? $e->getMessage() : '');
516
+        throw PageNotFoundException::pageNotFound(!on_prod() || is_cli() ? $e->getMessage() : '');
517 517
     }
518 518
 
519 519
     /**
@@ -555,7 +555,7 @@  discard block
 block discarded – undo
555 555
     public function storePreviousURL($uri)
556 556
     {
557 557
         // Ignorer les requêtes CLI
558
-        if (is_cli() && ! on_test()) {
558
+        if (is_cli() && !on_test()) {
559 559
             return; // @codeCoverageIgnore
560 560
         }
561 561
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
         }
566 566
 
567 567
         // Ignorer les reponses non-HTML
568
-        if (! str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) {
568
+        if (!str_contains($this->response->getHeaderLine('Content-Type'), 'text/html')) {
569 569
             return;
570 570
         }
571 571
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
      */
590 590
     protected function sendResponse()
591 591
     {
592
-        if (! ($this->request->expectsJson() || $this->request->isJson() || Text::contains($this->response->getType(), ['/json', '+json']))) {
592
+        if (!($this->request->expectsJson() || $this->request->isJson() || Text::contains($this->response->getType(), ['/json', '+json']))) {
593 593
             $this->response = Services::toolbar()->prepare(
594 594
                 $this->getPerformanceStats(),
595 595
                 $this->request,
@@ -682,11 +682,11 @@  discard block
 block discarded – undo
682 682
      */
683 683
     private function spoofRequestMethod(): callable
684 684
     {
685
-        return static function (ServerRequestInterface $request, ResponseInterface $response, callable $next) {
685
+        return static function(ServerRequestInterface $request, ResponseInterface $response, callable $next) {
686 686
             $post = $request->getParsedBody();
687 687
 
688 688
             // Ne fonctionne qu'avec les formulaires POST
689
-            if ($request->getMethod() === 'POST' && ! empty($post['_method'])) {
689
+            if ($request->getMethod() === 'POST' && !empty($post['_method'])) {
690 690
                 // Accepte seulement PUT, PATCH, DELETE
691 691
                 if (in_array($post['_method'], ['PUT', 'PATCH', 'DELETE'], true)) {
692 692
                     $request = $request->withMethod($post['_method']);
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
 
700 700
     private function bootApp(): callable
701 701
     {
702
-        return function (ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface {
702
+        return function(ServerRequestInterface $request, ResponseInterface $response, callable $next): ResponseInterface {
703 703
             Services::set(Request::class, $request);
704 704
             Services::set(Response::class, $response);
705 705
 
@@ -707,10 +707,10 @@  discard block
 block discarded – undo
707 707
                 $returned = $this->startController();
708 708
 
709 709
                 // Les controleur sous forme de Closure sont executes dans startController().
710
-                if (! is_callable($this->controller)) {
710
+                if (!is_callable($this->controller)) {
711 711
                     $controller = $this->createController($request, $response);
712 712
 
713
-                    if (! method_exists($controller, '_remap') && ! is_callable([$controller, $this->method], false)) {
713
+                    if (!method_exists($controller, '_remap') && !is_callable([$controller, $this->method], false)) {
714 714
                         throw PageNotFoundException::methodNotFound($this->method);
715 715
                     }
716 716
 
Please login to merge, or discard this patch.
src/Http/Response.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -459,7 +459,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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" is an invalid content type.', $contentType));
768 768
         }
769 769
 
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Http/UrlGenerator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     {
257 257
         $route = $this->routes->reverseRoute($name, ...$parameters);
258 258
 
259
-        if (! $route) {
259
+        if (!$route) {
260 260
             throw HttpException::invalidRedirectRoute($route);
261 261
         }
262 262
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 
277 277
         $route = $this->routes->reverseRoute($action, ...$parameters);
278 278
 
279
-        if (! $route) {
279
+        if (!$route) {
280 280
             throw RouterException::actionNotDefined($action);
281 281
         }
282 282
 
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
      */
348 348
     public function isValidUrl(string $path): bool
349 349
     {
350
-        if (! preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
350
+        if (!preg_match('~^(#|//|https?://|(mailto|tel|sms):)~', $path)) {
351 351
             return filter_var($path, FILTER_VALIDATE_URL) !== false;
352 352
         }
353 353
 
Please login to merge, or discard this patch.
src/Http/Concerns/ResponseTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
      */
167 167
     public function download(SplFileInfo|string $file, ?string $name = null, array $headers = []): static
168 168
     {
169
-        if (is_string($file) && ! is_file($file)) {
169
+        if (is_string($file) && !is_file($file)) {
170 170
             throw new LoadException('The requested file was not found');
171 171
         }
172 172
 
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
      */
179 179
     public function streamDownload(callable|StreamInterface|string $stream, string $name, array $headers = []): static
180 180
     {
181
-        if (! ($stream instanceof StreamInterface)) {
181
+        if (!($stream instanceof StreamInterface)) {
182 182
             $stream = to_stream($stream);
183 183
         }
184 184
 
Please login to merge, or discard this patch.
src/View/Adapters/AbstractAdapter.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
     {
79 79
         helper('assets');
80 80
 
81
-        if (! empty($viewPathLocator)) {
81
+        if (!empty($viewPathLocator)) {
82 82
             if (is_string($viewPathLocator)) {
83 83
                 $this->viewPath = rtrim($viewPathLocator, '\\/ ') . DS;
84 84
             } elseif ($viewPathLocator instanceof LocatorInterface) {
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             }
87 87
         }
88 88
 
89
-        if (empty($this->locator) && ! is_dir($this->viewPath)) {
89
+        if (empty($this->locator) && !is_dir($this->viewPath)) {
90 90
             $this->viewPath = '';
91 91
             $this->locator  = Services::locator();
92 92
         }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
         $ext ??= $this->ext;
262 262
 
263 263
         $viewPath = $options['viewPath'] ?? $this->viewPath;
264
-        if (! empty($viewPath)) {
264
+        if (!empty($viewPath)) {
265 265
             $file = str_replace('/', DS, rtrim($viewPath, '/\\') . DS . ltrim($view, '/\\'));
266 266
         } else {
267 267
             $file = $view;
@@ -269,14 +269,14 @@  discard block
 block discarded – undo
269 269
 
270 270
         $file = Helpers::ensureExt($file, $ext);
271 271
 
272
-        if (! is_file($file) && $this->locator instanceof LocatorInterface) {
272
+        if (!is_file($file) && $this->locator instanceof LocatorInterface) {
273 273
             $file = $this->locator->locateFile($view, 'Views', $ext);
274 274
         }
275 275
 
276 276
         $file = realpath($file);
277 277
 
278 278
         // locateFile renverra une chaîne vide si le fichier est introuvable.
279
-        if (! is_file($file)) {
279
+        if (!is_file($file)) {
280 280
             throw ViewException::invalidFile($view);
281 281
         }
282 282
 
Please login to merge, or discard this patch.
src/View/Adapters/SmartyAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $this->renderVars['file'] = $this->getRenderedFile($options, $this->renderVars['view'], $this->ext);
67 67
 
68
-        if (! empty($layout = $this->layout)) {
68
+        if (!empty($layout = $this->layout)) {
69 69
             if (empty(pathinfo($layout, PATHINFO_EXTENSION))) {
70 70
                 $layout .= '.' . $this->ext;
71 71
             }
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
         $this->engine->assign($this->data);
76 76
 
77 77
         // Doit-on mettre en cache?
78
-        if (! empty($this->renderVars['options']['cache_name']) || ! empty($this->renderVars['options']['cache'])) {
78
+        if (!empty($this->renderVars['options']['cache_name']) || !empty($this->renderVars['options']['cache'])) {
79 79
             $this->enableCache();
80 80
             $this->engine->setCacheLifetime(60 * ($this->renderVars['options']['cache'] ?? 60));
81 81
             $this->engine->setCompileId($this->renderVars['options']['cache_name'] ?? null);
Please login to merge, or discard this patch.
src/View/Parser.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 
98 98
         $file = $this->viewPath . $view;
99 99
 
100
-        if (! is_file($file)) {
100
+        if (!is_file($file)) {
101 101
             $fileOrig = $file;
102 102
             $file     = ($this->locator ?: Services::locator())->locateFile($view, 'Views');
103 103
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function setData(array $data = [], ?string $context = null): static
173 173
     {
174
-        if (! empty($context)) {
174
+        if (!empty($context)) {
175 175
             foreach ($data as $key => &$value) {
176 176
                 if (is_array($value)) {
177 177
                     foreach ($value as &$obj) {
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
         foreach ($matches as $match) {
282 282
             // Loop over each piece of $data, replacing
283 283
             // its contents so that we know what to replace in parse()
284
-            $str = '';  // holds the new contents for this tag pair.
284
+            $str = ''; // holds the new contents for this tag pair.
285 285
 
286 286
             foreach ($data as $row) {
287 287
                 // Objects that have a `toArray()` method should be
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
                     if (is_array($val)) {
304 304
                         $pair = $this->parsePair($key, $val, $match[1]);
305 305
 
306
-                        if (! empty($pair)) {
306
+                        if (!empty($pair)) {
307 307
                             $pairs[array_keys($pair)[0]] = true;
308 308
 
309 309
                             $temp = array_merge($temp, $pair);
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
 
324 324
                 // Now replace our placeholders with the new content.
325 325
                 foreach ($temp as $pattern => $content) {
326
-                    $out = $this->replaceSingle($pattern, $content, $out, ! isset($pairs[$pattern]));
326
+                    $out = $this->replaceSingle($pattern, $content, $out, !isset($pairs[$pattern]));
327 327
                 }
328 328
 
329 329
                 $str .= $out;
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
         $content = (string) $content;
494 494
 
495 495
         // Replace the content in the template
496
-        return preg_replace_callback($pattern, function ($matches) use ($content, $escape) {
496
+        return preg_replace_callback($pattern, function($matches) use ($content, $escape) {
497 497
             // Check for {! !} syntax to not escape this one.
498 498
             if (
499 499
                 str_starts_with($matches[0], $this->leftDelimiter . '!')
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 
516 516
         // Our regex earlier will leave all chained values on a single line
517 517
         // so we need to break them apart so we can apply them all.
518
-        $filters = ! empty($matches[1]) ? explode('|', $matches[1]) : [];
518
+        $filters = !empty($matches[1]) ? explode('|', $matches[1]) : [];
519 519
 
520 520
         if ($escape && empty($filters) && ($context = $this->shouldAddEscaping($orig))) {
521 521
             $filters[] = "esc({$context})";
@@ -543,7 +543,7 @@  discard block
 block discarded – undo
543 543
             }
544 544
         }
545 545
         // No pipes, then we know we need to escape
546
-        elseif (! str_contains($key, '|')) {
546
+        elseif (!str_contains($key, '|')) {
547 547
             $escape = 'html';
548 548
         }
549 549
         // If there's a `noescape` then we're definitely false.
@@ -551,7 +551,7 @@  discard block
 block discarded – undo
551 551
             $escape = false;
552 552
         }
553 553
         // If no `esc` filter is found, then we'll need to add one.
554
-        elseif (! preg_match('/\s+esc/u', $key)) {
554
+        elseif (!preg_match('/\s+esc/u', $key)) {
555 555
             $escape = 'html';
556 556
         }
557 557
 
@@ -570,10 +570,10 @@  discard block
 block discarded – undo
570 570
             preg_match('/\([\w<>=\/\\\,:.\-\s\+]+\)/u', $filter, $param);
571 571
 
572 572
             // Remove the () and spaces to we have just the parameter left
573
-            $param = ! empty($param) ? trim($param[0], '() ') : null;
573
+            $param = !empty($param) ? trim($param[0], '() ') : null;
574 574
 
575 575
             // Params can be separated by commas to allow multiple parameters for the filter
576
-            if (! empty($param)) {
576
+            if (!empty($param)) {
577 577
                 $param = explode(',', $param);
578 578
 
579 579
                 // Clean it up
@@ -585,10 +585,10 @@  discard block
 block discarded – undo
585 585
             }
586 586
 
587 587
             // Get our filter name
588
-            $filter = ! empty($param) ? trim(strtolower(substr($filter, 0, strpos($filter, '(')))) : trim($filter);
588
+            $filter = !empty($param) ? trim(strtolower(substr($filter, 0, strpos($filter, '(')))) : trim($filter);
589 589
 
590 590
             $this->config['filters'] ??= [];
591
-            if (! array_key_exists($filter, $this->config['filters'])) {
591
+            if (!array_key_exists($filter, $this->config['filters'])) {
592 592
                 continue;
593 593
             }
594 594
 
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
              *   $matches[1] = all parameters string in opening tag
628 628
              *   $matches[2] = content between the tags to send to the plugin.
629 629
              */
630
-            if (! preg_match_all($pattern, $template, $matches, PREG_SET_ORDER)) {
630
+            if (!preg_match_all($pattern, $template, $matches, PREG_SET_ORDER)) {
631 631
                 continue;
632 632
             }
633 633
 
Please login to merge, or discard this patch.
src/View/ViewDecoratorTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
     protected function decorate(string $output): string
22 22
     {
23 23
         foreach (config('view.decorators') as $decorator) {
24
-            if (! is_subclass_of($decorator, ViewDecoratorInterface::class, true)) {
24
+            if (!is_subclass_of($decorator, ViewDecoratorInterface::class, true)) {
25 25
                 throw ViewException::invalidDecorator($decorator);
26 26
             }
27 27
 
Please login to merge, or discard this patch.
src/View/View.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,7 +215,7 @@  discard block
 block discarded – undo
215 215
 
216 216
         $data = array_merge(self::$shared, $data);
217 217
 
218
-        if (! on_test() && ! isset($data['errors'])) {
218
+        if (!on_test() && !isset($data['errors'])) {
219 219
             $data['errors'] = $this->setValidationErrors();
220 220
         }
221 221
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         if (is_string($errors)) {
247 247
             $errors = ['default' => $errors];
248 248
         }
249
-        if (! ($errors instanceof ErrorBag)) {
249
+        if (!($errors instanceof ErrorBag)) {
250 250
             $errors = new ErrorBag($errors);
251 251
         }
252 252
 
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 
285 285
         $data = array_merge(self::$shared, $data);
286 286
 
287
-        if (! on_test() && ! isset($data['errors'])) {
287
+        if (!on_test() && !isset($data['errors'])) {
288 288
             $data['errors'] = $this->setValidationErrors();
289 289
         }
290 290
 
@@ -342,10 +342,10 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function setAdapter(string $adapter, array $config = []): static
344 344
     {
345
-        if (! array_key_exists($adapter, self::$validAdapters)) {
345
+        if (!array_key_exists($adapter, self::$validAdapters)) {
346 346
             $adapter = 'native';
347 347
         }
348
-        if (empty($this->config['adapters']) || ! is_array($this->config['adapters'])) {
348
+        if (empty($this->config['adapters']) || !is_array($this->config['adapters'])) {
349 349
             $this->config['adapters'] = [];
350 350
         }
351 351
 
Please login to merge, or discard this patch.