Passed
Push — main ( db810f...4cd58e )
by Dimitri
12:03
created
src/Helpers/common.php 1 patch
Spacing   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
 // ================================= FONCTIONS D'ACCESSIBILITE ================================= //
27 27
 
28
-if (! function_exists('env')) {
28
+if (!function_exists('env')) {
29 29
     /**
30 30
      * Obtient une variable d'environnement à partir des sources disponibles et fournit une émulation
31 31
      * pour les variables d'environnement non prises en charge ou incohérentes
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     }
42 42
 }
43 43
 
44
-if (! function_exists('helper')) {
44
+if (!function_exists('helper')) {
45 45
     /**
46 46
      * Charge un fichier d'aide en mémoire. Prend en charge les assistants d'espace de noms,
47 47
      * à la fois dans et hors du répertoire 'helpers' d'un répertoire à espace de noms.
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
     }
60 60
 }
61 61
 
62
-if (! function_exists('model')) {
62
+if (!function_exists('model')) {
63 63
     /**
64 64
      * Simple maniere d'obtenir un modele.
65 65
      *
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
      *
70 70
      * @return T
71 71
      */
72
-    function model(string|array $name, ?ConnectionInterface &$conn = null)
72
+    function model(string|array $name, ?ConnectionInterface&$conn = null)
73 73
     {
74 74
         return Load::model($name, $conn);
75 75
     }
76 76
 }
77 77
 
78
-if (! function_exists('service')) {
78
+if (!function_exists('service')) {
79 79
     /**
80 80
      * Permet un accès plus propre au fichier de configuration des services.
81 81
      * Renvoie toujours une instance SHARED de la classe, donc
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
     }
93 93
 }
94 94
 
95
-if (! function_exists('single_service')) {
95
+if (!function_exists('single_service')) {
96 96
     /**
97 97
      * Autoriser l'accès propre à un service.
98 98
      * Renvoie toujours une nouvelle instance de la classe.
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     }
107 107
 }
108 108
 
109
-if (! function_exists('show404')) {
109
+if (!function_exists('show404')) {
110 110
     /**
111 111
      * Afficher une page 404 introuvable dans le navigateur
112 112
      */
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
     }
117 117
 }
118 118
 
119
-if (! function_exists('config')) {
119
+if (!function_exists('config')) {
120 120
     /**
121 121
      * GET/SET App config
122 122
      *
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     function config(string $config, $value = null, bool $force_set = false)
128 128
     {
129
-        if (! empty($value) || (empty($value) && true === $force_set)) {
129
+        if (!empty($value) || (empty($value) && true === $force_set)) {
130 130
             Config::set($config, $value);
131 131
         }
132 132
 
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 
137 137
 // =========================== FONCTIONS DE PREVENTION D'ATTAQUE =========================== //
138 138
 
139
-if (! function_exists('esc')) {
139
+if (!function_exists('esc')) {
140 140
     /**
141 141
      * Effectue un simple échappement automatique des données pour des raisons de sécurité.
142 142
      * Pourrait envisager de rendre cela plus complexe à une date ultérieure.
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
     }
164 164
 }
165 165
 
166
-if (! function_exists('h')) {
166
+if (!function_exists('h')) {
167 167
     /**
168 168
      * Méthode pratique pour htmlspecialchars.
169 169
      *
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
     }
183 183
 }
184 184
 
185
-if (! function_exists('purify')) {
185
+if (!function_exists('purify')) {
186 186
     /**
187 187
      * Purifiez l'entrée à l'aide de la classe autonome HTMLPurifier.
188 188
      * Utilisez facilement plusieurs configurations de purificateur.
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
     }
201 201
 }
202 202
 
203
-if (! function_exists('remove_invisible_characters')) {
203
+if (!function_exists('remove_invisible_characters')) {
204 204
     /**
205 205
      * Supprimer les caractères invisibles
206 206
      *
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
     }
214 214
 }
215 215
 
216
-if (! function_exists('stringify_attributes')) {
216
+if (!function_exists('stringify_attributes')) {
217 217
     /**
218 218
      * Chaîner les attributs à utiliser dans les balises HTML.
219 219
      *
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
 
228 228
 // ================================= FONCTIONS D'ENVIRONNEMENT D'EXECUTION ================================= //
229 229
 
230
-if (! function_exists('on_dev')) {
230
+if (!function_exists('on_dev')) {
231 231
     /**
232 232
      * Testez pour voir si nous sommes dans un environnement de développement.
233 233
      */
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
     }
244 244
 }
245 245
 
246
-if (! function_exists('on_prod')) {
246
+if (!function_exists('on_prod')) {
247 247
     /**
248 248
      * Testez pour voir si nous sommes dans un environnement de production.
249 249
      */
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
     }
260 260
 }
261 261
 
262
-if (! function_exists('on_test')) {
262
+if (!function_exists('on_test')) {
263 263
     /**
264 264
      * Testez pour voir si nous sommes dans un environnement de test
265 265
      */
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
     }
272 272
 }
273 273
 
274
-if (! function_exists('is_cli')) {
274
+if (!function_exists('is_cli')) {
275 275
     /**
276 276
      * Testez pour voir si une demande a été faite à partir de la ligne de commande.
277 277
      */
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     }
282 282
 }
283 283
 
284
-if (! function_exists('is_php')) {
284
+if (!function_exists('is_php')) {
285 285
     /**
286 286
      * Détermine si la version actuelle de PHP est égale ou supérieure à la valeur fournie.
287 287
      */
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
     }
292 292
 }
293 293
 
294
-if (! function_exists('is_windows')) {
294
+if (!function_exists('is_windows')) {
295 295
     /**
296 296
      * Déterminez si l'environnement actuel est basé sur Windows.
297 297
      */
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     }
302 302
 }
303 303
 
304
-if (! function_exists('is_https')) {
304
+if (!function_exists('is_https')) {
305 305
     /**
306 306
      * Determines if the application is accessed via an encrypted * (HTTPS) connection.
307 307
      */
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     }
312 312
 }
313 313
 
314
-if (! function_exists('is_localfile')) {
314
+if (!function_exists('is_localfile')) {
315 315
     /**
316 316
      * Vérifiez si le fichier auquel vous souhaitez accéder est un fichier local de votre application ou non
317 317
      */
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
             return true;
322 322
         }
323 323
 
324
-        return ! preg_match('#^(https?://)#i', $name);
324
+        return !preg_match('#^(https?://)#i', $name);
325 325
     }
326 326
 }
