@@ -501,7 +501,7 @@ discard block |
||
501 | 501 | $this->createMigrationTable(); |
502 | 502 | |
503 | 503 | $version = $this->connection->fetchColumn( |
504 | - "SELECT " . $this->migrationsColumnName . " FROM " . $this->migrationsTableName . " WHERE " . $this->migrationsColumnName . " = ?", |
|
504 | + "SELECT ".$this->migrationsColumnName." FROM ".$this->migrationsTableName." WHERE ".$this->migrationsColumnName." = ?", |
|
505 | 505 | [$version->getVersion()] |
506 | 506 | ); |
507 | 507 | |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | $this->connect(); |
519 | 519 | $this->createMigrationTable(); |
520 | 520 | |
521 | - $ret = $this->connection->fetchAll("SELECT " . $this->migrationsColumnName . " FROM " . $this->migrationsTableName); |
|
521 | + $ret = $this->connection->fetchAll("SELECT ".$this->migrationsColumnName." FROM ".$this->migrationsTableName); |
|
522 | 522 | |
523 | 523 | return array_map('current', $ret); |
524 | 524 | } |
@@ -563,7 +563,7 @@ discard block |
||
563 | 563 | foreach ($this->migrations as $migration) { |
564 | 564 | $migratedVersions[] = sprintf("'%s'", $migration->getVersion()); |
565 | 565 | } |
566 | - $where = " WHERE " . $this->migrationsColumnName . " IN (" . implode(', ', $migratedVersions) . ")"; |
|
566 | + $where = " WHERE ".$this->migrationsColumnName." IN (".implode(', ', $migratedVersions).")"; |
|
567 | 567 | } |
568 | 568 | |
569 | 569 | $sql = sprintf("SELECT %s FROM %s%s ORDER BY %s DESC", |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | |
614 | 614 | $versions = array_map('strval', array_keys($this->migrations)); |
615 | 615 | array_unshift($versions, '0'); |
616 | - $offset = array_search((string)$version, $versions); |
|
616 | + $offset = array_search((string) $version, $versions); |
|
617 | 617 | if ($offset === false || !isset($versions[$offset + $delta])) { |
618 | 618 | // Unknown version or delta out of bounds. |
619 | 619 | return null; |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | $this->connect(); |
671 | 671 | $this->createMigrationTable(); |
672 | 672 | |
673 | - $result = $this->connection->fetchColumn("SELECT COUNT(" . $this->migrationsColumnName . ") FROM " . $this->migrationsTableName); |
|
673 | + $result = $this->connection->fetchColumn("SELECT COUNT(".$this->migrationsColumnName.") FROM ".$this->migrationsTableName); |
|
674 | 674 | |
675 | 675 | return $result !== false ? $result : 0; |
676 | 676 | } |
@@ -781,7 +781,7 @@ discard block |
||
781 | 781 | * @param string $eventName The event to emit. |
782 | 782 | * @param $args The event args instance to emit. |
783 | 783 | */ |
784 | - public function dispatchEvent($eventName, EventArgs $args=null) |
|
784 | + public function dispatchEvent($eventName, EventArgs $args = null) |
|
785 | 785 | { |
786 | 786 | $this->connection->getEventManager()->dispatchEvent($eventName, $args); |
787 | 787 | } |
@@ -826,7 +826,7 @@ discard block |
||
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 |
||
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 | } |