Passed
Push — main ( 60a874...8b25f3 )
by Dimitri
03:14 queued 12s
created
src/Cli/Console/Console.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
             foreach (Filesystem::allFiles($path) as $file) {
140 140
                 $name = str_replace([$path, '.' . $file->getExtension(), DS], ['', '', '\\'], $file->getPathname());
141 141
 
142
-                if (! Str::contains($name, 'Generators' . DS . 'Views')) {
142
+                if (!Str::contains($name, 'Generators' . DS . 'Views')) {
143 143
                     $this->addCommand('\BlitzPHP\Cli\Commands\\' . $name);
144 144
                 }
145 145
             }
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
      */
163 163
     private function addCommand(string $commandName)
164 164
     {
165
-        if (! class_exists($commandName)) {
165
+        if (!class_exists($commandName)) {
166 166
             throw new CLIException("La classe `{$commandName}` n'existe pas");
167 167
         }
168 168
 
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
          */
172 172
         $instance = new $commandName($this, Services::logger());
173 173
 
174
-        if (! ($instance instanceof Command)) {
174
+        if (!($instance instanceof Command)) {
175 175
             throw CLIException::invalidCommand($commandName);
176 176
         }
177 177
 
@@ -193,13 +193,13 @@  discard block
 block discarded – undo
193 193
             $value = (array) $value;
194 194
 
195 195
             $description = $value[0];
196
-            if (! is_string($description)) {
196
+            if (!is_string($description)) {
197 197
                 continue;
198 198
             }
199 199
 
200 200
             $default = $value[1] ?? null;
201 201
             $filter  = $value[2] ?? null;
202
-            if ($filter !== null && ! is_callable($filter)) {
202
+            if ($filter !== null && !is_callable($filter)) {
203 203
                 $filter = null;
204 204
             }
205 205
 
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
             $value = (array) $value;
212 212
 
213 213
             $description = $value[0];
214
-            if (! is_string($description)) {
214
+            if (!is_string($description)) {
215 215
                 continue;
216 216
             }
217 217
 
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
 
223 223
         $console = $this;
224 224
 
225
-        $command->action(static function () use ($instance, $command, $console) {
226
-            if (! $console->suppress) {
225
+        $command->action(static function() use ($instance, $command, $console) {
226
+            if (!$console->suppress) {
227 227
                 $console->start($instance->service);
228 228
             }
229 229
 
230 230
             $result = $instance->execute($command->values(false));
231 231
 
232
-            if (! $console->suppress) {
232
+            if (!$console->suppress) {
233 233
                 $console->end();
234 234
             }
235 235
 
Please login to merge, or discard this patch.
src/View/Adapters/NativeAdapter.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
         $this->renderVars['file'] = str_replace('/', DS, rtrim($options['viewPath'] ?? $this->viewPath, '/\\') . DS . ltrim($this->renderVars['view'], '/\\'));
127 127
 
128
-        if (! is_file($this->renderVars['file'])) {
128
+        if (!is_file($this->renderVars['file'])) {
129 129
             throw ViewException::invalidFile($this->renderVars['view']);
130 130
         }
131 131
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         // Enregistrer les variables actuelles
136 136
         $renderVars = $this->renderVars;
137 137
 
138
-        $output = (function (): string {
138
+        $output = (function(): string {
139 139
             extract($this->tempData);
140 140
             ob_start();
141 141
             include $this->renderVars['file'];
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
 
162 162
         $this->logPerformance($this->renderVars['start'], microtime(true), $this->renderVars['view']);
163 163
 
164
-        if (($this->debug && (! isset($options['debug']) || $options['debug'] === true))) {
164
+        if (($this->debug && (!isset($options['debug']) || $options['debug'] === true))) {
165 165
             // Nettoyer nos noms de chemins pour les rendre un peu plus propres
166 166
             $this->renderVars['file'] = clean_path($this->renderVars['file']);
167 167
             $this->renderVars['file'] = ++$this->viewsCount . ' ' . $this->renderVars['file'];
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
         $saveData ??= $this->saveData;
191 191
         $this->prepareTemplateData($saveData);
192 192
 
193
-        $output = (function (string $view): string {
193
+        $output = (function(string $view): string {
194 194
             extract($this->tempData);
195 195
             ob_start();
196 196
             eval('?>' . $view);
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
         $section = array_pop($this->sectionStack);
319 319
 
320 320
         // Assurez-vous qu'un tableau existe afin que nous puissions stocker plusieurs entrées pour cela.
321
-        if (! array_key_exists($section, $this->sections)) {
321
+        if (!array_key_exists($section, $this->sections)) {
322 322
             $this->sections[$section] = [];
323 323
         }
324 324
 
@@ -354,7 +354,7 @@  discard block
 block discarded – undo
354 354
      */
355 355
     public function show(string $sectionName)
356 356
     {
357
-        if (! isset($this->sections[$sectionName])) {
357
+        if (!isset($this->sections[$sectionName])) {
358 358
             echo '';
359 359
 
360 360
             return;
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      *
424 424
      * @param mixed $saveData
425 425
      */
426
-    public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true): string
426
+    public function include(string $view, ?array $data = [], ?array $options = null, $saveData = true) : string
427 427
     {
428 428
         return $this->insert($view, $data, $options, $saveData);
429 429
     }
@@ -434,7 +434,7 @@  discard block
 block discarded – undo
434 434
     public function addLibCss(string ...$src): self
435 435
     {
436 436
         foreach ($src as $var) {
437
-            if (! in_array($var, $this->_lib_styles, true)) {
437
+            if (!in_array($var, $this->_lib_styles, true)) {
438 438
                 $this->_lib_styles[] = $var;
439 439
             }
440 440
         }
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     public function addCss(string ...$src): self
449 449
     {
450 450
         foreach ($src as $var) {
451
-            if (! in_array($var, $this->_styles, true)) {
451
+            if (!in_array($var, $this->_styles, true)) {
452 452
                 $this->_styles[] = $var;
453 453
             }
454 454
         }
@@ -477,10 +477,10 @@  discard block
 block discarded – undo
477 477
             );
478 478
         }
479 479
 
480
-        if (! empty($lib_styles)) {
480
+        if (!empty($lib_styles)) {
481 481
             lib_styles(array_unique($lib_styles));
482 482
         }
483
-        if (! empty($styles)) {
483
+        if (!empty($styles)) {
484 484
             styles(array_unique($styles));
485 485
         }
486 486
 
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
     public function addLibJs(string ...$src): self
494 494
     {
495 495
         foreach ($src as $var) {
496
-            if (! in_array($var, $this->_lib_scripts, true)) {
496
+            if (!in_array($var, $this->_lib_scripts, true)) {
497 497
                 $this->_lib_scripts[] = $var;
498 498
             }
499 499
         }
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
     public function addJs(string ...$src): self
508 508
     {
509 509
         foreach ($src as $var) {
510
-            if (! in_array($var, $this->_scripts, true)) {
510
+            if (!in_array($var, $this->_scripts, true)) {
511 511
                 $this->_scripts[] = $var;
512 512
             }
513 513
         }
@@ -536,10 +536,10 @@  discard block
 block discarded – undo
536 536
             );
537 537
         }
538 538
 
539
-        if (! empty($lib_scripts)) {
539
+        if (!empty($lib_scripts)) {
540 540
             lib_scripts(array_unique($lib_scripts));
541 541
         }
542
-        if (! empty($scripts)) {
542
+        if (!empty($scripts)) {
543 543
             scripts(array_unique($scripts));
544 544
         }
545 545
 
Please login to merge, or discard this patch.
src/Middlewares/Cors.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
         'AllowMethods'     => ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'],
29 29
         'AllowHeaders'     => true,
30 30
         'ExposeHeaders'    => false,
31
-        'MaxAge'           => 86400,                                       // 1 day
31
+        'MaxAge'           => 86400, // 1 day
32 32
     ];
33 33
 
34 34
     /**
Please login to merge, or discard this patch.
src/Utilities/Jwt.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $this->config = array_merge([
37 37
             'key'       => 'blitz-php-jwt-key',
38
-            'exp_time'  => 5,                        // 5 minutes
38
+            'exp_time'  => 5, // 5 minutes
39 39
             'merge'     => false,
40 40
             'algorithm' => 'HS256',
41 41
             'base_url'  => Helpers::findBaseUrl(),
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             $returned = $payload->data ?? $payload;
116 116
         }
117 117
 
118
-        if (! $full) {
118
+        if (!$full) {
119 119
             unset($returned->iat, $returned->iss, $returned->exp);
120 120
         }
121 121
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
     {
149 149
         $authorization = self::getAuthorization();
150 150
 
151
-        if (! empty($authorization) && preg_match('/Bearer\s(\S+)/', $authorization, $matches)) {
151
+        if (!empty($authorization) && preg_match('/Bearer\s(\S+)/', $authorization, $matches)) {
152 152
             return $matches[1];
153 153
         }
154 154
 
Please login to merge, or discard this patch.
src/Http/ServerRequest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
257 257
         $this->cookies = $config['cookies'];
258 258
 
259 259
         if (isset($config['uri'])) {
260
-            if (! $config['uri'] instanceof UriInterface) {
260
+            if (!$config['uri'] instanceof UriInterface) {
261 261
                 throw new FrameworkException('The `uri` key must be an instance of ' . UriInterface::class);
262 262
             }
263 263
             $uri = $config['uri'];
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
         $ref = $this->getEnv('HTTP_REFERER');
398 398
 
399 399
         $base = /* Configure::read('App.fullBaseUrl') .  */ $this->webroot;
400
-        if (! empty($ref) && ! empty($base)) {
400
+        if (!empty($ref) && !empty($base)) {
401 401
             if ($local && strpos($ref, $base) === 0) {
402 402
                 $ref = substr($ref, strlen($base));
403 403
                 if ($ref === '' || strpos($ref, '//') === 0) {
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
 
410 410
                 return $ref;
411 411
             }
412
-            if (! $local) {
412
+            if (!$local) {
413 413
                 return $ref;
414 414
             }
415 415
         }
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
         }
462 462
 
463 463
         $type = strtolower($type);
464
-        if (! isset(static::$_detectors[$type])) {
464
+        if (!isset(static::$_detectors[$type])) {
465 465
             return false;
466 466
         }
467 467
         if ($args) {
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
         foreach ($detect['header'] as $header => $value) {
541 541
             $header = $this->getEnv('http_' . $header);
542 542
             if ($header !== null) {
543
-                if (! is_string($value) && ! is_bool($value) && is_callable($value)) {
543
+                if (!is_string($value) && !is_bool($value) && is_callable($value)) {
544 544
                     return $value($header);
545 545
                 }
546 546
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     public function isAll(array $types): bool
614 614
     {
615 615
         foreach ($types as $type) {
616
-            if (! $this->is($type)) {
616
+            if (!$this->is($type)) {
617 617
                 return false;
618 618
             }
619 619
         }
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
     protected function normalizeHeaderName(string $name): string
717 717
     {
718 718
         $name = str_replace('-', '_', strtoupper($name));
719
-        if (! in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) {
719
+        if (!in_array($name, ['CONTENT_LENGTH', 'CONTENT_TYPE'], true)) {
720 720
             $name = 'HTTP_' . $name;
721 721
         }
722 722
 
@@ -899,8 +899,8 @@  discard block
 block discarded – undo
899 899
         $new = clone $this;
900 900
 
901 901
         if (
902
-            ! is_string($method)
903
-            || ! preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)
902
+            !is_string($method)
903
+            || !preg_match('/^[!#$%&\'*+.^_`\|~0-9a-z-]+$/i', $method)
904 904
         ) {
905 905
             throw new InvalidArgumentException(sprintf(
906 906
                 'Unsupported HTTP method "%s" provided',
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
                 }
1145 1145
             }
1146 1146
 
1147
-            if (! isset($accept[$prefValue])) {
1147
+            if (!isset($accept[$prefValue])) {
1148 1148
                 $accept[$prefValue] = [];
1149 1149
             }
1150 1150
             if ($prefValue) {
@@ -1222,7 +1222,7 @@  discard block
 block discarded – undo
1222 1222
         if ($name === null) {
1223 1223
             return $this->data;
1224 1224
         }
1225
-        if (! is_array($this->data) && $name) {
1225
+        if (!is_array($this->data) && $name) {
1226 1226
             return $default;
1227 1227
         }
1228 1228
 
@@ -1363,7 +1363,7 @@  discard block
 block discarded – undo
1363 1363
      */
1364 1364
     public function withProtocolVersion($version): self
1365 1365
     {
1366
-        if (! preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) {
1366
+        if (!preg_match('/^(1\.[01]|2(\.[0])?)$/', $version)) {
1367 1367
             throw new InvalidArgumentException("Unsupported protocol version '{$version}' provided");
1368 1368
         }
1369 1369
         $new           = clone $this;
@@ -1385,7 +1385,7 @@  discard block
 block discarded – undo
1385 1385
     public function getEnv(string $key, ?string $default = null): ?string
1386 1386
     {
1387 1387
         $key = strtoupper($key);
1388
-        if (! array_key_exists($key, $this->_environment)) {
1388
+        if (!array_key_exists($key, $this->_environment)) {
1389 1389
             $this->_environment[$key] = env($key);
1390 1390
         }
1391 1391
 
@@ -1597,7 +1597,7 @@  discard block
 block discarded – undo
1597 1597
         $file = Arr::get($this->uploadedFiles, $path);
1598 1598
         if (is_array($file)) {
1599 1599
             foreach ($file as $f) {
1600
-                if (! ($f instanceof UploadedFile)) {
1600
+                if (!($f instanceof UploadedFile)) {
1601 1601
                     return null;
1602 1602
                 }
1603 1603
             }
@@ -1605,7 +1605,7 @@  discard block
 block discarded – undo
1605 1605
             return $file;
1606 1606
         }
1607 1607
 
1608
-        if (! ($file instanceof UploadedFileInterface)) {
1608
+        if (!($file instanceof UploadedFileInterface)) {
1609 1609
             return null;
1610 1610
         }
1611 1611
 
@@ -1653,7 +1653,7 @@  discard block
 block discarded – undo
1653 1653
                 continue;
1654 1654
             }
1655 1655
 
1656
-            if (! $file instanceof UploadedFileInterface) {
1656
+            if (!$file instanceof UploadedFileInterface) {
1657 1657
                 throw new InvalidArgumentException("Invalid file at '{$path}{$key}'");
1658 1658
             }
1659 1659
         }
@@ -1704,7 +1704,7 @@  discard block
 block discarded – undo
1704 1704
         }
1705 1705
 
1706 1706
         $host = $uri->getHost();
1707
-        if (! $host) {
1707
+        if (!$host) {
1708 1708
             return $new;
1709 1709
         }
1710 1710
         $port = $uri->getPort();
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
         $validLocales = config('app.supported_locales');
1813 1813
         // S'il ne s'agit pas d'un paramètre régional valide, définissez-le
1814 1814
         // aux paramètres régionaux par défaut du site.
1815
-        if (! in_array($locale, $validLocales, true)) {
1815
+        if (!in_array($locale, $validLocales, true)) {
1816 1816
             $locale = config('app.language');
1817 1817
         }
1818 1818
 
@@ -1912,7 +1912,7 @@  discard block
 block discarded – undo
1912 1912
             $override = true;
1913 1913
         }
1914 1914
 
1915
-        if ($override && ! in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) {
1915
+        if ($override && !in_array($this->_environment['REQUEST_METHOD'], ['PUT', 'POST', 'DELETE', 'PATCH'], true)) {
1916 1916
             $data = [];
1917 1917
         }
1918 1918
 
@@ -1961,7 +1961,7 @@  discard block
 block discarded – undo
1961 1961
      */
1962 1962
     protected function _processFiles(array $post, array $files): array
1963 1963
     {
1964
-        if (! is_array($files)) {
1964
+        if (!is_array($files)) {
1965 1965
             return $post;
1966 1966
         }
1967 1967
 
Please login to merge, or discard this patch.
src/Helpers/url.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 
25 25
 // =================================  ================================= //
26 26
 
27
-if (! function_exists('site_url')) {
27
+if (!function_exists('site_url')) {
28 28
     /**
29 29
      * Renvoie une URL de site telle que définie par la configuration de l'application.
30 30
      *
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
     }
49 49
 }
50 50
 
51
-if (! function_exists('base_url')) {
51
+if (!function_exists('base_url')) {
52 52
     /**
53 53
      * Renvoie l'URL de base telle que définie par la configuration de l'application.
54 54
      * Les URL de base sont des URL de site coupées sans la page d'index.
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     }
68 68
 }
69 69
 
70
-if (! function_exists('current_url')) {
70
+if (!function_exists('current_url')) {
71 71
     /**
72 72
      * Renvoie l'URL complète (y compris les segments) de la page où cette fonction est placée
73 73
      *
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
     }
95 95
 }
96 96
 
97
-if (! function_exists('previous_url')) {
97
+if (!function_exists('previous_url')) {
98 98
     /**
99 99
      * Renvoie l'URL précédente sur laquelle se trouvait le visiteur actuel. Pour des raisons de sécurité
100 100
      * nous vérifions d'abord une variable de session enregistrée, si elle existe, et l'utilisons.
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     }
120 120
 }
121 121
 
122
-if (! function_exists('uri_string')) {
122
+if (!function_exists('uri_string')) {
123 123
     /**
124 124
      * Renvoie la partie chemin de l'URL actuelle
125 125
      *
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     }
134 134
 }
135 135
 
136
-if (! function_exists('index_page')) {
136
+if (!function_exists('index_page')) {
137 137
     /**
138 138
      * Renvoie la "index_page" de votre fichier de configuration
139 139
      */
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     }
144 144
 }
145 145
 
146
-if (! function_exists('anchor')) {
146
+if (!function_exists('anchor')) {
147 147
     /**
148 148
      * Crée une ancre basée sur l'URL locale.
149 149
      *
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     }
169 169
 }
170 170
 
171
-if (! function_exists('anchor_popup')) {
171
+if (!function_exists('anchor_popup')) {
172 172
     /**
173 173
      * Lien d'ancrage - Version contextuelle
174 174
      *
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
             return '<a href="' . $siteUrl . '" onclick="window.open(\'' . $siteUrl . "', '_blank'); return false;\">" . $title . '</a>';
192 192
         }
193 193
 
194
-        if (! is_array($attributes)) {
194
+        if (!is_array($attributes)) {
195 195
             $attributes = [$attributes];
196 196
 
197 197
             // Ref: http://www.w3schools.com/jsref/met_win_open.asp
198 198
             $windowName = '_blank';
199
-        } elseif (! empty($attributes['window_name'])) {
199
+        } elseif (!empty($attributes['window_name'])) {
200 200
             $windowName = $attributes['window_name'];
201 201
             unset($attributes['window_name']);
202 202
         } else {
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
     }
217 217
 }
218 218
 
219
-if (! function_exists('mailto')) {
219
+if (!function_exists('mailto')) {
220 220
     /**
221 221
      * Lien Mailto
222 222
      *
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
     }
234 234
 }
235 235
 
236
-if (! function_exists('safe_mailto')) {
236
+if (!function_exists('safe_mailto')) {
237 237
     /**
238 238
      * Lien Mailto codé
239 239
      *
@@ -322,7 +322,7 @@  discard block
 block discarded – undo
322 322
     }
323 323
 }
324 324
 
325
-if (! function_exists('auto_link')) {
325
+if (!function_exists('auto_link')) {
326 326
     /**
327 327
      * Lien automatique
328 328
      *
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     function auto_link(string $str, string $type = 'both', bool $popup = false): string
338 338
     {
339 339
         // Recherche et remplace tous les URLs.
340
-        if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w#i', $str, $matches, PREG_OFFSET_CAPTURE | PREG_SET_ORDER)) {
340
+        if ($type !== 'email' && preg_match_all('#(\w*://|www\.)[^\s()<>;]+\w#i', $str, $matches, PREG_OFFSET_CAPTURE|PREG_SET_ORDER)) {
341 341
             // Définissez notre HTML cible si vous utilisez des liens contextuels.
342 342
             $target = ($popup) ? ' target="_blank"' : '';
343 343
 
@@ -368,7 +368,7 @@  discard block
 block discarded – undo
368 368
     }
369 369
 }
370 370
 
371
-if (! function_exists('prep_url')) {
371
+if (!function_exists('prep_url')) {
372 372
     /**
373 373
      * Ajoute simplement la partie http:// ou https:// si aucun schéma n'est inclus.
374 374
      *
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
     }
394 394
 }
395 395
 
396
-if (! function_exists('url_title')) {
396
+if (!function_exists('url_title')) {
397 397
     /**
398 398
      * Créer un titre d'URL
399 399
      *
@@ -429,7 +429,7 @@  discard block
 block discarded – undo
429 429
     }
430 430
 }
431 431
 
432
-if (! function_exists('mb_url_title')) {
432
+if (!function_exists('mb_url_title')) {
433 433
     /**
434 434
      * Créer un titre d'URL qui prend en compte les caractères accentués
435 435
      *
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     }
449 449
 }
450 450
 
451
-if (! function_exists('url_to')) {
451
+if (!function_exists('url_to')) {
452 452
     /**
453 453
      * Obtenir l'URL complète et absolue d'une méthode de contrôleur
454 454
      * (avec arguments supplémentaires)
@@ -461,7 +461,7 @@  discard block
 block discarded – undo
461 461
      */
462 462
     function url_to(string $controller, ...$args): string
463 463
     {
464
-        if (! $route = link_to($controller, ...$args)) {
464
+        if (!$route = link_to($controller, ...$args)) {
465 465
             $explode = explode('::', $controller);
466 466
 
467 467
             if (isset($explode[1])) {
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
     }
476 476
 }
477 477
 
478
-if (! function_exists('url_is')) {
478
+if (!function_exists('url_is')) {
479 479
     /**
480 480
      * Détermine si le chemin d'URL actuel contient le chemin donné.
481 481
      * Il peut contenir un caractère générique (*) qui autorisera tout caractère valide.
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
     }
494 494
 }
495 495
 
496
-if (! function_exists('link_active')) {
496
+if (!function_exists('link_active')) {
497 497
     /**
498 498
      * Lien actif dans la navbar
499 499
      * Un peut comme le router-active-link de vuejs
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
             return $active_class;
508 508
         }
509 509
     
510
-        if (! $exact && preg_match('#^' . $path . '/?#i', $current_section)) {
510
+        if (!$exact && preg_match('#^' . $path . '/?#i', $current_section)) {
511 511
             return $active_class;
512 512
         }
513 513
         
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
     }
521 521
 }
522 522
 
523
-if (! function_exists('clean_url')) {
523
+if (!function_exists('clean_url')) {
524 524
     function clean_url(string $url): string
525 525
     {
526 526
         return Helpers::cleanUrl($url);
Please login to merge, or discard this patch.
src/Loader/DotEnv.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             }
87 87
         }
88 88
 
89
-        if (! count($data)) {
89
+        if (!count($data)) {
90 90
             return false;
91 91
         }
92 92
 
@@ -118,18 +118,18 @@  discard block
 block discarded – undo
118 118
     public function parse(): ?array
119 119
     {
120 120
         // Nous ne voulons pas imposer la présence d'un fichier .env, ils devraient être facultatifs.
121
-        if (! is_file($this->path)) {
121
+        if (!is_file($this->path)) {
122 122
             return null;
123 123
         }
124 124
 
125 125
         // Assurez-vous que le fichier est lisible
126
-        if (! is_readable($this->path)) {
126
+        if (!is_readable($this->path)) {
127 127
             throw new InvalidArgumentException("The .env file is not readable: {$this->path}");
128 128
         }
129 129
 
130 130
         $vars = [];
131 131
 
132
-        $lines = file($this->path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
132
+        $lines = file($this->path, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);
133 133
 
134 134
         foreach ($lines as $line) {
135 135
             // C'est un commentaire?
@@ -154,7 +154,7 @@  discard block
 block discarded – undo
154 154
      */
155 155
     protected function setVariable(string $name, string $value = '')
156 156
     {
157
-        if (! getenv($name, true)) {
157
+        if (!getenv($name, true)) {
158 158
             putenv("{$name}={$value}");
159 159
         }
160 160
         if (empty($_ENV[$name])) {
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     protected function sanitizeValue(string $value): string
205 205
     {
206
-        if (! $value) {
206
+        if (!$value) {
207 207
             return $value;
208 208
         }
209 209
 
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 
260 260
             $value = preg_replace_callback(
261 261
                 '/\${([a-zA-Z0-9_]+)}/',
262
-                static function ($matchedPatterns) use ($loader) {
262
+                static function($matchedPatterns) use ($loader) {
263 263
                     $nestedVariable = $loader->getVariable($matchedPatterns[1]);
264 264
 
265 265
                     if (null === $nestedVariable) {
Please login to merge, or discard this patch.
src/Controllers/RestController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         $this->config = (object) config('rest');
73 73
 
74 74
         $locale       = $this->config->language ?? null;
75
-        $this->locale = ! empty($locale) ? $locale : $this->request->getLocale();
75
+        $this->locale = !empty($locale) ? $locale : $this->request->getLocale();
76 76
     }
77 77
 
78 78
     public function _remap(string $method, array $params = [])
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         $class = static::class;
81 81
 
82 82
         // Bien sûr qu'il existe, mais peuvent-ils en faire quelque chose ?
83
-        if (! method_exists($class, $method)) {
83
+        if (!method_exists($class, $method)) {
84 84
             return $this->respondNotImplemented($this->_translate('notImplemented', [$class, $method]));
85 85
         }
86 86
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 
108 108
             return $this->respondOk($response);
109 109
         } catch (Throwable $ex) {
110
-            if (! on_dev()) {
110
+            if (!on_dev()) {
111 111
                 $url = explode('?', $this->request->getRequestTarget())[0];
112 112
 
113 113
                 return $this->respondBadRequest($this->_translate('badUsed', [$url]));
@@ -156,18 +156,18 @@  discard block
 block discarded – undo
156 156
     final protected function respondFail(?string $message = "Une erreur s'est produite", ?int $status = StatusCode::INTERNAL_ERROR, int|string|null $code = null, array $errors = [])
157 157
     {
158 158
         $message = $message ?: "Une erreur s'est produite";
159
-        $code    = ! empty($code) ? $code : $status;
159
+        $code    = !empty($code) ? $code : $status;
160 160
 
161 161
         $response = [
162 162
             $this->config->field['message'] ?? 'message' => $message,
163 163
         ];
164
-        if (! empty($this->config->field['status'])) {
164
+        if (!empty($this->config->field['status'])) {
165 165
             $response[$this->config->field['status']] = false;
166 166
         }
167
-        if (! empty($this->config->field['code'])) {
167
+        if (!empty($this->config->field['code'])) {
168 168
             $response[$this->config->field['code']] = $code;
169 169
         }
170
-        if (! empty($errors)) {
170
+        if (!empty($errors)) {
171 171
             $response[$this->config->field['errors'] ?? 'errors'] = $errors;
172 172
         }
173 173
 
@@ -188,12 +188,12 @@  discard block
 block discarded – undo
188 188
     final protected function respondSuccess(?string $message = 'Resultat', $result = null, ?int $status = StatusCode::OK)
189 189
     {
190 190
         $message = $message ?: 'Resultat';
191
-        $status  = ! empty($status) ? $status : StatusCode::OK;
191
+        $status  = !empty($status) ? $status : StatusCode::OK;
192 192
 
193 193
         $response = [
194 194
             $this->config->field['message'] ?? 'message' => $message,
195 195
         ];
196
-        if (! empty($this->config->field['status'])) {
196
+        if (!empty($this->config->field['status'])) {
197 197
             $response[$this->config->field['status']] = true;
198 198
         }
199 199
         if (is_array($result)) {
@@ -305,7 +305,7 @@  discard block
 block discarded – undo
305 305
      */
306 306
     final protected function allowedMethods(string ...$methods): self
307 307
     {
308
-        if (! empty($methods)) {
308
+        if (!empty($methods)) {
309 309
             $this->config->allowed_methods = array_map(static fn ($str) => strtoupper($str), $methods);
310 310
         }
311 311
 
@@ -403,13 +403,13 @@  discard block
 block discarded – undo
403 403
         }
404 404
 
405 405
         // Si la méthode de format existe, appelle et renvoie la sortie dans ce format
406
-        if (! empty($mime)) {
406
+        if (!empty($mime)) {
407 407
             $output = Formatter::type($mime)->format($data);
408 408
 
409 409
             // Définit l'en-tête du format
410 410
             // Ensuite, vérifiez si le client a demandé un rappel, et si la sortie contient ce rappel :
411 411
             $callback = $this->request->getQuery('callback');
412
-            if (! empty($callback) && $mime === $this->mimes['json'] && preg_match('/^' . $callback . '/', $output)) {
412
+            if (!empty($callback) && $mime === $this->mimes['json'] && preg_match('/^' . $callback . '/', $output)) {
413 413
                 $this->response = $this->response->withType($this->mimes['jsonp']);
414 414
             } else {
415 415
                 $this->response = $this->response->withType($mime === $this->mimes['array'] ? $this->mimes['json'] : $mime);
@@ -465,22 +465,22 @@  discard block
 block discarded – undo
465 465
     private function checkProcess(): bool|ResponseInterface
466 466
     {
467 467
         // Verifie si la requete est en ajax
468
-        if (! $this->request->is('ajax') && $this->config->ajax_only) {
468
+        if (!$this->request->is('ajax') && $this->config->ajax_only) {
469 469
             return $this->respondNotAcceptable($this->_translate('ajaxOnly'));
470 470
         }
471 471
 
472 472
         // Verifie si la requete est en https
473
-        if (! $this->request->is('https') && $this->config->force_https) {
473
+        if (!$this->request->is('https') && $this->config->force_https) {
474 474
             return $this->respondForbidden($this->_translate('unsupported'));
475 475
         }
476 476
 
477 477
         // Verifie si la methode utilisee pour la requete est autorisee
478
-        if (! in_array(strtoupper($this->request->getMethod()), $this->config->allowed_methods, true)) {
478
+        if (!in_array(strtoupper($this->request->getMethod()), $this->config->allowed_methods, true)) {
479 479
             return $this->respondNotAcceptable($this->_translate('unknownMethod'));
480 480
         }
481 481
 
482 482
         // Verifie que l'ip qui emet la requete n'est pas dans la blacklist
483
-        if (! empty($this->config->ip_blacklis)) {
483
+        if (!empty($this->config->ip_blacklis)) {
484 484
             $this->config->ip_blacklist = implode(',', $this->config->ip_blacklist);
485 485
 
486 486
             // Correspond à une adresse IP dans une liste noire, par ex. 127.0.0.0, 0.0.0.0
@@ -493,20 +493,20 @@  discard block
 block discarded – undo
493 493
         }
494 494
 
495 495
         // Verifie que l'ip qui emet la requete est dans la whitelist
496
-        if (! empty($this->config->ip_whitelist)) {
496
+        if (!empty($this->config->ip_whitelist)) {
497 497
             $whitelist = $this->config->ip_whitelist;
498 498
             array_push($whitelist, '127.0.0.1', '0.0.0.0');
499 499
 
500 500
             // coupez les espaces de début et de fin des ip
501 501
             $whitelist = array_map('trim', $whitelist);
502 502
 
503
-            if (! in_array($this->request->clientIp(), $whitelist, true)) {
503
+            if (!in_array($this->request->clientIp(), $whitelist, true)) {
504 504
                 return $this->respondUnauthorized($this->_translate('ipUnauthorized'));
505 505
             }
506 506
         }
507 507
 
508 508
         // Verifie l'authentification du client
509
-        if (false !== $this->config->auth && ! $this->request->is('options')) {
509
+        if (false !== $this->config->auth && !$this->request->is('options')) {
510 510
             if ('bearer' === strtolower($this->config->auth)) {
511 511
                 $token = $this->getBearerToken();
512 512
                 if (empty($token)) {
Please login to merge, or discard this patch.
src/Helpers/common.php 1 patch
Spacing   +55 added lines, -55 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 
23 23
 // ================================= FONCTIONS D'ACCESSIBILITE ================================= //
24 24
 
25
-if (! function_exists('env')) {
25
+if (!function_exists('env')) {
26 26
     /**
27 27
      * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation
28 28
      * pour les variables d'environnement non prises en charge ou incohérentes
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
     }
39 39
 }
40 40
 
41
-if (! function_exists('helper')) {
41
+if (!function_exists('helper')) {
42 42
     /**
43 43
      * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms,
44 44
      * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms.
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
     }
57 57
 }
58 58
 
59
-if (! function_exists('model')) {
59
+if (!function_exists('model')) {
60 60
     /**
61 61
      * Simple maniere d'obtenir un modele.
62 62
      *
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
      *
67 67
      * @return T
68 68
      */
69
-    function model(string|array $name, array $options = [], ?ConnectionInterface &$conn = null)
69
+    function model(string|array $name, array $options = [], ?ConnectionInterface&$conn = null)
70 70
     {
71 71
         return Load::model($name, $options, $conn);
72 72
     }
73 73
 }
74 74
 
75
-if (! function_exists('service')) {
75
+if (!function_exists('service')) {
76 76
     /**
77 77
      * Permet un accès plus propre au fichier de configuration des services.
78 78
      * Renvoie toujours une instance SHARED de la classe, donc
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     }
90 90
 }
91 91
 
92
-if (! function_exists('single_service')) {
92
+if (!function_exists('single_service')) {
93 93
     /**
94 94
      * Autoriser l'accès propre à un service.
95 95
      * Renvoie toujours une nouvelle instance de la classe.
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     }
104 104
 }
105 105
 
106
-if (! function_exists('show404')) {
106
+if (!function_exists('show404')) {
107 107
     /**
108 108
      * Afficher une page 404 introuvable dans le navigateur
109 109
      */
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
     }
114 114
 }
115 115
 
116
-if (! function_exists('config')) {
116
+if (!function_exists('config')) {
117 117
     /**
118 118
      * GET/SET App config
119 119
      *
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     function config(string $config, $value = null, bool $force_set = false)
125 125
     {
126
-        if (! empty($value) || (empty($value) && true === $force_set)) {
126
+        if (!empty($value) || (empty($value) && true === $force_set)) {
127 127
             Config::set($config, $value);
128 128
         }
129 129
 
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 
134 134
 // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== //
135 135
 
136
-if (! function_exists('esc')) {
136
+if (!function_exists('esc')) {
137 137
     /**
138 138
      * Effectue un simple échappement automatique des données pour des raisons de sécurité.
139 139
      * Pourrait envisager de rendre cela plus complexe à une date ultérieure.
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
     }
161 161
 }
162 162
 
163
-if (! function_exists('h')) {
163
+if (!function_exists('h')) {
164 164
     /**
165 165
      * Méthode pratique pour htmlspecialchars.
166 166
      *
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
     }
180 180
 }
181 181
 
182
-if (! function_exists('purify')) {
182
+if (!function_exists('purify')) {
183 183
     /**
184 184
      * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier.
185 185
      * Utilisez facilement plusieurs configurations de purificateur.
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
     }
198 198
 }
199 199
 
200
-if (! function_exists('remove_invisible_characters')) {
200
+if (!function_exists('remove_invisible_characters')) {
201 201
     /**
202 202
      * Supprimer les caractères invisibles
203 203
      *
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
     }
211 211
 }
212 212
 
213
-if (! function_exists('stringify_attributes')) {
213
+if (!function_exists('stringify_attributes')) {
214 214
     /**
215 215
      * Chaîner les attributs à utiliser dans les balises HTML.
216 216
      *
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
 
225 225
 // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= //
226 226
 
227
-if (! function_exists('on_dev')) {
227
+if (!function_exists('on_dev')) {
228 228
     /**
229 229
      * Testez pour voir si nous sommes dans un environnement de développement.
230 230
      */
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     }
241 241
 }
242 242
 
243
-if (! function_exists('on_prod')) {
243
+if (!function_exists('on_prod')) {
244 244
     /**
245 245
      * Testez pour voir si nous sommes dans un environnement de production.
246 246
      */
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
     }
257 257
 }
258 258
 
259
-if (! function_exists('on_test')) {
259
+if (!function_exists('on_test')) {
260 260
     /**
261 261
      * Testez pour voir si nous sommes dans un environnement de test
262 262
      */
@@ -268,7 +268,7 @@  discard block
 block discarded – undo
268 268
     }
269 269
 }
270 270
 
271
-if (! function_exists('is_cli')) {
271
+if (!function_exists('is_cli')) {
272 272
     /**
273 273
      * Testez pour voir si une demande a été faite à partir de la ligne de commande.
274 274
      */
@@ -278,7 +278,7 @@  discard block
 block discarded – undo
278 278
     }
279 279
 }
280 280
 
281
-if (! function_exists('is_php')) {
281
+if (!function_exists('is_php')) {
282 282
     /**
283 283
      * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie.
284 284
      */
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
     }
289 289
 }
290 290
 
291
-if (! function_exists('is_windows')) {
291
+if (!function_exists('is_windows')) {
292 292
     /**
293 293
      * Déterminez si l'environnement actuel est basé sur Windows.
294 294
      */
@@ -298,7 +298,7 @@  discard block
 block discarded – undo
298 298
     }
299 299
 }
300 300
 
301
-if (! function_exists('is_https')) {
301
+if (!function_exists('is_https')) {
302 302
     /**
303 303
      * Determines if the application is accessed via an encrypted * (HTTPS) connection.
304 304
      */
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
     }
309 309
 }
310 310
 
311
-if (! function_exists('is_localfile')) {
311
+if (!function_exists('is_localfile')) {
312 312
     /**
313 313
      * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non
314 314
      */
@@ -318,11 +318,11 @@  discard block
 block discarded – undo
318 318
             return true;
319 319
         }
320 320
 
321
-        return ! preg_match('#^(https?://)#i', $name);
321
+        return !preg_match('#^(https?://)#i', $name);
322 322
     }
323 323
 }
324 324
 
325
-if (! function_exists('is_online')) {
325
+if (!function_exists('is_online')) {
326 326
     /**
327 327
      * Tester si l'application s'exécute en local ou en ligne.
328 328
      */
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
     }
333 333
 }
334 334
 
335
-if (! function_exists('is_connected')) {
335
+if (!function_exists('is_connected')) {
336 336
     /**
337 337
      * Verifie si l'utilisateur a une connexion internet active.
338 338
      */
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
     }
343 343
 }
344 344
 
345
-if (! function_exists('is_ajax_request')) {
345
+if (!function_exists('is_ajax_request')) {
346 346
     /**
347 347
      * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH.
348 348
      */
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
     }
353 353
 }
354 354
 
355
-if (! function_exists('redirection')) {
355
+if (!function_exists('redirection')) {
356 356
     /**
357 357
      * Redirige l'utilisateur
358 358
      */
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
     }
367 367
 }
368 368
 
369
-if (! function_exists('redirect')) {
369
+if (!function_exists('redirect')) {
370 370
     /**
371 371
      * Méthode pratique qui fonctionne avec la $request globale actuelle et
372 372
      * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     {
381 381
         $redirection = Services::redirection();
382 382
 
383
-        if (! empty($uri)) {
383
+        if (!empty($uri)) {
384 384
             return $redirection->route($uri);
385 385
         }
386 386
 
@@ -388,7 +388,7 @@  discard block
 block discarded – undo
388 388
     }
389 389
 }
390 390
 
391
-if (! function_exists('link_to')) {
391
+if (!function_exists('link_to')) {
392 392
     /**
393 393
      * Étant donné une chaîne de contrôleur/méthode et tous les paramètres,
394 394
      * tentera de créer l'URL relative à la route correspondante.
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
     }
405 405
 }
406 406
 
407
-if (! function_exists('clean_path')) {
407
+if (!function_exists('clean_path')) {
408 408
     /**
409 409
      * Une méthode pratique pour nettoyer les chemins pour
410 410
      * une sortie plus belle. Utile pour les exceptions
@@ -435,7 +435,7 @@  discard block
 block discarded – undo
435 435
 
436 436
 // ================================= FONCTIONS DE DEBOGAGE ================================= //
437 437
 
438
-if (! function_exists('dd')) {
438
+if (!function_exists('dd')) {
439 439
     /**
440 440
      * Prints a Kint debug report and exits.
441 441
      *
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
     }
455 455
 }
456 456
 
457
-if (! function_exists('dump')) {
457
+if (!function_exists('dump')) {
458 458
     /**
459 459
      * Prints a Kint debug report and exits.
460 460
      *
@@ -471,7 +471,7 @@  discard block
 block discarded – undo
471 471
     }
472 472
 }
473 473
 
474
-if (! function_exists('deprecationWarning')) {
474
+if (!function_exists('deprecationWarning')) {
475 475
     /**
476 476
      * Méthode d'assistance pour générer des avertissements d'obsolescence
477 477
      *
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
     }
488 488
 }
489 489
 
490
-if (! function_exists('logger')) {
490
+if (!function_exists('logger')) {
491 491
     /**
492 492
      * A convenience/compatibility method for logging events through
493 493
      * the Log system.
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
     {
511 511
         $logger = Services::logger();
512 512
 
513
-        if (! empty($level) && ! empty($message)) {
513
+        if (!empty($level) && !empty($message)) {
514 514
             return $logger->log($level, $message, $context);
515 515
         }
516 516
 
@@ -518,7 +518,7 @@  discard block
 block discarded – undo
518 518
     }
519 519
 }
520 520
 
521
-if (! function_exists('cache')) {
521
+if (!function_exists('cache')) {
522 522
     /**
523 523
      * Une méthode pratique qui donne accès au cache
524 524
      * objet. Si aucun paramètre n'est fourni, renverra l'objet,
@@ -548,7 +548,7 @@  discard block
 block discarded – undo
548 548
     }
549 549
 }
550 550
 
551
-if (! function_exists('pr')) {
551
+if (!function_exists('pr')) {
552 552
     /**
553 553
      * print_r() convenience function.
554 554
      *
@@ -570,7 +570,7 @@  discard block
 block discarded – undo
570 570
     }
571 571
 }
572 572
 
573
-if (! function_exists('pj')) {
573
+if (!function_exists('pj')) {
574 574
     /**
575 575
      * json pretty print convenience function.
576 576
      *
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
     }
592 592
 }
593 593
 
594
-if (! function_exists('trigger_warning')) {
594
+if (!function_exists('trigger_warning')) {
595 595
     /**
596 596
      * Déclenche un E_USER_WARNING.
597 597
      */
@@ -601,7 +601,7 @@  discard block
 block discarded – undo
601 601
     }
602 602
 }
603 603
 
604
-if (! function_exists('vd')) {
604
+if (!function_exists('vd')) {
605 605
     /**
606 606
      * Shortcut to ref, HTML mode
607 607
      *
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     }
614 614
 }
615 615
 
616
-if (! function_exists('vdt')) {
616
+if (!function_exists('vdt')) {
617 617
     /**
618 618
      * Shortcut to ref, plain text mode
619 619
      *
@@ -627,7 +627,7 @@  discard block
 block discarded – undo
627 627
 
628 628
 // ================================= FONCTIONS DIVERSES ================================= //
629 629
 
630
-if (! function_exists('force_https')) {
630
+if (!function_exists('force_https')) {
631 631
     /**
632 632
      * Utilisé pour forcer l'accès à une page via HTTPS.
633 633
      * Utilise une redirection standard, plus définira l'en-tête HSTS
@@ -685,7 +685,7 @@  discard block
 block discarded – undo
685 685
     }
686 686
 }
687 687
 
688
-if (! function_exists('getTypeName')) {
688
+if (!function_exists('getTypeName')) {
689 689
     /**
690 690
      * Renvoie la classe d'objets ou le type var de ce n'est pas un objet
691 691
      *
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
     }
700 700
 }
701 701
 
702
-if (! function_exists('ip_address')) {
702
+if (!function_exists('ip_address')) {
703 703
     /**
704 704
      * Renvoie l'adresse IP de l'utilisateur actuel
705 705
      */
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
     }
710 710
 }
711 711
 
712
-if (! function_exists('is_really_writable')) {
712
+if (!function_exists('is_really_writable')) {
713 713
     /**
714 714
      * Tests d'inscriptibilité des fichiers
715 715
      */
@@ -720,7 +720,7 @@  discard block
 block discarded – undo
720 720
     }
721 721
 }
722 722
 
723
-if (! function_exists('lang')) {
723
+if (!function_exists('lang')) {
724 724
     /**
725 725
      * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater
726 726
      * le résultat avec le MessageFormatter de l'extension intl.
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
     }
737 737
 }
738 738
 
739
-if (! function_exists('namespaceSplit')) {
739
+if (!function_exists('namespaceSplit')) {
740 740
     /**
741 741
      * Séparez l'espace de noms du nom de classe.
742 742
      *
@@ -757,7 +757,7 @@  discard block
 block discarded – undo
757 757
     }
758 758
 }
759 759
 
760
-if (! function_exists('view_exist')) {
760
+if (!function_exists('view_exist')) {
761 761
     /**
762 762
      * Verifie si un fichier de vue existe. Utile pour limiter les failles include
763 763
      */
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
     }
772 772
 }
773 773
 
774
-if (! function_exists('view')) {
774
+if (!function_exists('view')) {
775 775
     /**
776 776
      * Charge une vue
777 777
      *
@@ -787,7 +787,7 @@  discard block
 block discarded – undo
787 787
     }
788 788
 }
789 789
 
790
-if (! function_exists('flash')) {
790
+if (!function_exists('flash')) {
791 791
     /**
792 792
      * Fournisseur d'acces rapide a la classe PHP Flash
793 793
      *
@@ -819,7 +819,7 @@  discard block
 block discarded – undo
819 819
     }*/
820 820
 }
821 821
 
822
-if (! function_exists('geo_ip')) {
822
+if (!function_exists('geo_ip')) {
823 823
     /**
824 824
      * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip
825 825
      */
@@ -829,7 +829,7 @@  discard block
 block discarded – undo
829 829
     }
830 830
 }
831 831
 
832
-if (! function_exists('to_stream')) {
832
+if (!function_exists('to_stream')) {
833 833
     /**
834 834
      * Créez un nouveau flux basé sur le type d'entrée.
835 835
      *
@@ -852,7 +852,7 @@  discard block
 block discarded – undo
852 852
     }
853 853
 }
854 854
 
855
-if (! function_exists('value')) {
855
+if (!function_exists('value')) {
856 856
     /**
857 857
      * Renvoie la valeur par défaut de la valeur donnée.
858 858
      *
@@ -866,7 +866,7 @@  discard block
 block discarded – undo
866 866
     }
867 867
 }
868 868
 
869
-if (! function_exists('with')) {
869
+if (!function_exists('with')) {
870 870
     /**
871 871
      * Renvoie la valeur donnée, éventuellement transmise via le rappel donné.
872 872
      *
Please login to merge, or discard this patch.