Passed
Push — master ( d17173...2c21ba )
by Pieter
05:43
created
src/RapidoAdapter/DoctrineDbalStorage/SchemaSynchronizer.php 1 patch
Braces   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -40,7 +40,9 @@  discard block
 block discarded – undo
40 40
 
41 41
         $this->updateTable($table);
42 42
 
43
-        if (!$metadata->generateSnapshot()) return;
43
+        if (!$metadata->generateSnapshot()) {
44
+            return;
45
+        }
44 46
 
45 47
         $table = $this->generateTable($metadata, true);
46 48
         $table->setPrimaryKey([$this->idColumnName, $metadata->getSnapshotColumnName()]);
@@ -72,13 +74,15 @@  discard block
 block discarded – undo
72 74
             function(Table $existingTable) use ($table) { return $table->getName() == $existingTable->getName(); }
73 75
         );
74 76
 
75
-        if (count($existingTables) > 1)
76
-            throw new \UnexpectedValueException(sprintf("Multiple tables with the name '%s' exist.", $table->getName()));
77
+        if (count($existingTables) > 1) {
78
+                    throw new \UnexpectedValueException(sprintf("Multiple tables with the name '%s' exist.", $table->getName()));
79
+        }
77 80
 
78 81
         if (count($existingTables) == 1) {
79 82
             $tableDiff = $this->schemaComparator->diffTable(current($existingTables), $table);
80
-            if ($tableDiff)
81
-                $this->schemaManager->alterTable($tableDiff);
83
+            if ($tableDiff) {
84
+                            $this->schemaManager->alterTable($tableDiff);
85
+            }
82 86
         } else {
83 87
             $this->schemaManager->createTable($table);
84 88
         }
Please login to merge, or discard this patch.