@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | $yem = $this->getYem(); |
124 | 124 | $statements = explode(';', $this->getCleanedUpSql($sqlStatements, $this->getReplacements())); |
125 | 125 | $statements = array_filter($statements, |
126 | - function ($statement) { |
|
126 | + function($statement) { |
|
127 | 127 | return '' !== trim($statement); |
128 | 128 | }); |
129 | 129 | $progress = null; |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | $progress->finish(); |
153 | 153 | $output->writeln(''); |
154 | 154 | } |
155 | - $mess = $sql . PHP_EOL; |
|
155 | + $mess = $sql.PHP_EOL; |
|
156 | 156 | $mess .= sprintf('Sql failed in %1$s on statement %2$s with (%3$s) %4$s', |
157 | 157 | $fileName, |
158 | 158 | $statement, |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | $base = 'Yapeal.Sql.'; |
197 | 197 | foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) { |
198 | 198 | if (array_key_exists($option, $options) && null !== $options[$option]) { |
199 | - $dic[$base . $option] = $options[$option]; |
|
199 | + $dic[$base.$option] = $options[$option]; |
|
200 | 200 | } |
201 | 201 | } |
202 | 202 | return $this; |
@@ -73,7 +73,7 @@ |
||
73 | 73 | public function execute(InputInterface $input, OutputInterface $output): int |
74 | 74 | { |
75 | 75 | list($mSec, $sec) = explode(' ', microtime()); |
76 | - $output->writeln(gmdate('YmdHis', (int)$sec) . substr($mSec, 1, 4)); |
|
76 | + $output->writeln(gmdate('YmdHis', (int)$sec).substr($mSec, 1, 4)); |
|
77 | 77 | return 0; |
78 | 78 | } |
79 | 79 | } |
@@ -189,8 +189,8 @@ discard block |
||
189 | 189 | // First one found wins. |
190 | 190 | foreach ([$platformExt, '.sql'] as $ext) { |
191 | 191 | foreach ($customFiles as $keyName) { |
192 | - if (is_readable($keyName . $ext) && is_file($keyName . $ext)) { |
|
193 | - $contents = $this->safeFileRead($keyName . $ext); |
|
192 | + if (is_readable($keyName.$ext) && is_file($keyName.$ext)) { |
|
193 | + $contents = $this->safeFileRead($keyName.$ext); |
|
194 | 194 | if (false === $contents) { |
195 | 195 | continue; |
196 | 196 | } |
@@ -244,7 +244,7 @@ discard block |
||
244 | 244 | $fpn = $this->getFpn(); |
245 | 245 | $sections = ['Schema', 'Util', 'Account', 'Api', 'Char', 'Corp', 'Eve', 'Map', 'Server']; |
246 | 246 | foreach ($sections as $section) { |
247 | - foreach (new \DirectoryIterator($path . $section . '/') as $fileInfo) { |
|
247 | + foreach (new \DirectoryIterator($path.$section.'/') as $fileInfo) { |
|
248 | 248 | // Add file path if it's a sql create file for the correct platform. |
249 | 249 | if ($fileInfo->isFile() && 0 === strpos($fileInfo->getBasename(), 'Create')) { |
250 | 250 | $baseName = $fileInfo->getBasename(); |
@@ -252,14 +252,14 @@ discard block |
||
252 | 252 | $isSql = $firstDot === strpos($baseName, '.sql'); |
253 | 253 | $isPlatform = $firstDot === strpos($baseName, $ext); |
254 | 254 | $baseName = substr($baseName, 0, $firstDot); |
255 | - $keyName = $fpn->normalizePath($fileInfo->getPath()) . $baseName; |
|
255 | + $keyName = $fpn->normalizePath($fileInfo->getPath()).$baseName; |
|
256 | 256 | $notSet = !array_key_exists($section, $fileList) |
257 | 257 | || !array_key_exists($keyName, $fileList[$section]) |
258 | 258 | || false === $fileList[$section][$keyName]; |
259 | 259 | if ($isPlatform) { |
260 | - $fileList[$section][$keyName] = $this->safeFileRead($keyName . $ext); |
|
260 | + $fileList[$section][$keyName] = $this->safeFileRead($keyName.$ext); |
|
261 | 261 | } elseif ($isSql && $notSet) { |
262 | - $fileList[$section][$keyName] = $this->safeFileRead($keyName . '.sql'); |
|
262 | + $fileList[$section][$keyName] = $this->safeFileRead($keyName.'.sql'); |
|
263 | 263 | } |
264 | 264 | } |
265 | 265 | } |
@@ -282,10 +282,10 @@ discard block |
||
282 | 282 | return $fileList; |
283 | 283 | } |
284 | 284 | // Add drop database file if requested and exists. |
285 | - $keyName = $path . 'Schema/DropSchema'; |
|
285 | + $keyName = $path.'Schema/DropSchema'; |
|
286 | 286 | foreach ([$platformExt, '.sql'] as $ext) { |
287 | - if (is_readable($keyName . $ext) && is_file($keyName . $ext)) { |
|
288 | - $contents = $this->safeFileRead($keyName . $ext); |
|
287 | + if (is_readable($keyName.$ext) && is_file($keyName.$ext)) { |
|
288 | + $contents = $this->safeFileRead($keyName.$ext); |
|
289 | 289 | if (false === $contents) { |
290 | 290 | continue; |
291 | 291 | } |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | ->setEveApiArguments($posts); |
137 | 137 | if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) { |
138 | 138 | $mess = sprintf('<info>Starting %1$s of', $this->getName()); |
139 | - $mess = $this->createEveApiMessage($mess, $data) . '</info>'; |
|
139 | + $mess = $this->createEveApiMessage($mess, $data).'</info>'; |
|
140 | 140 | $this->getYem() |
141 | 141 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, strip_tags($mess)); |
142 | 142 | $output->writeln($mess); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | if (false === $data->getEveApiXml()) { |
148 | 148 | if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) { |
149 | 149 | $mess = '<error>Could NOT retrieve Eve Api data of'; |
150 | - $mess = $this->createEveApiMessage($mess, $data) . '</error>'; |
|
150 | + $mess = $this->createEveApiMessage($mess, $data).'</error>'; |
|
151 | 151 | $this->getYem() |
152 | 152 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, strip_tags($mess)); |
153 | 153 | $output->writeln($mess); |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | { |
76 | 76 | $this->setDic($dic); |
77 | 77 | $this->platform = $dic['Yapeal.Sql.platform']; |
78 | - $this->queriesDir = $dic['Yapeal.Sql.dir'] . 'queries/'; |
|
78 | + $this->queriesDir = $dic['Yapeal.Sql.dir'].'queries/'; |
|
79 | 79 | } |
80 | 80 | /** |
81 | 81 | * @param string $name |
@@ -104,7 +104,7 @@ discard block |
||
104 | 104 | } |
105 | 105 | return $this->processSql($fileName, $sql, $arguments); |
106 | 106 | } |
107 | - $mess = 'Unknown method ' . $name; |
|
107 | + $mess = 'Unknown method '.$name; |
|
108 | 108 | throw new \BadMethodCallException($mess); |
109 | 109 | } |
110 | 110 | /** |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $replacements = $this->getReplacements(); |
121 | 121 | $replacements['{tableName}'] = $tableName; |
122 | 122 | $replacements['{columnNames}'] = implode('","', $columnNameList); |
123 | - $rowPrototype = '(' . implode(',', array_fill(0, count($columnNameList), '?')) . ')'; |
|
123 | + $rowPrototype = '('.implode(',', array_fill(0, count($columnNameList), '?')).')'; |
|
124 | 124 | $replacements['{rowset}'] = implode(',', array_fill(0, $rowCount, $rowPrototype)); |
125 | 125 | $updates = []; |
126 | 126 | foreach ($columnNameList as $column) { |
@@ -76,7 +76,7 @@ |
||
76 | 76 | } |
77 | 77 | $data = $event->getData(); |
78 | 78 | $apiName = $data->getEveApiName(); |
79 | - $data->setEveApiName($apiName . 'History'); |
|
79 | + $data->setEveApiName($apiName.'History'); |
|
80 | 80 | // Insure history has already been updated first so current data overwrites old data. |
81 | 81 | $this->emitEvents($data, 'start'); |
82 | 82 | $data->setEveApiName($apiName) |