@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | public function getEveApiArgument(string $name): string |
| 78 | 78 | { |
| 79 | 79 | if (!array_key_exists($name, $this->eveApiArguments)) { |
| 80 | - $mess = 'Unknown argument ' . $name; |
|
| 80 | + $mess = 'Unknown argument '.$name; |
|
| 81 | 81 | throw new \DomainException($mess); |
| 82 | 82 | } |
| 83 | 83 | return $this->eveApiArguments[$name]; |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | public function getHash(): string |
| 141 | 141 | { |
| 142 | - $hash = $this->getEveApiName() . $this->getEveApiSectionName(); |
|
| 142 | + $hash = $this->getEveApiName().$this->getEveApiSectionName(); |
|
| 143 | 143 | $arguments = $this->getEveApiArguments(); |
| 144 | 144 | if (!in_array($this->getEveApiName(), ['accountBalance', 'walletJournal', 'walletTransactions'], true)) { |
| 145 | 145 | unset($arguments['accountKey']); |
@@ -147,7 +147,7 @@ discard block |
||
| 147 | 147 | unset($arguments['mask'], $arguments['rowCount']); |
| 148 | 148 | ksort($arguments); |
| 149 | 149 | foreach ($arguments as $key => $value) { |
| 150 | - $hash .= $key . $value; |
|
| 150 | + $hash .= $key.$value; |
|
| 151 | 151 | } |
| 152 | 152 | return hash('md5', $hash); |
| 153 | 153 | } |
@@ -217,7 +217,7 @@ discard block |
||
| 217 | 217 | public function setEveApiName(string $value) |
| 218 | 218 | { |
| 219 | 219 | if (!is_string($value)) { |
| 220 | - $mess = 'Name MUST be string but was given ' . gettype($value); |
|
| 220 | + $mess = 'Name MUST be string but was given '.gettype($value); |
|
| 221 | 221 | throw new \InvalidArgumentException($mess); |
| 222 | 222 | } |
| 223 | 223 | $this->eveApiName = $value; |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | public function setEveApiSectionName(string $value) |
| 235 | 235 | { |
| 236 | 236 | if (!is_string($value)) { |
| 237 | - $mess = 'Section name MUST be string but was given ' . gettype($value); |
|
| 237 | + $mess = 'Section name MUST be string but was given '.gettype($value); |
|
| 238 | 238 | throw new \InvalidArgumentException($mess); |
| 239 | 239 | } |
| 240 | 240 | $this->eveApiSectionName = $value; |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $xml = ''; |
| 255 | 255 | } |
| 256 | 256 | if (!is_string($xml)) { |
| 257 | - $mess = 'Xml MUST be string but was given ' . gettype($xml); |
|
| 257 | + $mess = 'Xml MUST be string but was given '.gettype($xml); |
|
| 258 | 258 | throw new \InvalidArgumentException($mess); |
| 259 | 259 | } |
| 260 | 260 | $this->eveApiXml = $xml; |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | public function wire(ContainerInterface $dic) |
| 55 | 55 | { |
| 56 | 56 | if (empty($dic['Yapeal.Sql.CommonQueries'])) { |
| 57 | - $dic['Yapeal.Sql.CommonQueries'] = function ($dic) { |
|
| 57 | + $dic['Yapeal.Sql.CommonQueries'] = function($dic) { |
|
| 58 | 58 | /** |
| 59 | 59 | * @var CommonSqlQueries $csq |
| 60 | 60 | */ |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | { |
| 78 | 78 | if (empty($dic['Yapeal.Sql.Connection'])) { |
| 79 | 79 | $replacements = $this->getSqlSubs($dic); |
| 80 | - $dic['Yapeal.Sql.Connection'] = function () use ($dic, $replacements) { |
|
| 80 | + $dic['Yapeal.Sql.Connection'] = function() use ($dic, $replacements) { |
|
| 81 | 81 | $dsn = $replacements['{dsn}']; |
| 82 | 82 | $dsn = str_replace(array_keys($replacements), array_values($replacements), $dsn); |
| 83 | 83 | /** |
@@ -103,15 +103,15 @@ discard block |
||
| 103 | 103 | private function wireCreator(ContainerInterface $dic) |
| 104 | 104 | { |
| 105 | 105 | if (empty($dic['Yapeal.Sql.Creator'])) { |
| 106 | - $dic['Yapeal.Sql.Creator'] = function () use ($dic) { |
|
| 106 | + $dic['Yapeal.Sql.Creator'] = function() use ($dic) { |
|
| 107 | 107 | $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Sql.dir']); |
| 108 | 108 | $twig = new \Twig_Environment($loader, |
| 109 | 109 | ['debug' => true, 'strict_variables' => true, 'autoescape' => false]); |
| 110 | - $filter = new \Twig_SimpleFilter('ucFirst', function ($value) { |
|
| 110 | + $filter = new \Twig_SimpleFilter('ucFirst', function($value) { |
|
| 111 | 111 | return ucfirst($value); |
| 112 | 112 | }); |
| 113 | 113 | $twig->addFilter($filter); |
| 114 | - $filter = new \Twig_SimpleFilter('lcFirst', function ($value) { |
|
| 114 | + $filter = new \Twig_SimpleFilter('lcFirst', function($value) { |
|
| 115 | 115 | return lcfirst($value); |
| 116 | 116 | }); |
| 117 | 117 | $twig->addFilter($filter); |
@@ -49,17 +49,17 @@ |
||
| 49 | 49 | public function wire(ContainerInterface $dic) |
| 50 | 50 | { |
| 51 | 51 | if (empty($dic['Yapeal.Event.EveApiEvent'])) { |
| 52 | - $dic['Yapeal.Event.EveApi'] = $dic->factory(function ($dic) { |
|
| 52 | + $dic['Yapeal.Event.EveApi'] = $dic->factory(function($dic) { |
|
| 53 | 53 | return new $dic['Yapeal.Event.Factories.eveApi'](); |
| 54 | 54 | }); |
| 55 | 55 | } |
| 56 | 56 | if (empty($dic['Yapeal.Event.LogEvent'])) { |
| 57 | - $dic['Yapeal.Event.LogEvent'] = $dic->factory(function ($dic) { |
|
| 57 | + $dic['Yapeal.Event.LogEvent'] = $dic->factory(function($dic) { |
|
| 58 | 58 | return new $dic['Yapeal.Event.Factories.log']; |
| 59 | 59 | }); |
| 60 | 60 | } |
| 61 | 61 | if (empty($dic['Yapeal.Event.Mediator'])) { |
| 62 | - $dic['Yapeal.Event.Mediator'] = function ($dic) { |
|
| 62 | + $dic['Yapeal.Event.Mediator'] = function($dic) { |
|
| 63 | 63 | return new $dic['Yapeal.Event.Handlers.mediator']($dic); |
| 64 | 64 | }; |
| 65 | 65 | } |
@@ -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) |
@@ -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 | } |
@@ -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); |
@@ -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) |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | if (false === $handle) { |
| 96 | 96 | return false; |
| 97 | 97 | } |
| 98 | - $tmpFile = sprintf('%1$s/%2$s.tmp', $path, hash('sha1', $baseFile . random_bytes(8))); |
|
| 98 | + $tmpFile = sprintf('%1$s/%2$s.tmp', $path, hash('sha1', $baseFile.random_bytes(8))); |
|
| 99 | 99 | if (false === $this->safeDataWrite($tmpFile, $data)) { |
| 100 | 100 | $this->releaseHandle($handle); |
| 101 | 101 | return false; |
@@ -198,7 +198,7 @@ discard block |
||
| 198 | 198 | // First one found wins. |
| 199 | 199 | foreach ([$platformExt, '.sql'] as $ext) { |
| 200 | 200 | foreach ($customFiles as $keyName) { |
| 201 | - $contents = $this->safeFileRead($keyName . $ext); |
|
| 201 | + $contents = $this->safeFileRead($keyName.$ext); |
|
| 202 | 202 | if (false !== $contents) { |
| 203 | 203 | $fileList['Custom'][$keyName] = $contents; |
| 204 | 204 | break 2; |
@@ -249,7 +249,7 @@ discard block |
||
| 249 | 249 | $fpn = $this->getFpn(); |
| 250 | 250 | $sections = ['Schema', 'Util', 'Account', 'Api', 'Char', 'Corp', 'Eve', 'Map', 'Server']; |
| 251 | 251 | foreach ($sections as $section) { |
| 252 | - foreach (new \DirectoryIterator($path . $section . '/') as $fileInfo) { |
|
| 252 | + foreach (new \DirectoryIterator($path.$section.'/') as $fileInfo) { |
|
| 253 | 253 | // Add file path if it's a sql create file for the correct platform. |
| 254 | 254 | if ($fileInfo->isFile() && 0 === strpos($fileInfo->getBasename(), 'Create')) { |
| 255 | 255 | $baseName = $fileInfo->getBasename(); |
@@ -257,14 +257,14 @@ discard block |
||
| 257 | 257 | $isSql = $firstDot === strpos($baseName, '.sql'); |
| 258 | 258 | $isPlatform = $firstDot === strpos($baseName, $platformExt); |
| 259 | 259 | $baseName = substr($baseName, 0, $firstDot); |
| 260 | - $keyName = $fpn->normalizePath($fileInfo->getPath()) . $baseName; |
|
| 260 | + $keyName = $fpn->normalizePath($fileInfo->getPath()).$baseName; |
|
| 261 | 261 | $notSet = !array_key_exists($section, $fileList) |
| 262 | 262 | || !array_key_exists($keyName, $fileList[$section]) |
| 263 | 263 | || false === $fileList[$section][$keyName]; |
| 264 | 264 | if ($isPlatform) { |
| 265 | - $fileList[$section][$keyName] = $this->safeFileRead($keyName . $platformExt); |
|
| 265 | + $fileList[$section][$keyName] = $this->safeFileRead($keyName.$platformExt); |
|
| 266 | 266 | } elseif ($isSql && $notSet) { |
| 267 | - $fileList[$section][$keyName] = $this->safeFileRead($keyName . '.sql'); |
|
| 267 | + $fileList[$section][$keyName] = $this->safeFileRead($keyName.'.sql'); |
|
| 268 | 268 | } |
| 269 | 269 | } |
| 270 | 270 | } |
@@ -287,9 +287,9 @@ discard block |
||
| 287 | 287 | return $fileList; |
| 288 | 288 | } |
| 289 | 289 | // Add drop database file if requested and exists. |
| 290 | - $keyName = $path . 'Schema/DropSchema'; |
|
| 290 | + $keyName = $path.'Schema/DropSchema'; |
|
| 291 | 291 | foreach ([$platformExt, '.sql'] as $ext) { |
| 292 | - $contents = $this->safeFileRead($keyName . $ext); |
|
| 292 | + $contents = $this->safeFileRead($keyName.$ext); |
|
| 293 | 293 | if (false !== $contents) { |
| 294 | 294 | if (array_key_exists('Schema', $fileList)) { |
| 295 | 295 | $schema = array_reverse($fileList['Schema'], true); |