@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | /** @var SchemaDiffProviderInterface */ |
104 | 104 | private $schemaProvider; |
105 | 105 | |
106 | - public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider=null) |
|
106 | + public function __construct(Configuration $configuration, $version, $class, SchemaDiffProviderInterface $schemaProvider = null) |
|
107 | 107 | { |
108 | 108 | $this->configuration = $configuration; |
109 | 109 | $this->outputWriter = $configuration->getOutputWriter(); |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | if ($schemaProvider !== null) { |
116 | 116 | $this->schemaProvider = $schemaProvider; |
117 | 117 | } |
118 | - if($schemaProvider === null) { |
|
118 | + if ($schemaProvider === null) { |
|
119 | 119 | $schemaProvider = new SchemaDiffProvider($this->connection->getSchemaManager(), |
120 | 120 | $this->connection->getDatabasePlatform()); |
121 | 121 | $this->schemaProvider = LazySchemaDiffProvider::fromDefaultProxyFactoryConfiguration($schemaProvider); |
@@ -221,11 +221,11 @@ discard block |
||
221 | 221 | { |
222 | 222 | $queries = $this->execute($direction, true); |
223 | 223 | |
224 | - if ( ! empty($this->params)) { |
|
224 | + if (!empty($this->params)) { |
|
225 | 225 | throw MigrationException::migrationNotConvertibleToSql($this->class); |
226 | 226 | } |
227 | 227 | |
228 | - $this->outputWriter->write("\n-- Version " . $this->version . "\n"); |
|
228 | + $this->outputWriter->write("\n-- Version ".$this->version."\n"); |
|
229 | 229 | |
230 | 230 | $sqlQueries = [$this->version => $queries]; |
231 | 231 | |
@@ -284,12 +284,12 @@ discard block |
||
284 | 284 | $this->state = self::STATE_PRE; |
285 | 285 | $fromSchema = $this->schemaProvider->createFromSchema(); |
286 | 286 | |
287 | - $this->migration->{'pre' . ucfirst($direction)}($fromSchema); |
|
287 | + $this->migration->{'pre'.ucfirst($direction)}($fromSchema); |
|
288 | 288 | |
289 | 289 | if ($direction === self::DIRECTION_UP) { |
290 | - $this->outputWriter->write("\n" . sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version) . "\n"); |
|
290 | + $this->outputWriter->write("\n".sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version)."\n"); |
|
291 | 291 | } else { |
292 | - $this->outputWriter->write("\n" . sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version) . "\n"); |
|
292 | + $this->outputWriter->write("\n".sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version)."\n"); |
|
293 | 293 | } |
294 | 294 | |
295 | 295 | $this->state = self::STATE_EXEC; |
@@ -302,9 +302,9 @@ discard block |
||
302 | 302 | $this->executeRegisteredSql($dryRun, $timeAllQueries); |
303 | 303 | |
304 | 304 | $this->state = self::STATE_POST; |
305 | - $this->migration->{'post' . ucfirst($direction)}($toSchema); |
|
305 | + $this->migration->{'post'.ucfirst($direction)}($toSchema); |
|
306 | 306 | |
307 | - if (! $dryRun) { |
|
307 | + if (!$dryRun) { |
|
308 | 308 | if ($direction === self::DIRECTION_UP) { |
309 | 309 | $this->markMigrated(); |
310 | 310 | } else { |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | } |
346 | 346 | } |
347 | 347 | |
348 | - $this->outputWriter->write(sprintf("\n <info>SS</info> skipped (Reason: %s)", $e->getMessage())); |
|
348 | + $this->outputWriter->write(sprintf("\n <info>SS</info> skipped (Reason: %s)", $e->getMessage())); |
|
349 | 349 | |
350 | 350 | $this->state = self::STATE_NONE; |
351 | 351 | |
@@ -411,13 +411,13 @@ discard block |
||
411 | 411 | |
412 | 412 | private function executeRegisteredSql($dryRun = false, $timeAllQueries = false) |
413 | 413 | { |
414 | - if (! $dryRun) { |
|
414 | + if (!$dryRun) { |
|
415 | 415 | if (!empty($this->sql)) { |
416 | 416 | foreach ($this->sql as $key => $query) { |
417 | 417 | $queryStart = microtime(true); |
418 | 418 | |
419 | - if ( ! isset($this->params[$key])) { |
|
420 | - $this->outputWriter->write(' <comment>-></comment> ' . $query); |
|
419 | + if (!isset($this->params[$key])) { |
|
420 | + $this->outputWriter->write(' <comment>-></comment> '.$query); |
|
421 | 421 | $this->connection->executeQuery($query); |
422 | 422 | } else { |
423 | 423 | $this->outputWriter->write(sprintf(' <comment>-</comment> %s (with parameters)', $query)); |