]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - app/DoctrineMigrations/Version20161024212538.php
Add a real configuration for CS-Fixer
[github/wallabag/wallabag.git] / app / DoctrineMigrations / Version20161024212538.php
index ecb872d1059ec99b0d723e494b40e9c9d3cb2c6a..35853d033f6756efe590ab3a726c80972cd84708 100644 (file)
@@ -8,7 +8,7 @@ use Symfony\Component\DependencyInjection\ContainerAwareInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
- * Added user_id column on oauth2_clients to prevent users to delete API clients from other users
+ * Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
  */
 class Version20161024212538 extends AbstractMigration implements ContainerAwareInterface
 {
@@ -24,11 +24,6 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
         $this->container = $container;
     }
 
-    private function getTable($tableName)
-    {
-        return $this->container->getParameter('database_table_prefix').$tableName;
-    }
-
     /**
      * @param Schema $schema
      */
@@ -60,8 +55,13 @@ class Version20161024212538 extends AbstractMigration implements ContainerAwareI
 
         $clientsTable->dropColumn('user_id', 'integer');
 
-        if ($this->connection->getDatabasePlatform()->getName() != 'sqlite') {
+        if ($this->connection->getDatabasePlatform()->getName() !== 'sqlite') {
             $clientsTable->removeForeignKey($this->constraintName);
         }
     }
+
+    private function getTable($tableName)
+    {
+        return $this->container->getParameter('database_table_prefix') . $tableName;
+    }
 }