327 327
 
328
-if (! function_exists('is_online')) {
328
+if (!function_exists('is_online')) {
329 329
     /**
330 330
      * Tester si l'application s'exécute en local ou en ligne.
331 331
      */
@@ -335,7 +335,7 @@  discard block
 block discarded – undo
335 335
     }
336 336
 }
337 337
 
338
-if (! function_exists('is_connected')) {
338
+if (!function_exists('is_connected')) {
339 339
     /**
340 340
      * Verifie si l'utilisateur a une connexion internet active.
341 341
      */
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
     }
346 346
 }
347 347
 
348
-if (! function_exists('is_ajax_request')) {
348
+if (!function_exists('is_ajax_request')) {
349 349
     /**
350 350
      * Testez pour voir si une requête contient l'en-tête HTTP_X_REQUESTED_WITH.
351 351
      */
@@ -355,7 +355,7 @@  discard block
 block discarded – undo
355 355
     }
356 356
 }
357 357
 
358
-if (! function_exists('redirection')) {
358
+if (!function_exists('redirection')) {
359 359
     /**
360 360
      * Redirige l'utilisateur
361 361
      */
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
     }
370 370
 }
371 371
 
372
-if (! function_exists('redirect')) {
372
+if (!function_exists('redirect')) {
373 373
     /**
374 374
      * Méthode pratique qui fonctionne avec la $request globale actuelle et
375 375
      * l'instance $router à rediriger à l'aide de routes nommées et le routage inversé
@@ -383,7 +383,7 @@  discard block
 block discarded – undo
383 383
     {
384 384
         $redirection = Services::redirection();
385 385
 
386
-        if (! empty($uri)) {
386
+        if (!empty($uri)) {
387 387
             return $redirection->route($uri);
388 388
         }
389 389
 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
     }
392 392
 }
393 393
 
394
-if (! function_exists('link_to')) {
394
+if (!function_exists('link_to')) {
395 395
     /**
396 396
      * Étant donné une chaîne de contrôleur/méthode et tous les paramètres,
397 397
      * tentera de créer l'URL relative à la route correspondante.
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
     }
408 408
 }
409 409
 
410
-if (! function_exists('clean_path')) {
410
+if (!function_exists('clean_path')) {
411 411
     /**
412 412
      * Une méthode pratique pour nettoyer les chemins pour
413 413
      * une sortie plus belle. Utile pour les exceptions
@@ -436,7 +436,7 @@  discard block
 block discarded – undo
436 436
     }
437 437
 }
438 438
 
439
-if (! function_exists('old')) {
439
+if (!function_exists('old')) {
440 440
     /**
441 441
      * Fournit l'accès à "entrée ancienne" qui a été définie dans la session lors d'un redirect()-withInput().
442 442
      *
@@ -448,7 +448,7 @@  discard block
 block discarded – undo
448 448
     function old(string $key, ?string $default = null, $escape = 'html')
449 449
     {
450 450
         // Assurez-vous de charger la session
451
-        if (session_status() === PHP_SESSION_NONE && ! on_test()) {
451
+        if (session_status() === PHP_SESSION_NONE && !on_test()) {
452 452
             session(); // @codeCoverageIgnore
453 453
         }
454 454
 
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 
464 464
 // ================================= FONCTIONS DE DEBOGAGE ================================= //
465 465
 
466
-if (! function_exists('dd')) {
466
+if (!function_exists('dd')) {
467 467
     /**
468 468
      * Prints a Kint debug report and exits.
469 469
      *
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
     }
483 483
 }
484 484
 
485
-if (! function_exists('dump')) {
485
+if (!function_exists('dump')) {
486 486
     /**
487 487
      * Prints a Kint debug report and exits.
488 488
      *
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
     }
500 500
 }
501 501
 
502
-if (! function_exists('deprecationWarning')) {
502
+if (!function_exists('deprecationWarning')) {
503 503
     /**
504 504
      * Méthode d'assistance pour générer des avertissements d'obsolescence
505 505
      *
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
     }
516 516
 }
517 517
 
518
-if (! function_exists('logger')) {
518
+if (!function_exists('logger')) {
519 519
     /**
520 520
      * A convenience/compatibility method for logging events through
521 521
      * the Log system.
@@ -538,7 +538,7 @@  discard block
 block discarded – undo
538 538
     {
539 539
         $logger = Services::logger();
540 540
 
541
-        if (! empty($level) && ! empty($message)) {
541
+        if (!empty($level) && !empty($message)) {
542 542
             return $logger->log($level, $message, $context);
543 543
         }
544 544
 
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
     }
547 547
 }
548 548
 
549
-if (! function_exists('cache')) {
549
+if (!function_exists('cache')) {
550 550
     /**
551 551
      * Une méthode pratique qui donne accès au cache
552 552
      * objet. Si aucun paramètre n'est fourni, renverra l'objet,
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
     }
577 577
 }
578 578
 
579
-if (! function_exists('session')) {
579
+if (!function_exists('session')) {
580 580
     /**
581 581
      * Une méthode pratique pour accéder à l'instance de session, ou un élément qui a été défini dans la session.
582 582
      *
@@ -599,7 +599,7 @@  discard block
 block discarded – undo
599 599
     }
600 600
 }
601 601
 
602
-if (! function_exists('pr')) {
602
+if (!function_exists('pr')) {
603 603
     /**
604 604
      * print_r() convenience function.
605 605
      *
@@ -621,7 +621,7 @@  discard block
 block discarded – undo
621 621
     }
622 622
 }
623 623
 
624
-if (! function_exists('pj')) {
624
+if (!function_exists('pj')) {
625 625
     /**
626 626
      * json pretty print convenience function.
627 627
      *
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
     }
643 643
 }
644 644
 
645
-if (! function_exists('trigger_warning')) {
645
+if (!function_exists('trigger_warning')) {
646 646
     /**
647 647
      * Déclenche un E_USER_WARNING.
648 648
      */
@@ -652,7 +652,7 @@  discard block
 block discarded – undo
652 652
     }
653 653
 }
