@@ -39,7 +39,7 @@ |
||
39 | 39 | } |
40 | 40 | |
41 | 41 | /** |
42 | - * @return Schema |
|
42 | + * @return \ProxyManager\Proxy\VirtualProxyInterface |
|
43 | 43 | */ |
44 | 44 | public function createFromSchema() |
45 | 45 | { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | |
71 | 71 | return $this->proxyFactory->createProxy( |
72 | 72 | Schema::class, |
73 | - function (& $wrappedObject, $proxy, $method, array $parameters, & $initializer) use ($originalSchemaManipulator) { |
|
73 | + function(& $wrappedObject, $proxy, $method, array $parameters, & $initializer) use ($originalSchemaManipulator) { |
|
74 | 74 | $initializer = null; |
75 | 75 | $wrappedObject = $originalSchemaManipulator->createFromSchema(); |
76 | 76 | |
@@ -87,10 +87,10 @@ discard block |
||
87 | 87 | { |
88 | 88 | $originalSchemaManipulator = $this->originalSchemaManipulator; |
89 | 89 | |
90 | - if ($fromSchema instanceof LazyLoadingInterface && ! $fromSchema->isProxyInitialized()) { |
|
90 | + if ($fromSchema instanceof LazyLoadingInterface && !$fromSchema->isProxyInitialized()) { |
|
91 | 91 | return $this->proxyFactory->createProxy( |
92 | 92 | Schema::class, |
93 | - function (& $wrappedObject, $proxy, $method, array $parameters, & $initializer) use ($originalSchemaManipulator, $fromSchema) { |
|
93 | + function(& $wrappedObject, $proxy, $method, array $parameters, & $initializer) use ($originalSchemaManipulator, $fromSchema) { |
|
94 | 94 | $initializer = null; |
95 | 95 | $wrappedObject = $originalSchemaManipulator->createToSchema($fromSchema); |
96 | 96 | |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | public function getSqlDiffToMigrate(Schema $fromSchema, Schema $toSchema) |
112 | 112 | { |
113 | 113 | if ($toSchema instanceof LazyLoadingInterface |
114 | - && ! $toSchema->isProxyInitialized()) { |
|
114 | + && !$toSchema->isProxyInitialized()) { |
|
115 | 115 | return []; |
116 | 116 | } |
117 | 117 |
@@ -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 | } |
@@ -42,6 +42,9 @@ |
||
42 | 42 | */ |
43 | 43 | private $outputWriter; |
44 | 44 | |
45 | + /** |
|
46 | + * @param OutputWriter $outputWriter |
|
47 | + */ |
|
45 | 48 | public function __construct(string $columnName, string $tableName, ?OutputWriter $outputWriter) |
46 | 49 | { |
47 | 50 | $this->columnName = $columnName; |
@@ -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 |
@@ -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 | } |
@@ -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 |
@@ -42,7 +42,7 @@ |
||
42 | 42 | |
43 | 43 | /** |
44 | 44 | * Transform the recursiveIterator result array of array into the expected array of migration file |
45 | - * @param iterable|string[][] $iteratorFilesMatch |
|
45 | + * @param \RegexIterator $iteratorFilesMatch |
|
46 | 46 | * @return string[] |
47 | 47 | */ |
48 | 48 | private function getMatches($iteratorFilesMatch) |
@@ -12,6 +12,9 @@ |
||
12 | 12 | /** @var \Closure|null */ |
13 | 13 | private $closure; |
14 | 14 | |
15 | + /** |
|
16 | + * @param \Closure $closure |
|
17 | + */ |
|
15 | 18 | public function __construct(?\Closure $closure = null) |
16 | 19 | { |
17 | 20 | if ($closure === null) { |
@@ -15,7 +15,7 @@ |
||
15 | 15 | public function __construct(?\Closure $closure = null) |
16 | 16 | { |
17 | 17 | if ($closure === null) { |
18 | - $closure = function ($message) { |
|
18 | + $closure = function($message) { |
|
19 | 19 | }; |
20 | 20 | } |
21 | 21 | $this->closure = $closure; |
@@ -160,7 +160,7 @@ |
||
160 | 160 | |
161 | 161 | /** |
162 | 162 | * @param string $versionAlias |
163 | - * @return bool|string |
|
163 | + * @return false|string |
|
164 | 164 | */ |
165 | 165 | private function getVersionNameFromAlias($versionAlias, OutputInterface $output, Configuration $configuration) |
166 | 166 | { |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | } |
86 | 86 | |
87 | 87 | $executedUnavailableMigrations = array_diff($executedMigrations, $availableMigrations); |
88 | - if (! empty($executedUnavailableMigrations)) { |
|
88 | + if (!empty($executedUnavailableMigrations)) { |
|
89 | 89 | $output->writeln(sprintf( |
90 | 90 | '<error>WARNING! You have %s previously executed migrations' |
91 | 91 | . ' in the database that are not registered migrations.</error>', |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | } |
102 | 102 | |
103 | 103 | $question = 'Are you sure you wish to continue? (y/n)'; |
104 | - if (! $this->canExecute($question, $input, $output)) { |
|
104 | + if (!$this->canExecute($question, $input, $output)) { |
|
105 | 105 | $output->writeln('<error>Migration cancelled!</error>'); |
106 | 106 | |
107 | 107 | return 1; |
@@ -118,12 +118,12 @@ discard block |
||
118 | 118 | |
119 | 119 | $cancelled = false; |
120 | 120 | $migration->setNoMigrationException($input->getOption('allow-no-migration')); |
121 | - $result = $migration->migrate($version, $dryRun, $timeAllqueries, function () use ($input, $output, &$cancelled) { |
|
121 | + $result = $migration->migrate($version, $dryRun, $timeAllqueries, function() use ($input, $output, &$cancelled) { |
|
122 | 122 | $question = 'WARNING! You are about to execute a database migration' |
123 | 123 | . ' that could result in schema changes and data lost.' |
124 | 124 | . ' Are you sure you wish to continue? (y/n)'; |
125 | 125 | $canContinue = $this->canExecute($question, $input, $output); |
126 | - $cancelled = ! $canContinue; |
|
126 | + $cancelled = !$canContinue; |
|
127 | 127 | |
128 | 128 | return $canContinue; |
129 | 129 | }); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | */ |
152 | 152 | private function canExecute($question, InputInterface $input, OutputInterface $output) |
153 | 153 | { |
154 | - if ($input->isInteractive() && ! $this->askConfirmation($question, $input, $output)) { |
|
154 | + if ($input->isInteractive() && !$this->askConfirmation($question, $input, $output)) { |
|
155 | 155 | return false; |
156 | 156 | } |
157 | 157 |