Completed
Push — master ( c84f2a...178c75 )
by Mike
06:00
created
lib/Doctrine/DBAL/Migrations/Version.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
     /** @var SchemaDiffProviderInterface */
104 104
     private $schemaProvider;
105 105
 
106
-    public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider=null)
106
+    public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider = null)
107 107
     {
108 108
         $this->configuration = $configuration;
109 109
         $this->outputWriter = $configuration->getOutputWriter();
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
         if ($schemaProvider !== null) {
116 116
             $this->schemaProvider = $schemaProvider;
117 117
         }
118
-        if($schemaProvider === null) {
118
+        if ($schemaProvider === null) {
119 119
             $schemaProvider = new SchemaDiffProvider($this->connection->getSchemaManager(),
120 120
                 $this->connection->getDatabasePlatform());
121 121
             $this->schemaProvider = LazySchemaDiffProvider::fromDefaultProxyFactoryConfiguration($schemaProvider);
@@ -221,11 +221,11 @@  discard block
 block discarded – undo
221 221
     {
222 222
         $queries = $this->execute($direction, true);
223 223
 
224
-        if ( ! empty($this->params)) {
224
+        if (!empty($this->params)) {
225 225
             throw MigrationException::migrationNotConvertibleToSql($this->class);
226 226
         }
227 227
 
228
-        $this->outputWriter->write("\n-- Version " . $this->version . "\n");
228
+        $this->outputWriter->write("\n-- Version ".$this->version."\n");
229 229
 
230 230
         $sqlQueries = [$this->version => $queries];
231 231
         $sqlWriter = new SqlFileWriter(
@@ -279,12 +279,12 @@  discard block
 block discarded – undo
279 279
             $this->state = self::STATE_PRE;
280 280
             $fromSchema = $this->schemaProvider->createFromSchema();
281 281
 
282
-            $this->migration->{'pre' . ucfirst($direction)}($fromSchema);
282
+            $this->migration->{'pre'.ucfirst($direction)}($fromSchema);
283 283
 
284 284
             if ($direction === self::DIRECTION_UP) {
285
-                $this->outputWriter->write("\n" . sprintf('  <info>++</info> migrating <comment>%s</comment>', $this->version) . "\n");
285
+                $this->outputWriter->write("\n".sprintf('  <info>++</info> migrating <comment>%s</comment>', $this->version)."\n");
286 286
             } else {
287
-                $this->outputWriter->write("\n" . sprintf('  <info>--</info> reverting <comment>%s</comment>', $this->version) . "\n");
287
+                $this->outputWriter->write("\n".sprintf('  <info>--</info> reverting <comment>%s</comment>', $this->version)."\n");
288 288
             }
289 289
 
290 290
             $this->state = self::STATE_EXEC;
@@ -297,9 +297,9 @@  discard block
 block discarded – undo
297 297
             $this->executeRegisteredSql($dryRun, $timeAllQueries);
298 298
 
299 299
             $this->state = self::STATE_POST;
300
-            $this->migration->{'post' . ucfirst($direction)}($toSchema);
300
+            $this->migration->{'post'.ucfirst($direction)}($toSchema);
301 301
 
302
-            if (! $dryRun) {
302
+            if (!$dryRun) {
303 303
                 if ($direction === self::DIRECTION_UP) {
304 304
                     $this->markMigrated();
305 305
                 } else {
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
                 }
341 341
             }
342 342
 
343
-            $this->outputWriter->write(sprintf("\n  <info>SS</info> skipped (Reason: %s)",  $e->getMessage()));
343
+            $this->outputWriter->write(sprintf("\n  <info>SS</info> skipped (Reason: %s)", $e->getMessage()));
344 344
 
345 345
             $this->state = self::STATE_NONE;
346 346
 
@@ -406,13 +406,13 @@  discard block
 block discarded – undo
406 406
 
407 407
     private function executeRegisteredSql($dryRun = false, $timeAllQueries = false)
408 408
     {
409
-        if (! $dryRun) {
409
+        if (!$dryRun) {
410 410
             if (!empty($this->sql)) {
411 411
                 foreach ($this->sql as $key => $query) {
412 412
                     $queryStart = microtime(true);
413 413
 
414
-                    if ( ! isset($this->params[$key])) {
415
-                        $this->outputWriter->write('     <comment>-></comment> ' . $query);
414
+                    if (!isset($this->params[$key])) {
415
+                        $this->outputWriter->write('     <comment>-></comment> '.$query);
416 416
                         $this->connection->executeQuery($query);
417 417
                     } else {
418 418
                         $this->outputWriter->write(sprintf('    <comment>-</comment> %s (with parameters)', $query));
Please login to merge, or discard this patch.