Test Failed
Pull Request — main (#59)
by Dimitri
06:14
created
src/Cli/Console/Command.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
      */
305 305
     final public function success(string $message, bool $badge = true, string $label = 'SUCCESS'): self
306 306
     {
307
-        if (! $badge) {
307
+        if (!$badge) {
308 308
             $this->writer->okBold($label);
309 309
         } else {
310 310
             $this->writer->boldWhiteBgGreen(" {$label} ");
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
      */
319 319
     final public function warning(string $message, bool $badge = true, string $label = 'WARNING'): self
320 320
     {
321
-        if (! $badge) {
321
+        if (!$badge) {
322 322
             $this->writer->warnBold($label);
323 323
         } else {
324 324
             $this->writer->boldWhiteBgYellow(" {$label} ");
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
      */
333 333
     final public function info(string $message, bool $badge = true, string $label = 'INFO'): self
334 334
     {
335
-        if (! $badge) {
335
+        if (!$badge) {
336 336
             $this->writer->infoBold($label);
337 337
         } else {
338 338
             $this->writer->boldWhiteBgCyan(" {$label} ");
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
      */
347 347
     final public function error(string $message, bool $badge = true, string $label = 'ERROR'): self
348 348
     {
349
-        if (! $badge) {
349
+        if (!$badge) {
350 350
             $this->writer->errorBold($label);
351 351
         } else {
352 352
             $this->writer->boldWhiteBgRed(" {$label} ");
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
      */
450 450
     final public function json($data): self
451 451
     {
452
-        $this->write(json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), true);
452
+        $this->write(json_encode($data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES), true);
453 453
 
454 454
         return $this;
455 455
     }
Please login to merge, or discard this patch.
src/View/Components/Component.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
             $possibleView2 = $directory . $viewName . '.php';
80 80
         }
81 81
 
82
-        if ($view !== '' && ! is_file($view)) {
82
+        if ($view !== '' && !is_file($view)) {
83 83
             $directory = dirname((new ReflectionClass($this))->getFileName()) . DIRECTORY_SEPARATOR;
84 84
 
85 85
             $view = $directory . $view . '.php';
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
 
100 100
         $foundView = current($candidateViews);
101 101
 
102
-        return (function () use ($properties, $foundView): string {
102
+        return (function() use ($properties, $foundView): string {
103 103
             extract($properties);
104 104
             ob_start();
105 105
             include $foundView;
Please login to merge, or discard this patch.
src/Spec/Mock/MockCache.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $key = $this->_key($key);
75 75
 
76
-        if (! isset($this->cache[$key])) {
76
+        if (!isset($this->cache[$key])) {
77 77
             return false;
78 78
         }
79 79
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
 
112 112
         if ($data === null) {
113 113
             $data = 0;
114
-        } elseif (! is_int($data)) {
114
+        } elseif (!is_int($data)) {
115 115
             return false;
116 116
         }
117 117
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
 
130 130
         if ($data === null) {
131 131
             $data = 0;
132
-        } elseif (! is_int($data)) {
132
+        } elseif (!is_int($data)) {
133 133
             return false;
134 134
         }
135 135
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
     public function getMetaData(string $key): ?array
175 175
     {
176 176
         // n'existe pas, retourne null
177
-        if (! array_key_exists($key, $this->expirations)) {
177
+        if (!array_key_exists($key, $this->expirations)) {
178 178
             return null;
179 179
         }
180 180
 
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
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
             return $base . $fullname;
68 68
         }
69 69
 
70
-        if ($plugin || ! static::_classExistsInBase($fullname, 'BlitzPHP')) {
70
+        if ($plugin || !static::_classExistsInBase($fullname, 'BlitzPHP')) {
71 71
             return null;
72 72
         }
73 73
 
Please login to merge, or discard this patch.
src/Controllers/ApplicationController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $options = (array) $options;
46 46
 
47 47
         // N'est-il pas namespaced ? on cherche le dossier en fonction du controleur
48
-        if (! str_contains($view, '\\')) {
48
+        if (!str_contains($view, '\\')) {
49 49
             $reflection                                      = new ReflectionClass(static::class);
50 50
             ['dirname' => $dirname, 'filename' => $filename] = pathinfo($reflection->getFileName());
51 51
             $dirname                                         = str_ireplace('Controllers', 'Views', $dirname);
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
             $dirname = implode('Views', $parts);
60 60
             $path    = implode(DS, [$dirname, $filename]) . DS;
61 61
 
62
-            if (! is_dir($path)) {
62
+            if (!is_dir($path)) {
63 63
                 $path = implode(DS, [$dirname]) . DS;
64 64
             }
65 65
         }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         }
78 78
 
79 79
         if (empty($data['title'])) {
80
-            if (! is_string($controllerName = Dispatcher::getController(false))) {
80
+            if (!is_string($controllerName = Dispatcher::getController(false))) {
81 81
                 $controllerName = static::class;
82 82
             }
83 83
             $controllerName = str_ireplace(['App\Controllers', 'Controller'], '', $controllerName);
Please login to merge, or discard this patch.
src/Controllers/BaseController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -162,11 +162,11 @@  discard block
 block discarded – undo
162 162
             $this->modelName = is_object($which) ? null : $which;
163 163
         }
164 164
 
165
-        if (empty($this->model) && ! empty($this->modelName) && class_exists($this->modelName)) {
165
+        if (empty($this->model) && !empty($this->modelName) && class_exists($this->modelName)) {
166 166
             $this->model = model($this->modelName);
167 167
         }
168 168
 
169
-        if (! empty($this->model) && empty($this->modelName)) {
169
+        if (!empty($this->model) && empty($this->modelName)) {
170 170
             $this->modelName = $this->model::class;
171 171
         }
172 172
     }
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
      */
205 205
     private function getModel()
206 206
     {
207
-        $model = ! empty($this->modelName) ? $this->modelName : str_replace('Controller', 'Model', static::class);
207
+        $model = !empty($this->modelName) ? $this->modelName : str_replace('Controller', 'Model', static::class);
208 208
 
209 209
         if (class_exists($model)) {
210 210
             $this->setModel($model);
Please login to merge, or discard this patch.
src/Config/Config.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function exists(string $key): bool
63 63
     {
64
-        if (! $this->configurator->exists($key)) {
64
+        if (!$this->configurator->exists($key)) {
65 65
             $config = explode('.', $key);
66 66
             $this->load($config[0]);
67 67
 
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function missing(string $key): bool
86 86
     {
87
-        return ! $this->exists($key);
87
+        return !$this->exists($key);
88 88
     }
89 89
 
90 90
     /**
@@ -165,18 +165,18 @@  discard block
 block discarded – undo
165 165
                 }
166 166
                 $this->load($conf, $file, null, $allow_empty);
167 167
             }
168
-        } elseif (! isset(self::$loaded[$config])) {
168
+        } elseif (!isset(self::$loaded[$config])) {
169 169
             $file ??= self::path($config);
170 170
             $schema ??= self::schema($config);
171 171
 
172 172
             $configurations = [];
173
-            if (file_exists($file) && ! in_array($file, get_included_files(), true)) {
173
+            if (file_exists($file) && !in_array($file, get_included_files(), true)) {
174 174
                 $configurations = (array) require $file;
175 175
             }
176 176
 
177 177
             $configurations = Arr::merge(self::$registrars[$config] ?? [], $configurations);
178 178
 
179
-            if (empty($configurations) && ! $allow_empty && ! is_a($schema, Schema::class, true)) {
179
+            if (empty($configurations) && !$allow_empty && !is_a($schema, Schema::class, true)) {
180 180
                 return;
181 181
             }
182 182
 
@@ -283,14 +283,14 @@  discard block
 block discarded – undo
283 283
             }
284 284
 
285 285
             $class   = new ReflectionClass($classname);
286
-            $methods = $class->getMethods(ReflectionMethod::IS_STATIC | ReflectionMethod::IS_PUBLIC);
286
+            $methods = $class->getMethods(ReflectionMethod::IS_STATIC|ReflectionMethod::IS_PUBLIC);
287 287
 
288 288
             foreach ($methods as $method) {
289
-                if (! ($method->isPublic() && $method->isStatic())) {
289
+                if (!($method->isPublic() && $method->isStatic())) {
290 290
                     continue;
291 291
                 }
292 292
 
293
-                if (! is_array($result = $method->invoke(null))) {
293
+                if (!is_array($result = $method->invoke(null))) {
294 294
                     continue;
295 295
                 }
296 296
 
@@ -359,12 +359,12 @@  discard block
 block discarded – undo
359 359
     {
360 360
         $config = $this->get('app.show_debugbar', 'auto');
361 361
 
362
-        if (! in_array($config, ['auto', true, false], true)) {
362
+        if (!in_array($config, ['auto', true, false], true)) {
363 363
             self::exceptBadConfigValue('show_debugbar', ['auto', true, false], 'app');
364 364
         }
365 365
 
366 366
         if ($config === 'auto') {
367
-            $this->set('app.show_debugbar', ! is_online());
367
+            $this->set('app.show_debugbar', !is_online());
368 368
         }
369 369
     }
370 370
 
Please login to merge, or discard this patch.
src/Initializer/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -16,12 +16,12 @@  discard block
 block discarded – undo
16 16
 defined('DS') || define('DS', DIRECTORY_SEPARATOR);
17 17
 
18 18
 // Se rassurer que le dossier courant pointe sur le dossier du front controller
19
-if (! defined('TEST_PATH')) {
19
+if (!defined('TEST_PATH')) {
20 20
     // On doit aussi verifier qu'on n'est pas en phase de test, sinon khalan ne trouvera pas le dossier des specs
21 21
     chdir(WEBROOT);
22 22
 }
23 23
 
24
-return function (array $paths, string $paths_config_file, bool $is_cli): void {
24
+return function(array $paths, string $paths_config_file, bool $is_cli): void {
25 25
     // Le chemin d'accès vers le dossier de l'application
26 26
     if (is_dir($paths['app'])) {
27 27
         if (($_temp = realpath($paths['app'])) !== false) {
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     $app = new Application();
105 105
     $app->init();
106 106
 
107
-    if (! $is_cli) {
107
+    if (!$is_cli) {
108 108
         $app->run();
109 109
     }
110 110
 };
Please login to merge, or discard this patch.
src/Mail/Adapters/SymfonyMailer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -434,8 +434,8 @@
 block discarded – undo
434 434
             static::PROTOCOL_SMTP     => "smtp://{$this->username}:{$this->password}@{$this->host}:{$this->port}",
435 435
             static::PROTOCOL_SENDMAIL => 'sendmail://default',
436 436
             static::PROTOCOL_MAIL     => 'sendmail://default',
437
-            static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default",                                // username joue le role de ID
438
-            static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default",                         // username joue le role de API_KEY
437
+            static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default", // username joue le role de ID
438
+            static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default", // username joue le role de API_KEY
439 439
             default                   => "{$this->protocol}+smtp://{$this->username}:{$this->password}@default",
440 440
         };
441 441
     }
Please login to merge, or discard this patch.