From f808b01692a835673f328d7221ba8c212caa9b61 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sat, 1 Jul 2017 09:52:38 +0200 Subject: Add a real configuration for CS-Fixer --- app/DoctrineMigrations/Version20170510082609.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'app/DoctrineMigrations/Version20170510082609.php') diff --git a/app/DoctrineMigrations/Version20170510082609.php b/app/DoctrineMigrations/Version20170510082609.php index a99af2d2..329613b1 100644 --- a/app/DoctrineMigrations/Version20170510082609.php +++ b/app/DoctrineMigrations/Version20170510082609.php @@ -29,11 +29,6 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->container = $container; } - private function getTable($tableName) - { - return $this->container->getParameter('database_table_prefix').$tableName; - } - /** * @param Schema $schema */ @@ -42,7 +37,7 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); foreach ($this->fields as $field) { - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(180) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); } } @@ -54,7 +49,12 @@ class Version20170510082609 extends AbstractMigration implements ContainerAwareI $this->skipIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'This migration only apply to MySQL'); foreach ($this->fields as $field) { - $this->addSql('ALTER TABLE '.$this->getTable('user').' CHANGE '.$field.' '.$field.' VARCHAR(255) NOT NULL;'); + $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); } } + + private function getTable($tableName) + { + return $this->container->getParameter('database_table_prefix') . $tableName; + } } -- cgit v1.2.3