@@ -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 |
@@ -100,8 +100,8 @@ discard block |
||
100 | 100 | $replacements = [ |
101 | 101 | $configuration->getMigrationsNamespace(), |
102 | 102 | $version, |
103 | - $up ? " " . implode("\n ", explode("\n", $up)) : null, |
|
104 | - $down ? " " . implode("\n ", explode("\n", $down)) : null, |
|
103 | + $up ? " ".implode("\n ", explode("\n", $up)) : null, |
|
104 | + $down ? " ".implode("\n ", explode("\n", $down)) : null, |
|
105 | 105 | ]; |
106 | 106 | |
107 | 107 | $code = str_replace($placeHolders, $replacements, $this->getTemplate()); |
@@ -109,12 +109,12 @@ discard block |
||
109 | 109 | |
110 | 110 | $directoryHelper = new MigrationDirectoryHelper($configuration); |
111 | 111 | $dir = $directoryHelper->getMigrationDirectory(); |
112 | - $path = $dir . '/Version' . $version . '.php'; |
|
112 | + $path = $dir.'/Version'.$version.'.php'; |
|
113 | 113 | |
114 | 114 | file_put_contents($path, $code); |
115 | 115 | |
116 | 116 | if ($editorCmd = $input->getOption('editor-cmd')) { |
117 | - proc_open($editorCmd . ' ' . escapeshellarg($path), [], $pipes); |
|
117 | + proc_open($editorCmd.' '.escapeshellarg($path), [], $pipes); |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | return $path; |
@@ -128,16 +128,16 @@ discard block |
||
128 | 128 | return; |
129 | 129 | } |
130 | 130 | |
131 | - if ( ! is_file($customTemplate) || ! is_readable($customTemplate)) { |
|
131 | + if (!is_file($customTemplate) || !is_readable($customTemplate)) { |
|
132 | 132 | throw new \InvalidArgumentException( |
133 | - 'The specified template "' . $customTemplate . '" cannot be found or is not readable.' |
|
133 | + 'The specified template "'.$customTemplate.'" cannot be found or is not readable.' |
|
134 | 134 | ); |
135 | 135 | } |
136 | 136 | |
137 | 137 | $content = file_get_contents($customTemplate); |
138 | 138 | |
139 | 139 | if ($content === false) { |
140 | - throw new \InvalidArgumentException('The specified template "' . $customTemplate . '" could not be read.'); |
|
140 | + throw new \InvalidArgumentException('The specified template "'.$customTemplate.'" could not be read.'); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | $output->writeln(sprintf('Using custom migration template "<info>%s</info>"', $customTemplate)); |