Passed
Branch main (a5ccba)
by Gaetano
04:40
created
Core/FieldHandler/EzRichText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 {
12 12
     public function setReferenceResolver(ReferenceResolverInterface $referenceResolver)
13 13
     {
14
-        if (! $referenceResolver instanceof EmbeddedReferenceResolverInterface) {
14
+        if (!$referenceResolver instanceof EmbeddedReferenceResolverInterface) {
15 15
             throw new MigrationBundleException("Reference resolver injected into EzRichText field handler should implement EmbeddedReferenceResolverInterface");
16 16
         }
17 17
         parent::setReferenceResolver($referenceResolver);
Please login to merge, or discard this patch.
Core/FieldHandler/EzXmlText.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
 {
13 13
     public function setReferenceResolver(ReferenceResolverInterface $referenceResolver)
14 14
     {
15
-        if (! $referenceResolver instanceof EmbeddedReferenceResolverInterface) {
15
+        if (!$referenceResolver instanceof EmbeddedReferenceResolverInterface) {
16 16
             throw new MigrationBundleException("Reference resolver injected into EzXmlText field handler should implement EmbeddedReferenceResolverInterface");
17 17
         }
18 18
         parent::setReferenceResolver($referenceResolver);
Please login to merge, or discard this patch.
Command/MassMigrateCommand.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -180,14 +180,14 @@  discard block
 block discarded – undo
180 180
         }
181 181
 
182 182
         $missed = $total - $this->migrationsDone[Migration::STATUS_DONE] - $this->migrationsDone[Migration::STATUS_FAILED] - $this->migrationsDone[Migration::STATUS_SKIPPED];
183
-        $this->writeln("\nExecuted ".$this->migrationsDone[Migration::STATUS_DONE].' migrations'.
184
-            ', failed '.$this->migrationsDone[Migration::STATUS_FAILED].
185
-            ', skipped '.$this->migrationsDone[Migration::STATUS_SKIPPED].
183
+        $this->writeln("\nExecuted " . $this->migrationsDone[Migration::STATUS_DONE] . ' migrations' .
184
+            ', failed ' . $this->migrationsDone[Migration::STATUS_FAILED] .
185
+            ', skipped ' . $this->migrationsDone[Migration::STATUS_SKIPPED] .
186 186
             ($missed ? ", missed $missed" : ''));
187 187
 
188 188
         $time = microtime(true) - $start;
189 189
         // since we use subprocesses, we can not measure max memory used
190
-        $this->writeln("<info>Time taken: ".sprintf('%.3f', $time)." secs</info>");
190
+        $this->writeln("<info>Time taken: " . sprintf('%.3f', $time) . " secs</info>");
191 191
 
192 192
         return $subprocessesFailed + $this->migrationsDone[Migration::STATUS_FAILED] + $missed;
193 193
     }
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
         foreach ($toExecute as  $name => $migrationDefinition) {
242 242
             // let's skip migrations that we know are invalid - user was warned and he decided to proceed anyway
243 243
             if ($migrationDefinition->status == MigrationDefinition::STATUS_INVALID) {
244
-                $this->writeln("<comment>Skipping migration (invalid definition?) Path: ".$migrationDefinition->path."</comment>", self::$VERBOSITY_CHILD);
244
+                $this->writeln("<comment>Skipping migration (invalid definition?) Path: " . $migrationDefinition->path . "</comment>", self::$VERBOSITY_CHILD);
245 245
                 $skipped++;
246 246
                 continue;
247 247
             }
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
      * @param string $buffer
315 315
      * @param null|\Symfony\Component\Process\Process $process
316 316
      */
317
-    public function onChildProcessOutput($type, $buffer, $process=null)
317
+    public function onChildProcessOutput($type, $buffer, $process = null)
318 318
     {
319 319
         $lines = explode("\n", trim($buffer));
320 320
 
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
             // we tag the output with the id of the child process
334 334
             if (trim($line) !== '') {
335
-                $msg = '[' . ($process ? $process->getPid() : ''). '] ' . trim($line);
335
+                $msg = '[' . ($process ? $process->getPid() : '') . '] ' . trim($line);
336 336
                 if ($type == 'err') {
337 337
                     $this->writeErrorln($msg, OutputInterface::VERBOSITY_QUIET, OutputInterface::OUTPUT_RAW);
338 338
                 } else {
@@ -408,7 +408,7 @@  discard block
 block discarded – undo
408 408
     {
409 409
         $output->writeln('Found ' . count($toExecute) . ' migrations in ' . count($paths) . ' directories');
410 410
         $output->writeln('In the same directories, migrations previously executed: ' . $this->migrationsAlreadyDone[Migration::STATUS_DONE] .
411
-            ', failed: ' . $this->migrationsAlreadyDone[Migration::STATUS_FAILED] . ', skipped: '. $this->migrationsAlreadyDone[Migration::STATUS_SKIPPED]);
411
+            ', failed: ' . $this->migrationsAlreadyDone[Migration::STATUS_FAILED] . ', skipped: ' . $this->migrationsAlreadyDone[Migration::STATUS_SKIPPED]);
412 412
         if ($this->migrationsAlreadyDone[Migration::STATUS_STARTED]) {
413 413
             $output->writeln('<info>In the same directories, migrations currently executing: ' . $this->migrationsAlreadyDone[Migration::STATUS_STARTED] . '</info>');
414 414
         }
Please login to merge, or discard this patch.
Command/ResumeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
 
132 132
         $time = microtime(true) - $start;
133 133
         $output->writeln("Resumed $executed migrations, failed $failed");
134
-        $output->writeln("Time taken: ".sprintf('%.3f', $time)." secs, memory: ".sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)). ' MB');
134
+        $output->writeln("Time taken: " . sprintf('%.3f', $time) . " secs, memory: " . sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)) . ' MB');
135 135
 
136 136
         if ($failed) {
137 137
             return 2;
Please login to merge, or discard this patch.
Command/MigrateCommand.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -250,9 +250,9 @@  discard block
 block discarded – undo
250 250
         $time = microtime(true) - $start;
251 251
         if ($input->getOption('separate-process')) {
252 252
             // in case of using subprocesses, we can not measure max memory used
253
-            $this->writeln("<info>Time taken: ".sprintf('%.3f', $time)." secs</info>");
253
+            $this->writeln("<info>Time taken: " . sprintf('%.3f', $time) . " secs</info>");
254 254
         } else {
255
-            $this->writeln("<info>Time taken: ".sprintf('%.3f', $time)." secs, memory: ".sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)). ' MB</info>');
255
+            $this->writeln("<info>Time taken: " . sprintf('%.3f', $time) . " secs, memory: " . sprintf('%.2f', (memory_get_peak_usage(true) / 1000000)) . ' MB</info>');
256 256
         }
257 257
 
258 258
         return $failed;
@@ -484,7 +484,7 @@  discard block
 block discarded – undo
484 484
             $builderArgs[] = '--no-debug';
485 485
         }
486 486
         if ($input->getOption('siteaccess')) {
487
-            $builderArgs[] = '--siteaccess='.$input->getOption('siteaccess');
487
+            $builderArgs[] = '--siteaccess=' . $input->getOption('siteaccess');
488 488
         }
489 489
         switch ($this->verbosity) {
490 490
             case OutputInterface::VERBOSITY_VERBOSE:
Please login to merge, or discard this patch.
Core/Matcher/UserMatcher.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -111,7 +111,7 @@
 block discarded – undo
111 111
         $users = [];
112 112
 
113 113
         foreach ($userIds as $userId) {
114
-            try{
114
+            try {
115 115
                 // return unique contents
116 116
                 $user = $this->repository->getUserService()->loadUser($userId);
117 117
 
Please login to merge, or discard this patch.
Core/StorageHandler/Database/Migration.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
     public function endMigration(APIMigration $migration, $force = false)
207 207
     {
208 208
         if ($migration->status == APIMigration::STATUS_STARTED) {
209
-            throw new MigrationBundleException($this->getEntityName($migration)." '{$migration->name}' can not be ended as its status is 'started'...");
209
+            throw new MigrationBundleException($this->getEntityName($migration) . " '{$migration->name}' can not be ended as its status is 'started'...");
210 210
         }
211 211
 
212 212
         $this->createTableIfNeeded();
@@ -233,13 +233,13 @@  discard block
 block discarded – undo
233 233
         if (!is_array($existingMigrationData)) {
234 234
             // commit to release the lock
235 235
             $conn->commit();
236
-            throw new MigrationBundleException($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found");
236
+            throw new MigrationBundleException($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not found");
237 237
         }
238 238
 
239 239
         if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) {
240 240
             // commit to release the lock
241 241
             $conn->commit();
242
-            throw new MigrationBundleException($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not executing");
242
+            throw new MigrationBundleException($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not executing");
243 243
         }
244 244
 
245 245
         $conn->update(
@@ -395,7 +395,7 @@  discard block
 block discarded – undo
395 395
         if (!is_array($existingMigrationData)) {
396 396
             // commit immediately, to release the lock and avoid deadlocks
397 397
             $conn->commit();
398
-            throw new MigrationBundleException($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found");
398
+            throw new MigrationBundleException($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not found");
399 399
         }
400 400
 
401 401
         // migration exists
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
         if ($existingMigrationData['status'] != APIMigration::STATUS_SUSPENDED) {
405 405
             // commit to release the lock
406 406
             $conn->commit();
407
-            throw new MigrationBundleException($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not suspended");
407
+            throw new MigrationBundleException($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not suspended");
408 408
         }
409 409
 
410 410
         $migration = new APIMigration(
Please login to merge, or discard this patch.
Core/Executor/MigrationDefinitionExecutor.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@
 block discarded – undo
170 170
 
171 171
         foreach ($dsl['references'] as $key => $reference) {
172 172
             // BC
173
-            if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'] )) {
173
+            if (is_array($reference) && isset($reference['json_path']) && !isset($reference['attribute'])) {
174 174
                 $reference['attribute'] = $reference['json_path'];
175 175
             }
176 176
             $reference = $this->parseReferenceDefinition($key, $reference);
Please login to merge, or discard this patch.
Core/Executor/ContentManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -778,7 +778,7 @@
 block discarded – undo
778 778
             },
779 779
             array_filter(
780 780
                 $this->repository->getContentLanguageService()->loadLanguages(),
781
-                function ($language) {
781
+                function($language) {
782 782
                     return $language->enabled;
783 783
                 }
784 784
             )
Please login to merge, or discard this patch.