@@ -60,7 +60,7 @@ |
||
| 60 | 60 | * instead of any other one. |
| 61 | 61 | */ |
| 62 | 62 | if ($input->getOption('configuration')) { |
| 63 | - $outputWriter->write("Loading configuration from command option: " . $input->getOption('configuration')); |
|
| 63 | + $outputWriter->write("Loading configuration from command option: ".$input->getOption('configuration')); |
|
| 64 | 64 | |
| 65 | 65 | return $this->loadConfig($input->getOption('configuration'), $outputWriter); |
| 66 | 66 | } |
@@ -75,7 +75,7 @@ |
||
| 75 | 75 | } |
| 76 | 76 | |
| 77 | 77 | //Show normal version number |
| 78 | - return $this->configuration->getDateTime($version) . ' (<comment>' . $version . '</comment>)'; |
|
| 78 | + return $this->configuration->getDateTime($version).' (<comment>'.$version.'</comment>)'; |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | 81 | /** @var Version[] */ |
@@ -38,7 +38,7 @@ |
||
| 38 | 38 | { |
| 39 | 39 | $dir = $this->getRealPath($directory); |
| 40 | 40 | |
| 41 | - $files = glob(rtrim($dir, '/') . '/Version*.php'); |
|
| 41 | + $files = glob(rtrim($dir, '/').'/Version*.php'); |
|
| 42 | 42 | |
| 43 | 43 | return $this->loadMigrations($files, $namespace); |
| 44 | 44 | } |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * <http://www.doctrine-project.org>. |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -declare(strict_types=1); |
|
| 20 | +declare(strict_types = 1); |
|
| 21 | 21 | |
| 22 | 22 | namespace Doctrine\DBAL\Migrations; |
| 23 | 23 | |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | $string = $this->buildMigrationFile($queriesByVersion, $direction); |
| 79 | 79 | |
| 80 | 80 | if ($this->outputWriter) { |
| 81 | - $this->outputWriter->write("\n" . sprintf('Writing migration file to "<info>%s</info>"', $path)); |
|
| 81 | + $this->outputWriter->write("\n".sprintf('Writing migration file to "<info>%s</info>"', $path)); |
|
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | return file_put_contents($path, $string); |
@@ -89,10 +89,10 @@ discard block |
||
| 89 | 89 | $string = sprintf("-- Doctrine Migration File Generated on %s\n", date('Y-m-d H:i:s')); |
| 90 | 90 | |
| 91 | 91 | foreach ($queriesByVersion as $version => $queries) { |
| 92 | - $string .= "\n-- Version " . $version . "\n"; |
|
| 92 | + $string .= "\n-- Version ".$version."\n"; |
|
| 93 | 93 | |
| 94 | 94 | foreach ($queries as $query) { |
| 95 | - $string .= $query . ";\n"; |
|
| 95 | + $string .= $query.";\n"; |
|
| 96 | 96 | } |
| 97 | 97 | |
| 98 | 98 | |
@@ -119,7 +119,7 @@ discard block |
||
| 119 | 119 | |
| 120 | 120 | if (is_dir($path)) { |
| 121 | 121 | $path = realpath($path); |
| 122 | - $path = $path . '/doctrine_migration_' . date('YmdHis') . '.sql'; |
|
| 122 | + $path = $path.'/doctrine_migration_'.date('YmdHis').'.sql'; |
|
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | return $path; |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | * <http://www.doctrine-project.org>. |
| 18 | 18 | */ |
| 19 | 19 | |
| 20 | -declare(strict_types=1); |
|
| 20 | +declare(strict_types = 1); |
|
| 21 | 21 | |
| 22 | 22 | namespace Doctrine\DBAL\Migrations; |
| 23 | 23 | |
@@ -42,6 +42,6 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | private static function isACustomPharBuild($gitversion) |
| 44 | 44 | { |
| 45 | - return $gitversion !== '@' . 'git-version@'; |
|
| 45 | + return $gitversion !== '@'.'git-version@'; |
|
| 46 | 46 | } |
| 47 | 47 | } |
@@ -187,14 +187,14 @@ discard block |
||
| 187 | 187 | if (is_array($sql)) { |
| 188 | 188 | foreach ($sql as $key => $query) { |
| 189 | 189 | $this->sql[] = $query; |
| 190 | - if ( ! empty($params[$key])) { |
|
| 190 | + if (!empty($params[$key])) { |
|
| 191 | 191 | $queryTypes = isset($types[$key]) ? $types[$key] : []; |
| 192 | 192 | $this->addQueryParams($params[$key], $queryTypes); |
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | } else { |
| 196 | 196 | $this->sql[] = $sql; |
| 197 | - if ( ! empty($params)) { |
|
| 197 | + if (!empty($params)) { |
|
| 198 | 198 | $this->addQueryParams($params, $types); |
| 199 | 199 | } |
| 200 | 200 | } |
@@ -223,11 +223,11 @@ discard block |
||
| 223 | 223 | { |
| 224 | 224 | $queries = $this->execute($direction, true); |
| 225 | 225 | |
| 226 | - if ( ! empty($this->params)) { |
|
| 226 | + if (!empty($this->params)) { |
|
| 227 | 227 | throw MigrationException::migrationNotConvertibleToSql($this->class); |
| 228 | 228 | } |
| 229 | 229 | |
| 230 | - $this->outputWriter->write("\n-- Version " . $this->version . "\n"); |
|
| 230 | + $this->outputWriter->write("\n-- Version ".$this->version."\n"); |
|
| 231 | 231 | |
| 232 | 232 | $sqlQueries = [$this->version => $queries]; |
| 233 | 233 | |
@@ -280,12 +280,12 @@ discard block |
||
| 280 | 280 | $this->state = self::STATE_PRE; |
| 281 | 281 | $fromSchema = $this->schemaProvider->createFromSchema(); |
| 282 | 282 | |
| 283 | - $this->migration->{'pre' . ucfirst($direction)}($fromSchema); |
|
| 283 | + $this->migration->{'pre'.ucfirst($direction)}($fromSchema); |
|
| 284 | 284 | |
| 285 | 285 | if ($direction === self::DIRECTION_UP) { |
| 286 | - $this->outputWriter->write("\n" . sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version) . "\n"); |
|
| 286 | + $this->outputWriter->write("\n".sprintf(' <info>++</info> migrating <comment>%s</comment>', $this->version)."\n"); |
|
| 287 | 287 | } else { |
| 288 | - $this->outputWriter->write("\n" . sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version) . "\n"); |
|
| 288 | + $this->outputWriter->write("\n".sprintf(' <info>--</info> reverting <comment>%s</comment>', $this->version)."\n"); |
|
| 289 | 289 | } |
| 290 | 290 | |
| 291 | 291 | $this->state = self::STATE_EXEC; |
@@ -298,9 +298,9 @@ discard block |
||
| 298 | 298 | $this->executeRegisteredSql($dryRun, $timeAllQueries); |
| 299 | 299 | |
| 300 | 300 | $this->state = self::STATE_POST; |
| 301 | - $this->migration->{'post' . ucfirst($direction)}($toSchema); |
|
| 301 | + $this->migration->{'post'.ucfirst($direction)}($toSchema); |
|
| 302 | 302 | |
| 303 | - if ( ! $dryRun) { |
|
| 303 | + if (!$dryRun) { |
|
| 304 | 304 | if ($direction === self::DIRECTION_UP) { |
| 305 | 305 | $this->markMigrated(); |
| 306 | 306 | } else { |
@@ -408,13 +408,13 @@ discard block |
||
| 408 | 408 | |
| 409 | 409 | private function executeRegisteredSql($dryRun = false, $timeAllQueries = false) |
| 410 | 410 | { |
| 411 | - if ( ! $dryRun) { |
|
| 412 | - if ( ! empty($this->sql)) { |
|
| 411 | + if (!$dryRun) { |
|
| 412 | + if (!empty($this->sql)) { |
|
| 413 | 413 | foreach ($this->sql as $key => $query) { |
| 414 | 414 | $queryStart = microtime(true); |
| 415 | 415 | |
| 416 | - if ( ! isset($this->params[$key])) { |
|
| 417 | - $this->outputWriter->write(' <comment>-></comment> ' . $query); |
|
| 416 | + if (!isset($this->params[$key])) { |
|
| 417 | + $this->outputWriter->write(' <comment>-></comment> '.$query); |
|
| 418 | 418 | $this->connection->executeQuery($query); |
| 419 | 419 | } else { |
| 420 | 420 | $this->outputWriter->write(sprintf(' <comment>-</comment> %s (with parameters)', $query)); |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | |
| 38 | 38 | public function __construct($em) |
| 39 | 39 | { |
| 40 | - if ( ! $this->isEntityManager($em)) { |
|
| 40 | + if (!$this->isEntityManager($em)) { |
|
| 41 | 41 | throw new \InvalidArgumentException(sprintf( |
| 42 | 42 | '$em is not a valid Doctrine ORM Entity Manager, got "%s"', |
| 43 | 43 | is_object($em) ? get_class($em) : gettype($em) |