654 654
 
655
-if (! function_exists('vd')) {
655
+if (!function_exists('vd')) {
656 656
     /**
657 657
      * Shortcut to ref, HTML mode
658 658
      *
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
     }
665 665
 }
666 666
 
667
-if (! function_exists('vdt')) {
667
+if (!function_exists('vdt')) {
668 668
     /**
669 669
      * Shortcut to ref, plain text mode
670 670
      *
@@ -678,7 +678,7 @@  discard block
 block discarded – undo
678 678
 
679 679
 // ================================= FONCTIONS DIVERSES ================================= //
680 680
 
681
-if (! function_exists('force_https')) {
681
+if (!function_exists('force_https')) {
682 682
     /**
683 683
      * Utilisé pour forcer l'accès à une page via HTTPS.
684 684
      * Utilise une redirection standard, plus définira l'en-tête HSTS
@@ -736,7 +736,7 @@  discard block
 block discarded – undo
736 736
     }
737 737
 }
738 738
 
739
-if (! function_exists('getTypeName')) {
739
+if (!function_exists('getTypeName')) {
740 740
     /**
741 741
      * Renvoie la classe d'objets ou le type var de ce n'est pas un objet
742 742
      *
@@ -750,7 +750,7 @@  discard block
 block discarded – undo
750 750
     }
751 751
 }
752 752
 
753
-if (! function_exists('ip_address')) {
753
+if (!function_exists('ip_address')) {
754 754
     /**
755 755
      * Renvoie l'adresse IP de l'utilisateur actuel
756 756
      */
@@ -760,7 +760,7 @@  discard block
 block discarded – undo
760 760
     }
761 761
 }
