Passed
Push — main ( c69a6f...6bc794 )
by Dimitri
11:25
created
src/Cli/Console/Command.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -159,10 +159,10 @@
 block discarded – undo
159 159
      */
160 160
     private array $_options = [];
161 161
 
162
-	/**
163
-	 * @param Console $app Application Console
164
-	 * @param LoggerInterface $logger Le Logger à utiliser
165
-	 */
162
+    /**
163
+     * @param Console $app Application Console
164
+     * @param LoggerInterface $logger Le Logger à utiliser
165
+     */
166 166
     public function __construct(protected Console $app, protected LoggerInterface $logger)
167 167
     {
168 168
         $this->initProps();
Please login to merge, or discard this patch.
src/Helpers/url.php 1 patch
Spacing   +25 added lines, -25 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('route')) {
451
+if (!function_exists('route')) {
452 452
     /**
453 453
      * Générez l'URL vers une route nommée.
454 454
      * 
@@ -466,7 +466,7 @@  discard block
 block discarded – undo
466 466
     }
467 467
 }
468 468
 
469
-if (! function_exists('url_to')) {
469
+if (!function_exists('url_to')) {
470 470
     /**
471 471
      * Obtenir l'URL complète et absolue d'une méthode de contrôleur
472 472
      * (avec arguments supplémentaires)
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
      */
480 480
     function url_to(string $controller, ...$args): string
481 481
     {
482
-        if (! $route = link_to($controller, ...$args)) {
482
+        if (!$route = link_to($controller, ...$args)) {
483 483
             $explode = explode('::', $controller);
484 484
 
485 485
             if (isset($explode[1])) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
     }
494 494
 }
495 495
 
496
-if (! function_exists('url_is')) {
496
+if (!function_exists('url_is')) {
497 497
     /**
498 498
      * Détermine si le chemin d'URL actuel contient le chemin donné.
499 499
      * Il peut contenir un caractère générique (*) qui autorisera tout caractère valide.
@@ -511,7 +511,7 @@  discard block
 block discarded – undo
511 511
     }
512 512
 }
513 513
 
514
-if (! function_exists('link_active')) {
514
+if (!function_exists('link_active')) {
515 515
     /**
516 516
      * Lien actif dans la navbar
517 517
      * Un peut comme le router-active-link de vuejs
@@ -525,7 +525,7 @@  discard block
 block discarded – undo
525 525
             return $active_class;
526 526
         }
527 527
 
528
-        if (! $exact && preg_match('#^' . $path . '/?#i', $current_section)) {
528
+        if (!$exact && preg_match('#^' . $path . '/?#i', $current_section)) {
529 529
             return $active_class;
530 530
         }
531 531
 
@@ -537,14 +537,14 @@  discard block
 block discarded – undo
537 537
     }
538 538
 }
539 539
 
540
-if (! function_exists('clean_url')) {
540
+if (!function_exists('clean_url')) {
541 541
     function clean_url(string $url): string
542 542
     {
543 543
         return Helpers::cleanUrl($url);
544 544
     }
545 545
 }
546 546
 
547
-if (! function_exists('is_absolute_link')) {
547
+if (!function_exists('is_absolute_link')) {
548 548
     /**
549 549
      * Verifies si un chemin donnée est une url absolue ou relative
550 550
      */
Please login to merge, or discard this patch.