Passed
Push — main ( c2190a...e8aeda )
by Dimitri
09:14 queued 01:02
created
src/Mail/Mailable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     public function send(Mail $mail): bool
194 194
     {
195 195
         foreach ($this->bcc() as $key => $value) {
196
-            if (empty($value) || ! is_string($value)) {
196
+            if (empty($value) || !is_string($value)) {
197 197
                 continue;
198 198
             }
199 199
 
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
         }
206 206
 
207 207
         foreach ($this->cc() as $key => $value) {
208
-            if (empty($value) || ! is_string($value)) {
208
+            if (empty($value) || !is_string($value)) {
209 209
                 continue;
210 210
             }
211 211
 
@@ -218,12 +218,12 @@  discard block
 block discarded – undo
218 218
 
219 219
         $content = $this->content();
220 220
 
221
-        if (! empty($content['view'])) {
221
+        if (!empty($content['view'])) {
222 222
             $mail->view($content['view'], $this->data());
223
-        } elseif (! empty($content['html'])) {
223
+        } elseif (!empty($content['html'])) {
224 224
             $mail->html($content['html']);
225 225
         }
226
-        if (! empty($content['text'])) {
226
+        if (!empty($content['text'])) {
227 227
             $mail->text($content['text']);
228 228
         }
229 229
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $mail->priority($this->priority());
233 233
 
234 234
         foreach ($this->replyTo() as $key => $value) {
235
-            if (empty($value) || ! is_string($value)) {
235
+            if (empty($value) || !is_string($value)) {
236 236
                 continue;
237 237
             }
238 238
 
@@ -246,7 +246,7 @@  discard block
 block discarded – undo
246 246
         $mail->subject($this->subject());
247 247
 
248 248
         foreach ($this->to() as $key => $value) {
249
-            if (empty($value) || ! is_string($value)) {
249
+            if (empty($value) || !is_string($value)) {
250 250
                 continue;
251 251
             }
252 252
 
Please login to merge, or discard this patch.
src/Cli/Commands/Translation/TranslationsFinder.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         }
66 66
 
67 67
         if (is_string($optionLocale)) {
68
-            if (! in_array($optionLocale, config('app.supported_locales'), true)) {
68
+            if (!in_array($optionLocale, config('app.supported_locales'), true)) {
69 69
                 $this->error(
70 70
                     $this->color->error('"' . $optionLocale . '" n\'est pas supporté. Les langues supportées sont: '
71 71
                     . implode(', ', config('app.supported_locales')))
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
             if (is_file($languageFilePath)) {
130 130
                 // Charge les anciennes traductions
131 131
                 $languageStoredKeys = require $languageFilePath;
132
-            } elseif (! is_dir($dir = dirname($languageFilePath))) {
132
+            } elseif (!is_dir($dir = dirname($languageFilePath))) {
133 133
                 // Si le dossier n'existe pas, on le cree
134 134
                 @mkdir($dir, 0777, true);
135 135
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
             $this->table($table);
197 197
         }
198 198
 
199
-        if (! $this->showNew && $countNewKeys > 0) {
199
+        if (!$this->showNew && $countNewKeys > 0) {
200 200
             $this->eol()->writer->bgRed('Note: Vous devez utiliser votre outil de linting pour résoudre les problèmes liés aux normes de codage.', true);
201 201
         }
202 202
     }
Please login to merge, or discard this patch.
src/Cli/Console/Console.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         foreach ($options as $key => $value) {
160 160
             $key = preg_replace('/^\-\-/', '', $key);
161
-            if (! isset($options[$key])) {
161
+            if (!isset($options[$key])) {
162 162
                 $options[$key] = $value;
163 163
             }
164 164
         }
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
      */
172 172
     public function commandExists(string $commandName): bool
173 173
     {
174
-        return ! empty($this->_commands[$commandName]);
174
+        return !empty($this->_commands[$commandName]);
175 175
     }
176 176
 
177 177
     /**
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
         foreach ($files as $file) {
207 207
             $className = $locator->findQualifiedNameFromPath($file);
208 208
 
209
-            if ($className === false || ! class_exists($className)) {
209
+            if ($className === false || !class_exists($className)) {
210 210
                 continue;
211 211
             }
212 212
 
@@ -232,7 +232,7 @@  discard block
 block discarded – undo
232 232
         $class  = new ReflectionClass($className);
233 233
         $logger = $logger ?: Services::logger();
234 234
 
235
-        if (! $class->isInstantiable() || ! $class->isSubclassOf(Command::class)) {
235
+        if (!$class->isInstantiable() || !$class->isSubclassOf(Command::class)) {
236 236
             throw CLIException::invalidCommand($className);
237 237
         }
238 238
 
@@ -259,13 +259,13 @@  discard block
 block discarded – undo
259 259
             $value = (array) $value;
260 260
 
261 261
             $description = $value[0];
262
-            if (! is_string($description)) {
262
+            if (!is_string($description)) {
263 263
                 continue;
264 264
             }
265 265
 
266 266
             $default = $value[1] ?? null;
267 267
             $filter  = $value[2] ?? null;
268
-            if ($filter !== null && ! is_callable($filter)) {
268
+            if ($filter !== null && !is_callable($filter)) {
269 269
                 $filter = null;
270 270
             }
271 271
 
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
             $value = (array) $value;
278 278
 
279 279
             $description = $value[0];
280
-            if (! is_string($description)) {
280
+            if (!is_string($description)) {
281 281
                 continue;
282 282
             }
283 283
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
         }
288 288
 
289 289
         $console = $this;
290
-        $action  = function (?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) {
290
+        $action  = function(?array $arguments = [], ?array $options = [], ?bool $suppress = null) use ($instance, $command, $console) {
291 291
             $this->name(); // ne pas retirer. car en cas, d'absence, cs-fixer mettra cette fonction en static. Et php-cli generera une erreur
292 292
 
293 293
             foreach ($instance->required as $package) {
@@ -298,9 +298,9 @@  discard block
 block discarded – undo
298 298
                 /** @var Interactor $io */
299 299
                 $io = $console->io();
300 300
 
301
-                if (! InstalledVersions::isInstalled($package)) {
301
+                if (!InstalledVersions::isInstalled($package)) {
302 302
                     $io->info('Cette commande nécessite le package "' . $package . '" mais vous ne l\'avez pas', true);
303
-                    if (! $io->confirm('Voulez-vous l\'installer maintenant ?')) {
303
+                    if (!$io->confirm('Voulez-vous l\'installer maintenant ?')) {
304 304
                         return;
305 305
                     }
306 306
 
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
             }
317 317
 
318 318
             $suppress = $suppress ?: $console->suppress;
319
-            if (! $suppress) {
319
+            if (!$suppress) {
320 320
                 $console->start($instance);
321 321
             }
322 322
 
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
 
332 332
             $result = $instance->setOptions($options)->setArguments($arguments)->execute($parameters);
333 333
 
334
-            if (! $suppress) {
334
+            if (!$suppress) {
335 335
                 $console->end();
336 336
             }
337 337
 
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
 
347 347
     private function registerException(Logger $logger)
348 348
     {
349
-        $this->onException(static function (Throwable $e, int $exitCode) use ($logger): void {
349
+        $this->onException(static function(Throwable $e, int $exitCode) use ($logger): void {
350 350
             $logger->error((string) $e, ['exitCode' => $exitCode, 'klinge' => true]);
351 351
         });
352 352
     }
Please login to merge, or discard this patch.
src/Cli/Commands/Utilities/Optimize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 
116 116
     private function removeDevPackages(): void
117 117
     {
118
-        if (! defined('VENDOR_PATH')) {
118
+        if (!defined('VENDOR_PATH')) {
119 119
             return;
120 120
         }
121 121
 
Please login to merge, or discard this patch.
src/Container/Services.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     public static function locator(bool $shared = true): LocatorInterface
282 282
     {
283 283
         if ($shared) {
284
-            if (! isset(static::$instances[Locator::class])) {
284
+            if (!isset(static::$instances[Locator::class])) {
285 285
                 $locator = new Locator(static::autoloader());
286 286
                 if (true === config('optimize.locator_cache_enabled', false)) {
287 287
                     static::$instances[Locator::class] = new LocatorCached($locator, new FileVarExportHandler());
@@ -618,7 +618,7 @@  discard block
 block discarded – undo
618 618
 
619 619
     protected static function cacheServices(): void
620 620
     {
621
-        if (! static::$discovered) {
621
+        if (!static::$discovered) {
622 622
             $locator = static::locator();
623 623
             $files   = $locator->search('Config/Services');
624 624
 
Please login to merge, or discard this patch.
src/Initializer/kint.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,17 +25,17 @@
 block discarded – undo
25 25
 Kint::$display_called_from = $config->display_called_from;
26 26
 Kint::$expanded            = $config->expanded;
27 27
 
28
-if (! empty($config->plugins)) {
28
+if (!empty($config->plugins)) {
29 29
     Kint::$plugins = $config->plugins;
30 30
 }
31 31
 
32 32
 RichRenderer::$theme  = $config->rich_theme;
33 33
 RichRenderer::$folder = $config->rich_folder;
34 34
 
35
-if (! empty($config->rich_value_plugins)) {
35
+if (!empty($config->rich_value_plugins)) {
36 36
     RichRenderer::$value_plugins = $config->rich_value_plugins;
37 37
 }
38
-if (! empty($config->rich_tab_plugins)) {
38
+if (!empty($config->rich_tab_plugins)) {
39 39
     RichRenderer::$tab_plugins = $config->rich_tab_plugins;
40 40
 }
41 41
 
Please login to merge, or discard this patch.
src/Formatter/XmlFormatter.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     public function __construct()
23 23
     {
24 24
         // SimpleXML est installé par défaut, mais il est préférable de vérifier, puis de fournir une solution de repli.
25
-        if (! extension_loaded('simplexml')) {
25
+        if (!extension_loaded('simplexml')) {
26 26
             throw FormatException::missingExtension();
27 27
         }
28 28
 
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
     /**
67 67
      * Une méthode récursive pour convertir un tableau en une chaîne XML valide.
68 68
      */
69
-    protected function arrayToXml(array $data, SimpleXMLElement &$structure, string $basenode): void
69
+    protected function arrayToXml(array $data, SimpleXMLElement&$structure, string $basenode): void
70 70
     {
71 71
         foreach ($data as $key => $value) {
72 72
             // change false/true en 0/1
Please login to merge, or discard this patch.