Passed
Push — master ( 12c08e...9143b7 )
by Gaetano
09:48
created
Core/StorageHandler/Database/Migration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
             }
85 85
             if (is_array($paths) && count($paths)) {
86 86
                 $pexps = array();
87
-                foreach($paths as $path) {
87
+                foreach ($paths as $path) {
88 88
                     /// @todo use a proper db-aware escaping function
89
-                    $pexps[] = $q->expr->like('path', "'" . str_replace(array('_', '%', "'"), array('\_', '\%', "''"), $path).'%' . "'");
89
+                    $pexps[] = $q->expr->like('path', "'" . str_replace(array('_', '%', "'"), array('\_', '\%', "''"), $path) . '%' . "'");
90 90
                 }
91 91
                 $exps[] = $q->expr->lor($pexps);
92 92
             }
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
     public function endMigration(APIMigration $migration, $force = false)
197 197
     {
198 198
         if ($migration->status == APIMigration::STATUS_STARTED) {
199
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as its status is 'started'...");
199
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as its status is 'started'...");
200 200
         }
201 201
 
202 202
         $this->createTableIfNeeded();
@@ -223,13 +223,13 @@  discard block
 block discarded – undo
223 223
         if (!is_array($existingMigrationData)) {
224 224
             // commit to release the lock
225 225
             $conn->commit();
226
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not found");
226
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not found");
227 227
         }
228 228
 
229 229
         if (($existingMigrationData['status'] != APIMigration::STATUS_STARTED) && !$force) {
230 230
             // commit to release the lock
231 231
             $conn->commit();
232
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be ended as it is not executing");
232
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be ended as it is not executing");
233 233
         }
234 234
 
235 235
         $conn->update(
@@ -384,7 +384,7 @@  discard block
 block discarded – undo
384 384
         if (!is_array($existingMigrationData)) {
385 385
             // commit immediately, to release the lock and avoid deadlocks
386 386
             $conn->commit();
387
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not found");
387
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not found");
388 388
         }
389 389
 
390 390
         // migration exists
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
         if ($existingMigrationData['status'] != APIMigration::STATUS_SUSPENDED) {
394 394
             // commit to release the lock
395 395
             $conn->commit();
396
-            throw new \Exception($this->getEntityName($migration)." '{$migration->name}' can not be resumed as it is not suspended");
396
+            throw new \Exception($this->getEntityName($migration) . " '{$migration->name}' can not be resumed as it is not suspended");
397 397
         }
398 398
 
399 399
         $migration = new APIMigration(
@@ -455,7 +455,7 @@  discard block
 block discarded – undo
455 455
         foreach ($schema->toSql($dbPlatform) as $sql) {
456 456
             try {
457 457
                 $this->dbHandler->exec($sql);
458
-            } catch(QueryException $e) {
458
+            } catch (QueryException $e) {
459 459
                 // work around limitations in both Mysql and Doctrine
460 460
                 // @see https://github.com/kaliop-uk/ezmigrationbundle/issues/176
461 461
                 if (strpos($e->getMessage(), '1071 Specified key was too long; max key length is 767 bytes') !== false &&
Please login to merge, or discard this patch.
Core/FieldHandler/EzMatrix.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -24,13 +24,13 @@  discard block
 block discarded – undo
24 24
 
25 25
         if ($this->usingLegacyFieldType()) {
26 26
             $rows = array();
27
-            foreach($fieldValue as $data) {
27
+            foreach ($fieldValue as $data) {
28 28
                 $rows[] = new \EzSystems\MatrixBundle\FieldType\Matrix\Row($data);
29 29
             }
30 30
             return new \EzSystems\MatrixBundle\FieldType\Matrix\Value($rows);
31 31
         } else {
32 32
             $rows = array();
33
-            foreach($fieldValue as $data) {
33
+            foreach ($fieldValue as $data) {
34 34
                 $rows[] = new \EzSystems\EzPlatformMatrixFieldtype\FieldType\Value\Row($data);
35 35
             }
36 36
             return new \EzSystems\EzPlatformMatrixFieldtype\FieldType\Value($rows);
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
         $data = array();
43 43
 
44 44
         if ($this->usingLegacyFieldType()) {
45
-            foreach($fieldValue->getRows() as $row) {
45
+            foreach ($fieldValue->getRows() as $row) {
46 46
                 $data[] = $row->toArray();
47 47
             }
48 48
         } else {
49
-            foreach($fieldValue->getRows() as $row) {
49
+            foreach ($fieldValue->getRows() as $row) {
50 50
                 $data[] = $row->getCells();
51 51
             }
52 52
         }
Please login to merge, or discard this patch.
Core/Executor/ContentManager.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -545,7 +545,7 @@  discard block
 block discarded – undo
545 545
                     $locations = $locationService->loadLocations($content->contentInfo);
546 546
                     if (count($locations) > 1) {
547 547
                         $otherParentLocations = array();
548
-                        foreach($locations as $otherLocation) {
548
+                        foreach ($locations as $otherLocation) {
549 549
                             if ($otherLocation->id != $location->id) {
550 550
                                 $otherParentLocations[] = $otherLocation->parentLocationId;
551 551
                             }
@@ -596,7 +596,7 @@  discard block
 block discarded – undo
596 596
                 }
597 597
 
598 598
                 $attributes = array();
599
-                foreach($languages as $lang) {
599
+                foreach ($languages as $lang) {
600 600
                     foreach ($content->getFieldsByLanguage($lang) as $fieldIdentifier => $field) {
601 601
                         $fieldDefinition = $contentType->getFieldDefinition($fieldIdentifier);
602 602
                         $fieldValue = $this->fieldHandlerManager->fieldValueToHash(
@@ -744,7 +744,7 @@  discard block
 block discarded – undo
744 744
             },
745 745
             array_filter(
746 746
                 $this->repository->getContentLanguageService()->loadLanguages(),
747
-                function ($language) {
747
+                function($language) {
748 748
                     return $language->enabled;
749 749
                 }
750 750
             )
Please login to merge, or discard this patch.