762 762
 
763
-if (! function_exists('is_really_writable')) {
763
+if (!function_exists('is_really_writable')) {
764 764
     /**
765 765
      * Tests d'inscriptibilité des fichiers
766 766
      */
@@ -770,7 +770,7 @@  discard block
 block discarded – undo
770 770
     }
771 771
 }
772 772
 
773
-if (! function_exists('lang')) {
773
+if (!function_exists('lang')) {
774 774
     /**
775 775
      * Une méthode pratique pour traduire une chaîne ou un tableau d'entrées et formater
776 776
      * le résultat avec le MessageFormatter de l'extension intl.
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
     }
782 782
 }
783 783
 
784
-if (! function_exists('namespace_split')) {
784
+if (!function_exists('namespace_split')) {
785 785
     /**
786 786
      * Séparez l'espace de noms du nom de classe.
787 787
      *
@@ -802,7 +802,7 @@  discard block
 block discarded – undo
802 802
     }
803 803
 }
804 804
 
805
-if (! function_exists('view_exist')) {
805
+if (!function_exists('view_exist')) {
806 806
     /**
807 807
      * Verifie si un fichier de vue existe. Utile pour limiter les failles include
808 808
      */
@@ -816,7 +816,7 @@  discard block
 block discarded – undo
816 816
     }
817 817
 }
818 818
 
