]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/DoctrineMigrations/Version20170602075214.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20170602075214.php
index 451d16bae34a615de26eae7223cea49bfb67485b..6b6f003586a2c0231f9c2e99df0f6350875d3dce 100644 (file)
@@ -22,11 +22,6 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
         $this->container = $container;
     }
 
-    private function getTable($tableName)
-    {
-        return $this->container->getParameter('database_table_prefix').$tableName;
-    }
-
     /**
      * @param Schema $schema
      */
@@ -35,11 +30,11 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
         $apiUserRegistration = $this->container
             ->get('doctrine.orm.default_entity_manager')
             ->getConnection()
-            ->fetchArray('SELECT * FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration'");
+            ->fetchArray('SELECT * FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration'");
 
         $this->skipIf(false !== $apiUserRegistration, 'It seems that you already played this migration.');
 
-        $this->addSql('INSERT INTO '.$this->getTable('craue_config_setting')." (name, value, section) VALUES ('api_user_registration', '0', 'api')");
+        $this->addSql('INSERT INTO ' . $this->getTable('craue_config_setting') . " (name, value, section) VALUES ('api_user_registration', '0', 'api')");
     }
 
     /**
@@ -47,6 +42,11 @@ class Version20170602075214 extends AbstractMigration implements ContainerAwareI
      */
     public function down(Schema $schema)
     {
-        $this->addSql('DELETE FROM '.$this->getTable('craue_config_setting')." WHERE name = 'api_user_registration';");
+        $this->addSql('DELETE FROM ' . $this->getTable('craue_config_setting') . " WHERE name = 'api_user_registration';");
+    }
+
+    private function getTable($tableName)
+    {
+        return $this->container->getParameter('database_table_prefix') . $tableName;
     }
 }