@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | /** @var SchemaDiffProviderInterface */ |
| 103 | 103 | private $schemaProvider; |
| 104 | 104 | |
| 105 | - public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider=null) |
|
| 105 | + public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider = null) |
|
| 106 | 106 | { |
| 107 | 107 | $this->configuration = $configuration; |
| 108 | 108 | $this->outputWriter = $configuration->getOutputWriter(); |
@@ -114,7 +114,7 @@ discard block |
||
| 114 | 114 | if ($schemaProvider !== null) { |
| 115 | 115 | $this->schemaProvider = $schemaProvider; |
| 116 | 116 | } |
| 117 | - if($schemaProvider === null) { |
|
| 117 | + if ($schemaProvider === null) { |
|
| 118 | 118 | $schemaProvider = new SchemaDiffProvider($this->connection->getSchemaManager(), |
| 119 | 119 | $this->connection->getDatabasePlatform()); |
| 120 | 120 | $this->schemaProvider = LazySchemaDiffProvider::fromDefaultProxyFacyoryConfiguration($schemaProvider); |
@@ -220,11 +220,11 @@ discard block |
||
| 220 | 220 | { |
| 221 | 221 | $queries = $this->execute($direction, true); |
| 222 | 222 | |
| 223 | - if ( ! empty($this->params)) { |
|
| 223 | + if (!empty($this->params)) { |
|
| 224 | 224 | throw MigrationException::migrationNotConvertibleToSql($this->class); |
| 225 | 225 | } |
| 226 | 226 | |
| 227 | - $this->outputWriter->write("\n-- Version " . $this->version . "\n"); |
|
| 227 | + $this->outputWriter->write("\n-- Version ".$this->version."\n"); |
|
| 228 | 228 | |
| 229 | 229 | $sqlQueries = [$this->version => $queries]; |
| 230 | 230 | $sqlWriter = new SqlFileWriter( |
@@ -276,12 +276,12 @@ discard block |
||
| 276 | 276 | $this->state = self::STATE_PRE; |
| 277 | 277 | $fromSchema = $this->schemaProvider->createFromSchema(); |
| 278 | 278 | |
| 279 | - $this->migration->{'pre' . ucfirst($direction)}($fromSchema); |
|
| 279 | + $this->migration->{'pre'.ucfirst($direction)}($fromSchema); |
|
| 280 | 280 | |
| 281 | 281 | if ($direction === self::DIRECTION_UP) { |
| 282 | - $this->outputWriter->write("\n" . sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version) . "\n"); |
|
| 282 | + $this->outputWriter->write("\n".sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version)."\n"); |
|
| 283 | 283 | } else { |
| 284 | - $this->outputWriter->write("\n" . sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version) . "\n"); |
|
| 284 | + $this->outputWriter->write("\n".sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version)."\n"); |
|
| 285 | 285 | } |
| 286 | 286 | |
| 287 | 287 | $this->state = self::STATE_EXEC; |
@@ -294,9 +294,9 @@ discard block |
||
| 294 | 294 | $this->executeRegisteredSql($dryRun, $timeAllQueries); |
| 295 | 295 | |
| 296 | 296 | $this->state = self::STATE_POST; |
| 297 | - $this->migration->{'post' . ucfirst($direction)}($toSchema); |
|
| 297 | + $this->migration->{'post'.ucfirst($direction)}($toSchema); |
|
| 298 | 298 | |
| 299 | - if (! $dryRun) { |
|
| 299 | + if (!$dryRun) { |
|
| 300 | 300 | if ($direction === self::DIRECTION_UP) { |
| 301 | 301 | $this->markMigrated(); |
| 302 | 302 | } else { |
@@ -335,7 +335,7 @@ discard block |
||
| 335 | 335 | } |
| 336 | 336 | } |
| 337 | 337 | |
| 338 | - $this->outputWriter->write(sprintf("\n <info>SS</info> skipped (Reason: %s)", $e->getMessage())); |
|
| 338 | + $this->outputWriter->write(sprintf("\n <info>SS</info> skipped (Reason: %s)", $e->getMessage())); |
|
| 339 | 339 | |
| 340 | 340 | $this->state = self::STATE_NONE; |
| 341 | 341 | |
@@ -398,13 +398,13 @@ discard block |
||
| 398 | 398 | |
| 399 | 399 | private function executeRegisteredSql($dryRun = false, $timeAllQueries = false) |
| 400 | 400 | { |
| 401 | - if (! $dryRun) { |
|
| 401 | + if (!$dryRun) { |
|
| 402 | 402 | if (!empty($this->sql)) { |
| 403 | 403 | foreach ($this->sql as $key => $query) { |
| 404 | 404 | $queryStart = microtime(true); |
| 405 | 405 | |
| 406 | - if ( ! isset($this->params[$key])) { |
|
| 407 | - $this->outputWriter->write(' <comment>-></comment> ' . $query); |
|
| 406 | + if (!isset($this->params[$key])) { |
|
| 407 | + $this->outputWriter->write(' <comment>-></comment> '.$query); |
|
| 408 | 408 | $this->connection->executeQuery($query); |
| 409 | 409 | } else { |
| 410 | 410 | $this->outputWriter->write(sprintf(' <comment>-</comment> %s (with parameters)', $query)); |