819
-if (! function_exists('view')) {
819
+if (!function_exists('view')) {
820 820
     /**
821 821
      * Charge une vue
822 822
      *
@@ -832,7 +832,7 @@  discard block
 block discarded – undo
832 832
     }
833 833
 }
834 834
 
835
-if (! function_exists('flash')) {
835
+if (!function_exists('flash')) {
836 836
     /**
837 837
      * Fournisseur d'acces rapide a la classe PHP Flash
838 838
      *
@@ -864,7 +864,7 @@  discard block
 block discarded – undo
864 864
     }*/
865 865
 }
866 866
 
867
-if (! function_exists('geo_ip')) {
867
+if (!function_exists('geo_ip')) {
868 868
     /**
869 869
      * Recuperation des coordonnees (pays, ville, etc) d'un utilisateur en fonction de son ip
870 870
      */
@@ -874,7 +874,7 @@  discard block
 block discarded – undo
874 874
     }
875 875
 }
876 876
 
877
-if (! function_exists('to_stream')) {
877
+if (!function_exists('to_stream')) {
878 878
     /**
879 879
      * Créez un nouveau flux basé sur le type d'entrée.
880 880
      *
@@ -897,7 +897,7 @@  discard block
 block discarded – undo
897 897
     }
898 898
 }
899 899
 
900
-if (! function_exists('value')) {
900
+if (!function_exists('value')) {
901 901
     /**
902 902
      * Renvoie la valeur par défaut de la valeur donnée.
903 903
      */
@@ -907,7 +907,7 @@  discard block
 block discarded – undo
907 907
     }
908 908
 }
909 909
 
910
-if (! function_exists('collect')) {
910
+if (!function_exists('collect')) {
911 911
     /**
912 912
      * Créez une collection à partir de la valeur donnée.
913 913
      */
@@ -917,7 +917,7 @@  discard block
 block discarded – undo
917 917
     }
918 918
 }
919 919
 
920
-if (! function_exists('with')) {
920
+if (!function_exists('with')) {
921 921
     /**
922 922
      * Renvoie la valeur donnée, éventuellement transmise via le rappel donné.
923 923
      *
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
     }
930 930
 }
931 931
 
932
-if (! function_exists('tap')) {
932
+if (!function_exists('tap')) {
933 933
     /**
934 934
      * Appelez la Closure donnée avec cette instance puis renvoyez l'instance.
935 935
      */
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
     }
940 940
 }
941 941
 
942
-if (! function_exists('last')) {
942
+if (!function_exists('last')) {
943 943
     /**
944 944
      * Recupere le dernier element d'un tableau
945 945
      */
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
     }
950 950
 }
951 951
 
952
-if (! function_exists('invade')) {
952
+if (!function_exists('invade')) {
953 953
     /**
954 954
      * Cette classe offre une fonction d'invasion qui vous permettra de lire / écrire des propriétés privées d'un objet.
955 955
      * Il vous permettra également de définir, obtenir et appeler des méthodes privées.
Please login to merge, or discard this patch.
src/View/Adapters/AbstractAdapter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     {
71 71
         helper('assets');
72 72
 
73
-        if (! empty($viewPathLocator)) {
73
+        if (!empty($viewPathLocator)) {
74 74
             if (is_string($viewPathLocator)) {
75 75
                 $this->viewPath = rtrim($viewPathLocator, '\\/ ') . DS;
76 76
             } elseif ($viewPathLocator instanceof Locator) {
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         $options = (array) $options;
222 222
 
223 223
         $viewPath = $options['viewPath'] ?? $this->viewPath;
224
-        if (! empty($viewPath)) {
224
+        if (!empty($viewPath)) {
225 225
             $file = str_replace('/', DS, rtrim($viewPath, '/\\') . DS . ltrim($view, '/\\'));
226 226
         } else {
227 227
             $file = $view;
@@ -229,12 +229,12 @@  discard block
 block discarded – undo
229 229
 
230 230
         $file = Helpers::ensureExt($file, $ext);
231 231
 
232
-        if (! is_file($file) && $this->locator instanceof Locator) {
232
+        if (!is_file($file) && $this->locator instanceof Locator) {
233 233
             $file = $this->locator->locateFile($view, 'Views', empty($ext) ? 'php' : $ext);
234 234
         }
235 235
 
236 236
         // locateFile renverra une chaîne vide si le fichier est introuvable.
237
-        if (! is_file($file)) {
237
+        if (!is_file($file)) {
238 238
             throw ViewException::invalidFile($view);
239 239
         }
240 240
 
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.
src/Mail/Adapters/AbstractAdapter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,11 +40,11 @@
 block discarded – undo
40 40
             if (empty($dependency['class']) || empty($dependency['package'])) {
41 41
                 throw new InvalidArgumentException('Invalid dependencies property');
42 42
             }
43
-            if (! is_string($dependency['class']) || ! is_string($dependency['package'])) {
43
+            if (!is_string($dependency['class']) || !is_string($dependency['package'])) {
44 44
                 throw new InvalidArgumentException('Invalid dependencies property');
45 45
             }
46 46
 
47
-            if (! class_exists($dependency['class'])) {
47
+            if (!class_exists($dependency['class'])) {
48 48
                 throw new RuntimeException(lang('Mail.dependancyNotFound', [$dependency['class'], static::class, $dependency['package']]));
49 49
             }
50 50
         }
Please login to merge, or discard this patch.
src/Mail/Mail.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
      */
112 112
     protected function factory(): AbstractAdapter
113 113
     {
114
-        if (! empty($this->adapter)) {
114
+        if (!empty($this->adapter)) {
115 115
             return $this->adapter;
116 116
         }
117 117
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
             $handler = static::$validHandlers[$handler];
126 126
         }
127 127
 
128
-        if (! class_exists($handler)) {
128
+        if (!class_exists($handler)) {
129 129
             throw new InvalidArgumentException(lang('Mail.invalidHandler', [$handler]));
130 130
         }
131 131
 
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
             $debug = on_dev();
135 135
         }
136 136
 
137
-        if (! is_subclass_of($handler, AbstractAdapter::class)) {
137
+        if (!is_subclass_of($handler, AbstractAdapter::class)) {
138 138
             throw new InvalidArgumentException(lang('Mail.handlerMustExtendClass', [$handler, AbstractAdapter::class]));
139 139
         }
140 140
 
@@ -342,13 +342,13 @@  discard block
 block discarded – undo
342 342
         // N'est-il pas namespaced ? on cherche le dossier en fonction du parametre "view_base"
343 343
         if (strpos($view, '\\') === false) {
344 344
             $path = $this->config['view_dir'] ?? '';
345
-            if (! empty($path)) {
345
+            if (!empty($path)) {
346 346
                 $path .= '/';
347 347
             }
348 348
         }
349 349
 
350 350
         $view = view($path . $view, $data);
351
-        if (! empty($this->config['template'])) {
351
+        if (!empty($this->config['template'])) {
352 352
             $view->setLayout($this->config['template']);
353 353
         }
354 354
 
Please login to merge, or discard this patch.
src/Mail/Mailable.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -173,7 +173,7 @@  discard block
 block discarded – undo
173 173
     public function send(Mail $mail): bool
174 174
     {
175 175
         foreach ($this->bcc() as $key => $value) {
176
-            if (empty($value) || ! is_string($value)) {
176
+            if (empty($value) || !is_string($value)) {
177 177
                 continue;
178 178
             }
179 179
 
@@ -185,7 +185,7 @@  discard block
 block discarded – undo
185 185
         }
186 186
 
187 187
         foreach ($this->cc() as $key => $value) {
188
-            if (empty($value) || ! is_string($value)) {
188
+            if (empty($value) || !is_string($value)) {
189 189
                 continue;
190 190
             }
191 191
 
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
 
199 199
         $content = $this->content();
200 200
 
201
-        if (! empty($content['view'])) {
201
+        if (!empty($content['view'])) {
202 202
             $mail->view($content['view'], $this->data());
203
-        } elseif (! empty($content['html'])) {
203
+        } elseif (!empty($content['html'])) {
204 204
             $mail->html($content['html']);
205 205
         }
206
-        if (! empty($content['text'])) {
206
+        if (!empty($content['text'])) {
207 207
             $mail->text($content['text']);
208 208
         }
209 209
 
@@ -212,7 +212,7 @@  discard block
 block discarded – undo
212 212
         $mail->priority($this->priority());
213 213
 
214 214
         foreach ($this->replyTo() as $key => $value) {
215
-            if (empty($value) || ! is_string($value)) {
215
+            if (empty($value) || !is_string($value)) {
216 216
                 continue;
217 217
             }
218 218
 
Please login to merge, or discard this patch.