Completed
Pull Request — master (#509)
by
unknown
07:10
created
lib/Doctrine/DBAL/Migrations/Configuration/Configuration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
         $this->createMigrationTable();
501 501
 
502 502
         $version = $this->connection->fetchColumn(
503
-            "SELECT " . $this->migrationsColumnName . " FROM " . $this->migrationsTableName . " WHERE " . $this->migrationsColumnName . " = ?",
503
+            "SELECT ".$this->migrationsColumnName." FROM ".$this->migrationsTableName." WHERE ".$this->migrationsColumnName." = ?",
504 504
             [$version->getVersion()]
505 505
         );
506 506
 
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
         $this->connect();
518 518
         $this->createMigrationTable();
519 519
 
520
-        $ret = $this->connection->fetchAll("SELECT " . $this->migrationsColumnName . " FROM " . $this->migrationsTableName);
520
+        $ret = $this->connection->fetchAll("SELECT ".$this->migrationsColumnName." FROM ".$this->migrationsTableName);
521 521
 
522 522
         return array_map('current', $ret);
523 523
     }
@@ -562,7 +562,7 @@  discard block
 block discarded – undo
562 562
             foreach ($this->migrations as $migration) {
563 563
                 $migratedVersions[] = sprintf("'%s'", $migration->getVersion());
564 564
             }
565
-            $where = " WHERE " . $this->migrationsColumnName . " IN (" . implode(', ', $migratedVersions) . ")";
565
+            $where = " WHERE ".$this->migrationsColumnName." IN (".implode(', ', $migratedVersions).")";
566 566
         }
567 567
 
568 568
         $sql = sprintf("SELECT %s FROM %s%s ORDER BY %s DESC",
@@ -612,7 +612,7 @@  discard block
 block discarded – undo
612 612
 
613 613
         $versions = array_map('strval', array_keys($this->migrations));
614 614
         array_unshift($versions, '0');
615
-        $offset = array_search((string)$version, $versions);
615
+        $offset = array_search((string) $version, $versions);
616 616
         if ($offset === false || !isset($versions[$offset + $delta])) {
617 617
             // Unknown version or delta out of bounds.
618 618
             return null;
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
                     }
665 665
 
666 666
                     if ($symbol == "+" || $symbol == "-") {
667
-                        return $this->getRelativeVersion($this->getCurrentVersion(), (int)($symbol.$number));
667
+                        return $this->getRelativeVersion($this->getCurrentVersion(), (int) ($symbol.$number));
668 668
                     }
669 669
                 }
670 670
                 return null;
@@ -681,7 +681,7 @@  discard block
 block discarded – undo
681 681
         $this->connect();
682 682
         $this->createMigrationTable();
683 683
 
684
-        $result = $this->connection->fetchColumn("SELECT COUNT(" . $this->migrationsColumnName . ") FROM " . $this->migrationsTableName);
684
+        $result = $this->connection->fetchColumn("SELECT COUNT(".$this->migrationsColumnName.") FROM ".$this->migrationsTableName);
685 685
 
686 686
         return $result !== false ? $result : 0;
687 687
     }
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
      * @param DateTimeInterface|null $now Defaults to the current time in UTC
827 827
      * @return string The newly generated version
828 828
      */
829
-    public function generateVersionNumber(\DateTimeInterface $now=null)
829
+    public function generateVersionNumber(\DateTimeInterface $now = null)
830 830
     {
831 831
         $now = $now ?: new \DateTime('now', new \DateTimeZone('UTC'));
832 832
 
@@ -899,7 +899,7 @@  discard block
 block discarded – undo
899 899
      */
900 900
     private function ensureMigrationClassExists($class)
901 901
     {
902
-        if ( ! class_exists($class)) {
902
+        if (!class_exists($class)) {
903 903
             throw MigrationException::migrationClassNotFound($class, $this->getMigrationsNamespace());
904 904
         }
905 905
     }
Please login to merge, or discard this patch.