@@ -52,7 +52,7 @@ |
||
52 | 52 | } |
53 | 53 | $executor = $this->executorFactory->createForkedExecutor($dbConnectionSpec, 'NativeClient', false); |
54 | 54 | |
55 | - if (! $executor instanceof ShellExecutor) { |
|
55 | + if (!$executor instanceof ShellExecutor) { |
|
56 | 56 | throw new \Exception("Can not start an interactive shell for databases of type '{$dbConnectionSpec['vendor']}'"); |
57 | 57 | } |
58 | 58 |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | // On Debian, which we use by default, SF has troubles understanding that php was compiled with --enable-sigchild |
71 | 71 | // We thus force it, but give end users an option to disable this |
72 | 72 | // For more details, see comment 12 at https://bugs.launchpad.net/ubuntu/+source/php5/+bug/516061 |
73 | - if (! $input->getOption('dont-force-enabled-sigchild')) { |
|
73 | + if (!$input->getOption('dont-force-enabled-sigchild')) { |
|
74 | 74 | Process::forceSigchildEnabled(true); |
75 | 75 | } |
76 | 76 | |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $sql = null; |
115 | 115 | } else { |
116 | 116 | // this is a coding error, not a sql execution error |
117 | - throw new \Exception("Unsupported action type: " . get_class($sqlAction)); |
|
117 | + throw new \Exception("Unsupported action type: ".get_class($sqlAction)); |
|
118 | 118 | } |
119 | 119 | $filterCallable = $sqlAction->getResultsFilterCallable(); |
120 | 120 | |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | |
130 | 130 | if ($filename === null) { |
131 | 131 | if (!$sqlAction->isSingleStatement()) { |
132 | - $tempSQLFileName = tempnam(sys_get_temp_dir(), 'db3v4l_') . '.sql'; |
|
132 | + $tempSQLFileName = tempnam(sys_get_temp_dir(), 'db3v4l_').'.sql'; |
|
133 | 133 | file_put_contents($tempSQLFileName, $sql); |
134 | 134 | $tempSQLFileNames[] = $tempSQLFileName; |
135 | 135 | |
@@ -142,7 +142,7 @@ discard block |
||
142 | 142 | } |
143 | 143 | |
144 | 144 | if ($this->outputFormat === 'text') { |
145 | - $this->writeln('Command line: ' . $process->getCommandLine(), OutputInterface::VERBOSITY_VERY_VERBOSE); |
|
145 | + $this->writeln('Command line: '.$process->getCommandLine(), OutputInterface::VERBOSITY_VERY_VERBOSE); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | $process->setTimeout($this->processTimeout); |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $succeeded++; |
162 | 162 | } catch (\Throwable $t) { |
163 | 163 | $failed++; |
164 | - $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: " . $t->getMessage() . "</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
164 | + $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: ".$t->getMessage()."</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
165 | 165 | } |
166 | 166 | } |
167 | 167 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | //$result = null; |
184 | 184 | $failed++; |
185 | 185 | $succeeded--; |
186 | - $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: " . $t->getMessage() . "</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
186 | + $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: ".$t->getMessage()."</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
187 | 187 | } |
188 | 188 | } |
189 | 189 | $results[$instanceName] = $output; |
@@ -194,14 +194,14 @@ discard block |
||
194 | 194 | 'exitcode' => $process->getExitCode() |
195 | 195 | ]; |
196 | 196 | $failed++; |
197 | - $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: " . $process->getErrorOutput() . "</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
197 | + $this->writeErrorln("\n<error>$actionName in instance '$instanceName' failed! Reason: ".$process->getErrorOutput()."</error>\n", OutputInterface::VERBOSITY_NORMAL); |
|
198 | 198 | } |
199 | 199 | } |
200 | 200 | } |
201 | 201 | |
202 | 202 | } finally { |
203 | 203 | // make sure that we clean up temp files, as they might contain sensitive data |
204 | - foreach($tempSQLFileNames as $tempSQLFileName) { |
|
204 | + foreach ($tempSQLFileNames as $tempSQLFileName) { |
|
205 | 205 | unlink($tempSQLFileName); |
206 | 206 | } |
207 | 207 | } |
@@ -250,12 +250,12 @@ discard block |
||
250 | 250 | if ($this->outputFile != null) { |
251 | 251 | file_put_contents($this->outputFile, $formattedResults); |
252 | 252 | } else { |
253 | - $this->writeln($formattedResults, OutputInterface::VERBOSITY_QUIET, OutputInterface::OUTPUT_RAW); |
|
253 | + $this->writeln($formattedResults, OutputInterface::VERBOSITY_QUIET, OutputInterface::OUTPUT_RAW); |
|
254 | 254 | } |
255 | 255 | |
256 | 256 | |
257 | 257 | if ($this->outputFormat === 'text' || $this->outputFile != null) { |
258 | - $this->writeln($results['succeeded'] . ' succeeded, ' . $results['failed'] . ' failed'); |
|
258 | + $this->writeln($results['succeeded'].' succeeded, '.$results['failed'].' failed'); |
|
259 | 259 | if ($this->outputFile != null) { |
260 | 260 | $this->writeln("Results saved to file {$this->outputFile}"); |
261 | 261 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $result = $this->listInstances($instanceList); |
38 | 38 | |
39 | 39 | $extraResults = $this->listDatabasesVersion($instanceList)['data']; |
40 | - foreach($result as $instanceName => $instanceDesc) { |
|
40 | + foreach ($result as $instanceName => $instanceDesc) { |
|
41 | 41 | if (isset($extraResults[$instanceName])) { |
42 | 42 | $result[$instanceName]['version'] = $extraResults[$instanceName]; |
43 | 43 | } |
@@ -56,7 +56,7 @@ discard block |
||
56 | 56 | protected function listInstances($instanceList) |
57 | 57 | { |
58 | 58 | $out = []; |
59 | - foreach($instanceList as $instanceName => $connectionSpec) { |
|
59 | + foreach ($instanceList as $instanceName => $connectionSpec) { |
|
60 | 60 | //$connectionSpec = $this->dbConfigurationManager->getInstanceConfiguration($instanceName); |
61 | 61 | $out[$instanceName] = [ |
62 | 62 | 'vendor' => $connectionSpec['vendor'], |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | return $this->executeSqlAction( |
72 | 72 | $instanceList, |
73 | 73 | 'Getting database version information', |
74 | - function ($schemaManager, $instanceName) { |
|
74 | + function($schemaManager, $instanceName) { |
|
75 | 75 | /** @var DatabaseSchemaManager $schemaManager */ |
76 | 76 | return $schemaManager->getRetrieveVersionInfoSqlAction(); |
77 | 77 | } |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | file_put_contents($this->outputFile, $data); |
102 | 102 | $this->writeln("Results saved to file {$this->outputFile}"); |
103 | 103 | } else { |
104 | - $this->writeln($data, OutputInterface::VERBOSITY_QUIET, OutputInterface::OUTPUT_RAW); |
|
104 | + $this->writeln($data, OutputInterface::VERBOSITY_QUIET, OutputInterface::OUTPUT_RAW); |
|
105 | 105 | } |
106 | 106 | |
107 | 107 | } |