Passed
Push — main ( c7b99b...89bfd0 )
by
unknown
31:26 queued 27:32
created
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/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/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.
src/Loader/Load.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             return $models;
74 74
         }
75 75
 
76
-        if (! self::isLoaded('models', $model)) {
76
+        if (!self::isLoaded('models', $model)) {
77 77
             self::loaded('models', $model, FileLocator::model($model, $connection));
78 78
         }
79 79
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
      */
88 88
     private static function isLoaded(string $module, $element): bool
89 89
     {
90
-        if (! isset(self::$loads[$module]) || ! is_array(self::$loads[$module])) {
90
+        if (!isset(self::$loads[$module]) || !is_array(self::$loads[$module])) {
91 91
             return false;
92 92
         }
93 93
 
Please login to merge, or discard this patch.
src/Router/RouteBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -269,7 +269,7 @@
 block discarded – undo
269 269
      */
270 270
     private function attribute(string $key, $value): self
271 271
     {
272
-        if (! in_array($key, $this->allowedAttributes, true)) {
272
+        if (!in_array($key, $this->allowedAttributes, true)) {
273 273
             throw new InvalidArgumentException("L'attribute [{$key}] n'existe pas.");
274 274
         }
275 275
 
Please login to merge, or discard this patch.
src/Helpers/scl.php 1 patch
Spacing   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -27,11 +27,11 @@  discard block
 block discarded – undo
27 27
 function scl_upLoad($input, $path = '', $size = 2500000, $type = '', $output = '')
28 28
 {
29 29
     // taille par défaut
30
-    $size = (empty($size) || ! is_numeric($size)) ? 2500000 : $size;
30
+    $size = (empty($size) || !is_numeric($size)) ? 2500000 : $size;
31 31
     // Le dossier par defaut est la racine
32
-    $path = (! empty($path) && ! file_exists($path)) ? '' : htmlspecialchars($path);
32
+    $path = (!empty($path) && !file_exists($path)) ? '' : htmlspecialchars($path);
33 33
 
34
-    if (! is_array($input)) {
34
+    if (!is_array($input)) {
35 35
         return [0, 'Entrée non valide'];
36 36
     }
37 37
     if (empty($input['tmp_name']) || empty($input['name']) || empty($input['size'])) {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         }
110 110
     }
111 111
 
112
-    if (! in_array(strtolower(pathinfo($input['name'])['extension']), $extensions, true)) {
112
+    if (!in_array(strtolower(pathinfo($input['name'])['extension']), $extensions, true)) {
113 113
         return [3, 'Extension non prise en charge'];
114 114
     }
115 115
 
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
         $output    = 'scl_' . date('Ymd') . '-' . date('His');
126 126
         $extension = '0.';
127 127
     } else { // Si on defini le nom de sortie...
128
-        if (! empty(explode('.', $output)[1]) && in_array(strtolower(explode('.', $output)[1]), $extensions, true)) {  // Si l'extension est presente dans ce nom et est valide...
128
+        if (!empty(explode('.', $output)[1]) && in_array(strtolower(explode('.', $output)[1]), $extensions, true)) {  // Si l'extension est presente dans ce nom et est valide...
129 129
             $out       = explode('.', $output);
130 130
             $output    = $out[0]; // On enregistre le fichier avec le nom specifié
131 131
             $extension = '1.' . $out[1]; // On enregistre le fichier avec l'extension specifié (changement d'extension)
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     }
145 145
 
146 146
     // si le fichier n'a pas été téléchargé
147
-    if (! move_uploaded_file($input['tmp_name'], $path . $output . '.' . $extension)) {
147
+    if (!move_uploaded_file($input['tmp_name'], $path . $output . '.' . $extension)) {
148 148
         return [4, 'Erreur de téléversement'];
149 149
     }
150 150
 
@@ -165,11 +165,11 @@  discard block
 block discarded – undo
165 165
 function scl_minimizeImg($src, $size = [], $relative = false)
166 166
 {
167 167
     // Si le fichier n'existe pas
168
-    if (! file_exists($src)) {
168
+    if (!file_exists($src)) {
169 169
         return [0, 'Fichier inexistant'];
170 170
     }
171 171
     // Si on n'envoi pas un tableau ou un nombre comme tailles
172
-    if (empty($size) || (! is_array($size) && ! is_int($size))) {
172
+    if (empty($size) || (!is_array($size) && !is_int($size))) {
173 173
         return [1, 'Mauvaises dimensions de redimensionnement'];
174 174
     }
175 175
 
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
             return [2, 'Violation du nombre de dimension'];
181 181
         }
182 182
         // Si l'un des element du tableau n'est pas un nombre
183
-        if (! is_int($size[0]) || (! empty($size[1]) && ! is_int($size[1]))) {
183
+        if (!is_int($size[0]) || (!empty($size[1]) && !is_int($size[1]))) {
184 184
             return [3, 'Type de dimension inconnu'];
185 185
         }
186 186
     }
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
 {
259 259
     // Valeurs par défaut
260 260
     $nbr = (empty($nbr)) ? 8 : (int) $nbr;
261
-    $nbr = (! is_int($nbr)) ? 8 : (int) $nbr;
261
+    $nbr = (!is_int($nbr)) ? 8 : (int) $nbr;
262 262
     $nbr = ($nbr < 3 || $nbr > 64) ? 8 : (int) $nbr;
263 263
 
264 264
     switch ($type) {
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
 function scl_date($date, $format = 'D, d M Y', $interval = true, $fuseau = 'Europe/Paris')
317 317
 {
318 318
     // Valeurs par défaut
319
-    $format   = (empty($format) || ! is_string($format)) ? 'D, d M Y' : htmlspecialchars(trim($format)); // Le format de sortie, par défaut = D, d M Y
320
-    $fuseau   = (empty($fuseau) || ! is_string($fuseau)) ? 'Europe/Paris' : htmlspecialchars(trim($fuseau)); // fuseau horaire
321
-    $interval = (! is_bool($interval)) ? true : $interval; // Specifie si on gere les intervales ou pas
319
+    $format   = (empty($format) || !is_string($format)) ? 'D, d M Y' : htmlspecialchars(trim($format)); // Le format de sortie, par défaut = D, d M Y
320
+    $fuseau   = (empty($fuseau) || !is_string($fuseau)) ? 'Europe/Paris' : htmlspecialchars(trim($fuseau)); // fuseau horaire
321
+    $interval = (!is_bool($interval)) ? true : $interval; // Specifie si on gere les intervales ou pas
322 322
     $interval = ($interval === false) ? false : true; // Specifie si on gere les intervales ou pas
323 323
 
324
-    $date = new DateTime($date);  // On contruit la date
324
+    $date = new DateTime($date); // On contruit la date
325 325
 
326 326
     // Si on ne gere pas les intervales
327 327
     if ($interval === false) {
@@ -493,7 +493,7 @@  discard block
 block discarded – undo
493 493
 function scl_hash($str, $lenght = 128, $key = '')
494 494
 {
495 495
     // Valeur par defaut
496
-    $lenght = (empty($lenght) || ! is_int($lenght)) ? 128 : $lenght;
496
+    $lenght = (empty($lenght) || !is_int($lenght)) ? 128 : $lenght;
497 497
     //    Valeurs minimale et maximale pour le haché
498 498
     $lenght = ($lenght < 50) ? 50 : $lenght;
499 499
     $lenght = ($lenght > 200) ? 200 : $lenght;
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
     // Valeur par defaut
541 541
     $action = strtolower($action);
542 542
     $action = ($action !== 'decrypt') ? 'encrypt' : 'decrypt';
543
-    $repeat = (! is_int($repeat) || $repeat < 1) ? 0 : $repeat;
543
+    $repeat = (!is_int($repeat) || $repeat < 1) ? 0 : $repeat;
544 544
 
545 545
     $chars = ''; // Les differents caractères entrés
546 546
     $size  = strlen($str);
@@ -567,7 +567,7 @@  discard block
 block discarded – undo
567 567
         'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
568 568
         'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
569 569
     ];
570
-    $chars  = explode(' ', $chars);  // On transforme la chaine précédement créée en tableau
570
+    $chars  = explode(' ', $chars); // On transforme la chaine précédement créée en tableau
571 571
     $return = '';
572 572
 
573 573
     // On parcours tout le dit tableau (ie. on recupere les caracteres un a un)
@@ -665,7 +665,7 @@  discard block
 block discarded – undo
665 665
 {
666 666
     // Valeur par defaut
667 667
     $str  = htmlspecialchars($str); // On protege la chaine
668
-    $size = (! is_numeric($size)) ? strlen($str) : $size; // Taille à couper
668
+    $size = (!is_numeric($size)) ? strlen($str) : $size; // Taille à couper
669 669
 
670 670
     $lenght = strlen($str); // longueur de la chaine
671 671
     if ($lenght > $size) {
@@ -698,7 +698,7 @@  discard block
 block discarded – undo
698 698
 {
699 699
     // Valeur par defaut
700 700
     $str = htmlspecialchars($str); // On protege la chaine
701
-    $max = (! is_numeric($max)) ? strlen($str) : $max; // Taille à couper
701
+    $max = (!is_numeric($max)) ? strlen($str) : $max; // Taille à couper
702 702
 
703 703
     $length = strlen($str); // Nombre de caractères
704 704
 
@@ -964,17 +964,17 @@  discard block
 block discarded – undo
964 964
 function scl_splitInt($nbr, $pas = 3, $separateur = ' ')
965 965
 {
966 966
     // Valeurs par défaut
967
-    if (! is_numeric($nbr)) {
967
+    if (!is_numeric($nbr)) {
968 968
         return;
969 969
     }
970
-    $pas        = (! empty($pas) && is_int($pas)) ? $pas : 3;
970
+    $pas        = (!empty($pas) && is_int($pas)) ? $pas : 3;
971 971
     $separateur = (in_array($separateur, ['.', ' ', ',', '-', '/'], true)) ? $separateur : ' ';
972 972
 
973 973
     $return = ''; // Valeur renvoyée
974 974
 
975 975
     $nombre  = explode('.', $nbr);
976 976
     $nbr     = $nombre[0];
977
-    $virgule = (! empty($nombre[1])) ? '.' . $nombre[1] : '';
977
+    $virgule = (!empty($nombre[1])) ? '.' . $nombre[1] : '';
978 978
 
979 979
     $lenght = strlen($nbr); // nombre de chiffre
980 980
     $nbr    = strrev($nbr); // on inverse le nombre
@@ -1225,7 +1225,7 @@  discard block
 block discarded – undo
1225 1225
 
1226 1226
     $return .= $trio[1] . ' ' . $secon[1] . ' ' . $prim[1];
1227 1227
 
1228
-    if (! ($cent_c === '0' || $cent_c === '') || ! ($dix_c === '0' || $dix_c === '')) {
1228
+    if (!($cent_c === '0' || $cent_c === '') || !($dix_c === '0' || $dix_c === '')) {
1229 1229
         $return .= $trio_c . ' ' . $secon_c;
1230 1230
     }
1231 1231
 
Please login to merge, or discard this patch.
src/Cli/Commands/Generators/Controller.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
             } elseif ($rest) {
98 98
                 $rest = is_string($rest) ? $rest : 'controller';
99 99
 
100
-                if (! in_array($rest, ['controller', 'presenter'], true)) {
100
+                if (!in_array($rest, ['controller', 'presenter'], true)) {
101 101
                     // @codeCoverageIgnoreStart
102 102
                     $rest = $this->choice(lang('CLI.generator.parentClass'), ['controller', 'presenter']);
103 103
                     $this->newLine();
Please login to merge, or discard this patch.