@@ -94,7 +94,6 @@ |
||
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | /** |
| 97 | - * @param Migration $migration |
|
| 98 | 97 | */ |
| 99 | 98 | public function addMigration(MigrationDefinition $migrationDefinition) |
| 100 | 99 | { |
@@ -98,7 +98,7 @@ |
||
| 98 | 98 | /** |
| 99 | 99 | * Creates and stores a new migration (leaving it in TODO status) |
| 100 | 100 | * @param MigrationDefinition $migrationDefinition |
| 101 | - * @return mixed |
|
| 101 | + * @return Migration |
|
| 102 | 102 | * @throws \Exception If the migration exists already (we rely on the PK for that) |
| 103 | 103 | */ |
| 104 | 104 | public function addMigration(MigrationDefinition $migrationDefinition) |
@@ -116,7 +116,7 @@ discard block |
||
| 116 | 116 | ); |
| 117 | 117 | try { |
| 118 | 118 | $conn->insert($this->migrationsTableName, $this->migrationToArray($migration)); |
| 119 | - } catch(UniqueConstraintViolationException $e) { |
|
| 119 | + } catch (UniqueConstraintViolationException $e) { |
|
| 120 | 120 | throw new \Exception("Migration '{$migrationDefinition->name}' already exists"); |
| 121 | 121 | } |
| 122 | 122 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | $t->addColumn('execution_error', 'string', array('length' => 4000, 'notnull' => false)); |
| 312 | 312 | $t->setPrimaryKey(array('migration')); |
| 313 | 313 | |
| 314 | - foreach($schema->toSql($dbPlatform) as $sql) { |
|
| 314 | + foreach ($schema->toSql($dbPlatform) as $sql) { |
|
| 315 | 315 | $this->dbHandler->exec($sql); |
| 316 | 316 | } |
| 317 | 317 | } |
@@ -326,7 +326,7 @@ discard block |
||
| 326 | 326 | { |
| 327 | 327 | /** @var \Doctrine\DBAL\Schema\AbstractSchemaManager $sm */ |
| 328 | 328 | $sm = $this->dbHandler->getConnection()->getSchemaManager(); |
| 329 | - foreach($sm->listTables() as $table) { |
|
| 329 | + foreach ($sm->listTables() as $table) { |
|
| 330 | 330 | if ($table->getName() == $tableName) { |
| 331 | 331 | return true; |
| 332 | 332 | } |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | */ |
| 50 | 50 | protected function execute(InputInterface $input, OutputInterface $output) |
| 51 | 51 | { |
| 52 | - if (! $input->getOption('add') && ! $input->getOption('delete')) { |
|
| 52 | + if (!$input->getOption('add') && !$input->getOption('delete')) { |
|
| 53 | 53 | throw new \InvalidArgumentException('You must specify whether you want to --add or --delete the specified migration.'); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | throw new \InvalidArgumentException(sprintf('The path "%s" does not correspond to any migration definition.', $migrationNameOrPath)); |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - foreach($migrationDefinitionCollection as $migrationDefinition) { |
|
| 82 | + foreach ($migrationDefinitionCollection as $migrationDefinition) { |
|
| 83 | 83 | $migrationName = basename($migrationDefinition->path); |
| 84 | 84 | |
| 85 | 85 | $migration = $migrationService->getMigration($migrationNameOrPath); |