@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | protected function getRealPath($directory) |
35 | 35 | { |
36 | 36 | $dir = realpath($directory); |
37 | - if (false === $dir || ! is_dir($dir)) { |
|
37 | + if (false === $dir || !is_dir($dir)) { |
|
38 | 38 | throw new \InvalidArgumentException(sprintf( |
39 | 39 | 'Cannot load migrations from "%s" because it is not a valid directory', |
40 | 40 | $directory |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $version = (string) substr($className, 7); |
63 | 63 | if ($version === '0') { |
64 | 64 | throw new \InvalidArgumentException(sprintf( |
65 | - 'Cannot load a migrations with the name "%s" because it is a reserved number by doctrine migrations' . PHP_EOL . |
|
65 | + 'Cannot load a migrations with the name "%s" because it is a reserved number by doctrine migrations'.PHP_EOL. |
|
66 | 66 | 'It\'s used to revert all migrations including the first one.', |
67 | 67 | $version |
68 | 68 | )); |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | */ |
81 | 81 | protected function getFileSortCallback() |
82 | 82 | { |
83 | - return function ($a, $b) { |
|
83 | + return function($a, $b) { |
|
84 | 84 | return (basename($a) < basename($b)) ? -1 : 1; |
85 | 85 | }; |
86 | 86 | } |
@@ -43,12 +43,12 @@ |
||
43 | 43 | return null; |
44 | 44 | } |
45 | 45 | |
46 | - if ( ! file_exists($this->filename)) { |
|
46 | + if (!file_exists($this->filename)) { |
|
47 | 47 | return null; |
48 | 48 | } |
49 | 49 | |
50 | 50 | $params = include $this->filename; |
51 | - if ( ! is_array($params)) { |
|
51 | + if (!is_array($params)) { |
|
52 | 52 | throw new \InvalidArgumentException('The connection file has to return an array with database configuration parameters.'); |
53 | 53 | } |
54 | 54 |
@@ -39,7 +39,7 @@ |
||
39 | 39 | libxml_use_internal_errors(true); |
40 | 40 | $xml = new \DOMDocument(); |
41 | 41 | $xml->load($file); |
42 | - if ( ! $xml->schemaValidate(__DIR__ . DIRECTORY_SEPARATOR . "XML" . DIRECTORY_SEPARATOR . "configuration.xsd")) { |
|
42 | + if (!$xml->schemaValidate(__DIR__.DIRECTORY_SEPARATOR."XML".DIRECTORY_SEPARATOR."configuration.xsd")) { |
|
43 | 43 | libxml_clear_errors(); |
44 | 44 | throw MigrationException::configurationNotValid('XML configuration did not pass the validation test.'); |
45 | 45 | } |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function onMigrationsMigrated(MigrationsEventArgs $args) |
35 | 35 | { |
36 | 36 | $conn = $args->getConnection(); |
37 | - if ( ! $args->isDryRun() && ! $conn->isAutoCommit()) { |
|
37 | + if (!$args->isDryRun() && !$conn->isAutoCommit()) { |
|
38 | 38 | $conn->commit(); |
39 | 39 | } |
40 | 40 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | * migrations. |
141 | 141 | */ |
142 | 142 | $migrations = $this->configuration->getMigrations(); |
143 | - if ( ! isset($migrations[$to]) && $to > 0) { |
|
143 | + if (!isset($migrations[$to]) && $to > 0) { |
|
144 | 144 | throw MigrationException::unknownMigrationVersion($to); |
145 | 145 | } |
146 | 146 | |
@@ -155,11 +155,11 @@ discard block |
||
155 | 155 | * means we are already at the destination return an empty array() |
156 | 156 | * to signify that there is nothing left to do. |
157 | 157 | */ |
158 | - if ($from === $to && empty($migrationsToExecute) && ! empty($migrations)) { |
|
158 | + if ($from === $to && empty($migrationsToExecute) && !empty($migrations)) { |
|
159 | 159 | return $this->noMigrations(); |
160 | 160 | } |
161 | 161 | |
162 | - if ( ! $dryRun && false === $this->migrationsCanExecute($confirm)) { |
|
162 | + if (!$dryRun && false === $this->migrationsCanExecute($confirm)) { |
|
163 | 163 | return []; |
164 | 164 | } |
165 | 165 | |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | /** |
171 | 171 | * If there are no migrations to execute throw an exception. |
172 | 172 | */ |
173 | - if (empty($migrationsToExecute) && ! $this->noMigrationException) { |
|
173 | + if (empty($migrationsToExecute) && !$this->noMigrationException) { |
|
174 | 174 | throw MigrationException::noMigrationsToExecute(); |
175 | 175 | } elseif (empty($migrationsToExecute)) { |
176 | 176 | return $this->noMigrations(); |
@@ -34,7 +34,7 @@ |
||
34 | 34 | public function __construct(\Closure $closure = null) |
35 | 35 | { |
36 | 36 | if ($closure === null) { |
37 | - $closure = function ($message) { |
|
37 | + $closure = function($message) { |
|
38 | 38 | }; |
39 | 39 | } |
40 | 40 | $this->closure = $closure; |
@@ -74,7 +74,7 @@ |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | //Show normal version number |
77 | - return $this->configuration->getDateTime($version) . ' (<comment>' . $version . '</comment>)'; |
|
77 | + return $this->configuration->getDateTime($version).' (<comment>'.$version.'</comment>)'; |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | /** |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\DBAL\Migrations; |
6 | 6 |
@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -declare(strict_types=1); |
|
3 | +declare(strict_types = 1); |
|
4 | 4 | |
5 | 5 | namespace Doctrine\DBAL\Migrations; |
6 | 6 |