Passed
Push — main ( 5a020f...60a874 )
by Dimitri
04:06 queued 12s
created
src/Formatter/ArrayFormatter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@
 block discarded – undo
25 25
      */
26 26
     public function format($data)
27 27
     {
28
-        if (! is_array($data)) {
28
+        if (!is_array($data)) {
29 29
             $data = (array) $data;
30 30
         }
31 31
 
Please login to merge, or discard this patch.
src/Core/App.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -69,7 +69,7 @@
 block discarded – undo
69 69
             }
70 70
         }
71 71
 
72
-        if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) {
72
+        if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) {
73 73
             return null;
74 74
         }
75 75
 
Please login to merge, or discard this patch.
src/Core/Application.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@
 block discarded – undo
122 122
             ->requireDirectory(APP_PATH, Checker::CHECK_IS_READABLE);
123 123
 
124 124
         $output = $checker->check();
125
-        if (! $checker->isSatisfied()) {
125
+        if (!$checker->isSatisfied()) {
126 126
             echo '<h3>An error encourred</h3>';
127 127
 
128 128
             exit(implode('<br/> ', $checker->getErrors()));
Please login to merge, or discard this patch.
spec/Router/Router.spec.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 
9 9
 describe("Router", function() {
10 10
     beforeEach(function() {
11
-        $this->collection      = new RouteCollection();
11
+        $this->collection = new RouteCollection();
12 12
 
13 13
         $routes = [
14 14
             'users'                                           => 'Users::index',
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
 
377 377
             expect(function() use ($router) {
378 378
                 $router->handle('admin/admins/edit/1');
379
-            })->toThrow(new RouterException( 'The namespace delimiter is a backslash (\), not a slash (/). Route handler: \App/Admin/Admins::edit_show/$1'));
379
+            })->toThrow(new RouterException('The namespace delimiter is a backslash (\), not a slash (/). Route handler: \App/Admin/Admins::edit_show/$1'));
380 380
         });
381 381
 
382 382
         it(': Route avec barre oblique en tête', function() {
@@ -398,11 +398,11 @@  discard block
 block discarded – undo
398 398
         });
399 399
 
400 400
         it(': Options de route', function() {
401
-            $this->collection->add('foo', static function () {}, [
401
+            $this->collection->add('foo', static function() {}, [
402 402
                 'as'  => 'login',
403 403
                 'foo' => 'baz',
404 404
             ]);
405
-            $this->collection->add('baz', static function () {}, [
405
+            $this->collection->add('baz', static function() {}, [
406 406
                 'as'  => 'admin',
407 407
                 'foo' => 'bar',
408 408
             ]);
@@ -470,7 +470,7 @@  discard block
 block discarded – undo
470 470
 
471 471
     describe('Groupes et middlewares', function() {
472 472
         it(': Le routeur fonctionne avec les middlewares', function() {
473
-            $this->collection->group('foo', ['filter' => 'test'], static function (RouteCollection $routes) {
473
+            $this->collection->group('foo', ['filter' => 'test'], static function(RouteCollection $routes) {
474 474
                 $routes->add('bar', 'TestController::foobar');
475 475
             });
476 476
             
Please login to merge, or discard this patch.
spec/bootstrap.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 $_SERVER['ENVIRONMENT'] = 'testing';
24 24
 define('ENVIRONMENT', 'testing');
25 25
 defined('DEBUG') || define('DEBUG', true);
26
-defined('DS')    || define('DS', DIRECTORY_SEPARATOR);
26
+defined('DS') || define('DS', DIRECTORY_SEPARATOR);
27 27
 
28 28
 // Often these constants are pre-defined, but query the current directory structure as a fallback
29 29
 defined('HOME_PATH') || define('HOME_PATH', realpath(rtrim(getcwd(), '\\/ ')) . DS);
@@ -35,15 +35,15 @@  discard block
 block discarded – undo
35 35
 defined('VENDOR_PATH') || define('VENDOR_PATH', realpath(HOME_PATH . 'vendor') . DS);
36 36
 
37 37
 // Define necessary framework path constants
38
-defined('SYST_PATH')    || define('SYST_PATH', realpath(HOME_PATH . 'src') . DS);
39
-defined('TEST_PATH')    || define('TEST_PATH', realpath(HOME_PATH . 'spec') . DS);
38
+defined('SYST_PATH') || define('SYST_PATH', realpath(HOME_PATH . 'src') . DS);
39
+defined('TEST_PATH') || define('TEST_PATH', realpath(HOME_PATH . 'spec') . DS);
40 40
 defined('SUPPORT_PATH') || define('SUPPORT_PATH', TEST_PATH . '_support' . DS);
41
-defined('APP_PATH')     || define('APP_PATH', SUPPORT_PATH . 'app' . DS);
41
+defined('APP_PATH') || define('APP_PATH', SUPPORT_PATH . 'app' . DS);
42 42
 defined('STORAGE_PATH') || define('STORAGE_PATH', SUPPORT_PATH . 'storage' . DS);
43
-defined('WEBROOT')      || define('WEBROOT', SUPPORT_PATH . 'public' . DS);
43
+defined('WEBROOT') || define('WEBROOT', SUPPORT_PATH . 'public' . DS);
44 44
 
45 45
 // Set environment values that would otherwise stop the framework from functioning during tests.
46
-if (! isset($_SERVER['app.baseURL'])) {
46
+if (!isset($_SERVER['app.baseURL'])) {
47 47
     $_SERVER['app.baseURL'] = 'http://example.com/';
48 48
 }
49 49
 define('BASE_URL', $_SERVER['app.baseURL']);
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 if (file_exists(APP_PATH . 'Config' . DS . 'routes.php')) {
73 73
     require_once APP_PATH . 'Config' . DS . 'routes.php';
74 74
 }
75
-if (empty($routes) || ! ($routes instanceof RouteCollectionInterface)) {
75
+if (empty($routes) || !($routes instanceof RouteCollectionInterface)) {
76 76
     $routes = new RouteCollection();
77 77
 }
78 78
 
Please login to merge, or discard this patch.
src/Config/Config.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
     {
88 88
         if (is_array($config)) {
89 89
             foreach ($config as $key => $value) {
90
-                if (! is_string($value) || empty($value)) {
90
+                if (!is_string($value) || empty($value)) {
91 91
                     continue;
92 92
                 }
93 93
                 if (is_string($key)) {
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
                 }
100 100
                 self::load($conf, $file);
101 101
             }
102
-        } elseif (is_string($config) && ! isset(self::$loaded[$config])) {
102
+        } elseif (is_string($config) && !isset(self::$loaded[$config])) {
103 103
             if (empty($file)) {
104 104
                 $file = self::path($config);
105 105
             }
106 106
 
107 107
             $configurations = [];
108
-            if (file_exists($file) && ! in_array($file, get_included_files(), true)) {
108
+            if (file_exists($file) && !in_array($file, get_included_files(), true)) {
109 109
                 $configurations = (array) require $file;
110 110
             }
111 111
 
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
     {
131 131
         if (is_array($accepts_values)) {
132 132
             $accepts_values = '(Accept values: ' . implode('/', $accepts_values) . ')';
133
-        } elseif (! is_string($accepts_values)) {
133
+        } elseif (!is_string($accepts_values)) {
134 134
             throw new InvalidArgumentException('Misuse of the method ' . __METHOD__);
135 135
         }
136 136
 
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $schema = require $app_schema;
177 177
         }
178 178
 
179
-        if (empty($schema) || ! ($schema instanceof Schema)) {
179
+        if (empty($schema) || !($schema instanceof Schema)) {
180 180
             $schema = Expect::mixed();
181 181
         }
182 182
 
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
      */
202 202
     private function initializeURL()
203 203
     {
204
-        if (! $this->configurator->exists('app.base_url')) {
204
+        if (!$this->configurator->exists('app.base_url')) {
205 205
             $config = 'auto';
206 206
         } else {
207 207
             $config = $this->configurator->get('app.base_url');
@@ -257,17 +257,17 @@  discard block
 block discarded – undo
257 257
      */
258 258
     private function initializeDebugbar()
259 259
     {
260
-        if (! $this->configurator->exists('app.show_debugbar')) {
260
+        if (!$this->configurator->exists('app.show_debugbar')) {
261 261
             $config = 'auto';
262 262
         } else {
263 263
             $config = $this->configurator->get('app.show_debugbar');
264 264
         }
265 265
 
266
-        if (! in_array($config, ['auto', true, false], true)) {
266
+        if (!in_array($config, ['auto', true, false], true)) {
267 267
             self::exceptBadConfigValue('show_debugbar', ['auto', true, false], 'app');
268 268
         }
269 269
         if ($config === 'auto') {
270
-            $this->configurator->set('app.show_debugbar', ! is_online());
270
+            $this->configurator->set('app.show_debugbar', !is_online());
271 271
         }
272 272
     }
273 273
 }
Please login to merge, or discard this patch.
src/Loader/Filesystem.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 
182 182
         foreach ($paths as $path) {
183 183
             try {
184
-                if (! @unlink($path)) {
184
+                if (!@unlink($path)) {
185 185
                     $success = false;
186 186
                 }
187 187
             } catch (ErrorException $e) {
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
      */
198 198
     public static function move(string $path, string $target, bool $overwrite = true): bool
199 199
     {
200
-        if (! is_file($target) || ($overwrite && is_file($target))) {
200
+        if (!is_file($target) || ($overwrite && is_file($target))) {
201 201
             return rename($path, $target);
202 202
         }
203 203
 
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
      */
210 210
     public static function copy(string $path, string $target, bool $overwrite = true): bool
211 211
     {
212
-        if (! is_file($target) || ($overwrite && is_file($target))) {
212
+        if (!is_file($target) || ($overwrite && is_file($target))) {
213 213
             return copy($path, $target);
214 214
         }
215 215
 
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
      */
224 224
     public static function link(string $target, string $link)
225 225
     {
226
-        if (! is_windows()) {
226
+        if (!is_windows()) {
227 227
             return symlink($target, $link);
228 228
         }
229 229
 
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
      */
346 346
     public static function files(string $directory, bool $hidden = false, string $sortBy = 'name'): array
347 347
     {
348
-        $files = Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory)->depth(0);
348
+        $files = Finder::create()->files()->ignoreDotFiles(!$hidden)->in($directory)->depth(0);
349 349
 
350 350
         switch (strtolower($sortBy)) {
351 351
             case 'type':
@@ -382,7 +382,7 @@  discard block
 block discarded – undo
382 382
      */
383 383
     public static function allFiles(string $directory, bool $hidden = false, string $sortBy = 'name'): array
384 384
     {
385
-        $files = Finder::create()->files()->ignoreDotFiles(! $hidden)->in($directory);
385
+        $files = Finder::create()->files()->ignoreDotFiles(!$hidden)->in($directory);
386 386
 
387 387
         switch (strtolower($sortBy)) {
388 388
             case 'type':
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
     {
420 420
         $directories = [];
421 421
 
422
-        foreach (Finder::create()->ignoreDotFiles(! $hidden)->in($directory)->directories()->depth($depth)->sortByName() as $dir) {
422
+        foreach (Finder::create()->ignoreDotFiles(!$hidden)->in($directory)->directories()->depth($depth)->sortByName() as $dir) {
423 423
             $directories[] = $dir->getPathname();
424 424
         }
425 425
 
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
      */
444 444
     public static function moveDirectory(string $from, string $to, bool $overwrite = false): bool
445 445
     {
446
-        if ($overwrite && self::isDirectory($to) && ! self::deleteDirectory($to)) {
446
+        if ($overwrite && self::isDirectory($to) && !self::deleteDirectory($to)) {
447 447
             return false;
448 448
         }
449 449
 
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
      */
456 456
     public static function copyDirectory(string $directory, string $destination, bool $overwrite = true, ?int $options = null): bool
457 457
     {
458
-        if (! self::isDirectory($directory)) {
458
+        if (!self::isDirectory($directory)) {
459 459
             return false;
460 460
         }
461 461
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         // If the destination directory does not actually exist, we will go ahead and
465 465
         // create it recursively, which just gets the destination prepared to copy
466 466
         // the files over. Once we make the directory we'll proceed the copying.
467
-        if (! self::isDirectory($destination)) {
467
+        if (!self::isDirectory($destination)) {
468 468
             self::makeDirectory($destination, 0777, true);
469 469
         }
470 470
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
             if ($item->isDir()) {
480 480
                 $path = $item->getPathname();
481 481
 
482
-                if (! self::copyDirectory($path, $target, $overwrite, $options)) {
482
+                if (!self::copyDirectory($path, $target, $overwrite, $options)) {
483 483
                     return false;
484 484
                 }
485 485
             }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
             // location and keep looping. If for some reason the copy fails we'll bail out
489 489
             // and return false, so the developer is aware that the copy process failed.
490 490
             else {
491
-                if (! self::copy($item->getPathname(), $target, $overwrite)) {
491
+                if (!self::copy($item->getPathname(), $target, $overwrite)) {
492 492
                     return false;
493 493
                 }
494 494
             }
@@ -504,7 +504,7 @@  discard block
 block discarded – undo
504 504
      */
505 505
     public static function deleteDirectory(string $directory, bool $preserve = false): bool
506 506
     {
507
-        if (! self::isDirectory($directory)) {
507
+        if (!self::isDirectory($directory)) {
508 508
             return false;
509 509
         }
510 510
 
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
             // If the item is a directory, we can just recurse into the function and
515 515
             // delete that sub-directory otherwise we'll just delete the file and
516 516
             // keep iterating through each file until the directory is cleaned.
517
-            if ($item->isDir() && ! $item->isLink()) {
517
+            if ($item->isDir() && !$item->isLink()) {
518 518
                 self::deleteDirectory($item->getPathname());
519 519
             }
520 520
 
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
             }
527 527
         }
528 528
 
529
-        if (! $preserve) {
529
+        if (!$preserve) {
530 530
             @rmdir($directory);
531 531
         }
532 532
 
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     {
541 541
         $allDirectories = self::directories($directory);
542 542
 
543
-        if (! empty($allDirectories)) {
543
+        if (!empty($allDirectories)) {
544 544
             foreach ($allDirectories as $directoryName) {
545 545
                 self::deleteDirectory($directoryName);
546 546
             }
Please login to merge, or discard this patch.
src/Debug/Toolbar/Collectors/BaseCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
      */
109 109
     public function timelineData(): array
110 110
     {
111
-        if (! $this->hasTimeline) {
111
+        if (!$this->hasTimeline) {
112 112
             return [];
113 113
         }
114 114
 
Please login to merge, or discard this patch.
src/Debug/Toolbar/Collectors/LogsCollector.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
      */
78 78
     protected function collectLogs()
79 79
     {
80
-        if (! empty($this->data)) {
80
+        if (!empty($this->data)) {
81 81
             return $this->data;
82 82
         }
83 83
 
Please login to merge, or discard this patch.