Passed
Push — main ( c0dba5...15ce1f )
by Dimitri
03:26
created
src/View/Adapters/SmartyAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $this->renderVars['file'] = $this->getRenderedFile($options, $this->renderVars['view'], 'tpl');
62 62
 
63 63
         $layout = $this->layout;
64
-        if (! empty($layout)) {
64
+        if (!empty($layout)) {
65 65
             if (empty(pathinfo($layout, PATHINFO_EXTENSION))) {
66 66
                 $layout .= '.tpl';
67 67
             }
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $this->engine->assign($this->data);
72 72
 
73 73
         // Doit-on mettre en cache?
74
-        if (! empty($this->renderVars['options']['cache_name']) || ! empty($this->renderVars['options']['cache'])) {
74
+        if (!empty($this->renderVars['options']['cache_name']) || !empty($this->renderVars['options']['cache'])) {
75 75
             $this->enableCache();
76 76
             $this->engine->setCacheLifetime(60 * $this->renderVars['options']['cache'] ?? 60);
77 77
             $this->engine->setCompileId($this->renderVars['options']['cache_name'] ?? null);
Please login to merge, or discard this patch.
src/Cli/Console/Command.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
      */
307 307
     final protected function success(string $message, bool $badge = true, string $label = 'SUCCESS'): self
308 308
     {
309
-        if (! $badge) {
309
+        if (!$badge) {
310 310
             $this->writer->okBold($label);
311 311
         } else {
312 312
             $this->writer->boldWhiteBgGreen(" {$label} ");
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
      */
321 321
     final protected function warning(string $message, bool $badge = true, string $label = 'WARNING'): self
322 322
     {
323
-        if (! $badge) {
323
+        if (!$badge) {
324 324
             $this->writer->warnBold($label);
325 325
         } else {
326 326
             $this->writer->boldWhiteBgYellow(" {$label} ");
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
      */
335 335
     final protected function info(string $message, bool $badge = true, string $label = 'INFO'): self
336 336
     {
337
-        if (! $badge) {
337
+        if (!$badge) {
338 338
             $this->writer->infoBold($label);
339 339
         } else {
340 340
             $this->writer->boldWhiteBgCyan(" {$label} ");
@@ -348,7 +348,7 @@  discard block
 block discarded – undo
348 348
      */
349 349
     final protected function error(string $message, bool $badge = true, string $label = 'ERROR'): self
350 350
     {
351
-        if (! $badge) {
351
+        if (!$badge) {
352 352
             $this->writer->errorBold($label);
353 353
         } else {
354 354
             $this->writer->boldWhiteBgRed(" {$label} ");
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
      */
454 454
     final protected function json($data): self
455 455
     {
456
-        $this->write(json_encode($data, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES), true);
456
+        $this->write(json_encode($data, JSON_PRETTY_PRINT|JSON_UNESCAPED_SLASHES), true);
457 457
 
458 458
         return $this;
459 459
     }
Please login to merge, or discard this patch.
src/Http/Middleware.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function add($middlewares, array $options = []): self
67 67
     {
68
-        if (! is_array($middlewares)) {
68
+        if (!is_array($middlewares)) {
69 69
             $middlewares = [$middlewares];
70 70
         }
71 71
 
Please login to merge, or discard this patch.
src/Http/Concerns/InteractsWithContentTypes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      */
32 32
     public function expectsJson(): bool
33 33
     {
34
-        return ($this->ajax() && ! $this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson();
34
+        return ($this->ajax() && !$this->pjax() && $this->acceptsAnyContentType()) || $this->wantsJson();
35 35
     }
36 36
 
37 37
     /**
Please login to merge, or discard this patch.
src/Http/Concerns/ResponseTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
             return $this->withFile($filepath, ['download' => true, 'name' => $filename]);
99 99
         }
100 100
 
101
-        if (! empty($data)) {
101
+        if (!empty($data)) {
102 102
             return $this->withStringBody($data)
103 103
                 ->withType(pathinfo($filename, PATHINFO_EXTENSION))
104 104
                 ->withDownload($filename);
Please login to merge, or discard this patch.
src/Http/Concerns/InteractsWithInput.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
         $input = $this->all();
88 88
 
89 89
         foreach ($keys as $value) {
90
-            if (! Arr::has($input, $value)) {
90
+            if (!Arr::has($input, $value)) {
91 91
                 return false;
92 92
             }
93 93
         }
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $keys = is_array($key) ? $key : func_get_args();
150 150
 
151 151
         foreach ($keys as $value) {
152
-            if (! $this->isEmptyString($value)) {
152
+            if (!$this->isEmptyString($value)) {
153 153
                 return false;
154 154
             }
155 155
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     {
199 199
         $keys = is_array($key) ? $key : func_get_args();
200 200
 
201
-        return ! $this->has($keys);
201
+        return !$this->has($keys);
202 202
     }
203 203
 
204 204
     /**
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
     {
227 227
         $value = $this->input($key);
228 228
 
229
-        return ! is_bool($value) && ! is_array($value) && trim((string) $value) === '';
229
+        return !is_bool($value) && !is_array($value) && trim((string) $value) === '';
230 230
     }
231 231
 
232 232
     /**
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
     {
247 247
         $input = array_replace_recursive($this->data(), $this->allFiles());
248 248
 
249
-        if (! $keys) {
249
+        if (!$keys) {
250 250
             return $input;
251 251
         }
252 252
 
@@ -341,9 +341,9 @@  discard block
 block discarded – undo
341 341
     public function enum(string $key, $enumClass)
342 342
     {
343 343
         if ($this->isNotFilled($key)
344
-            || ! function_exists('enum_exists')
345
-            || ! enum_exists($enumClass)
346
-            || ! method_exists($enumClass, 'tryFrom')) {
344
+            || !function_exists('enum_exists')
345
+            || !enum_exists($enumClass)
346
+            || !method_exists($enumClass, 'tryFrom')) {
347 347
             return null;
348 348
         }
349 349
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
      */
458 458
     public function hasFile(string $key): bool
459 459
     {
460
-        if (! is_array($files = $this->file($key))) {
460
+        if (!is_array($files = $this->file($key))) {
461 461
             $files = [$files];
462 462
         }
463 463
 
Please login to merge, or discard this patch.
src/Http/Request.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
      */
97 97
     public function fullUrl(): string
98 98
     {
99
-        if (! empty($query = $this->getEnv('QUERY_STRING'))) {
99
+        if (!empty($query = $this->getEnv('QUERY_STRING'))) {
100 100
             return $this->url() . '?' . $query;
101 101
         }
102 102
 
Please login to merge, or discard this patch.
src/Mail/Adapters/SymfonyMailer.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 
423 423
     private function buildDsn(): string
424 424
     {
425
-        if (! empty($this->dsn)) {
425
+        if (!empty($this->dsn)) {
426 426
             return $this->dsn;
427 427
         }
428 428
 
@@ -430,8 +430,8 @@  discard block
 block discarded – undo
430 430
             static::PROTOCOL_SMTP     => "smtp://{$this->username}:{$this->password}@{$this->host}:{$this->port}",
431 431
             static::PROTOCOL_SENDMAIL => 'sendmail://default',
432 432
             static::PROTOCOL_MAIL     => 'sendmail://default',
433
-            static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default",                                // username joue le role de ID
434
-            static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default",                         // username joue le role de API_KEY
433
+            static::PROTOCOL_POSTMARK => "postmark+smtp://{$this->username}@default", // username joue le role de ID
434
+            static::PROTOCOL_SENDGRID => "sendgrid+smtp://apikey:{$this->username}@default", // username joue le role de API_KEY
435 435
             default                   => "{$this->protocol}+smtp://{$this->username}:{$this->password}@default",
436 436
         };
437 437
     }
Please login to merge, or discard this patch.
src/Mail/Adapters/PHPMailer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
     public function __construct(bool $debug = false)
33 33
     {
34 34
         $this->mailer              = new Mailer();
35
-        $this->mailer->Debugoutput = function ($str, $level) {
35
+        $this->mailer->Debugoutput = function($str, $level) {
36 36
             Services::logger()->info('[Mail][' . $level . ']: ' . $str);
37 37
         };
38 38
 
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function init(array $config): self
46 46
     {
47
-        if (! empty($config['username']) && ! empty($config['password'])) {
47
+        if (!empty($config['username']) && !empty($config['password'])) {
48 48
             $this->mailer->SMTPAuth = true;
49 49
         }
50 50
 
Please login to merge, or discard this patch.