@@ -49,7 +49,7 @@ |
||
| 49 | 49 | */ |
| 50 | 50 | protected function createEveApiMessage($messagePrefix, EveApiReadWriteInterface $data) |
| 51 | 51 | { |
| 52 | - $mess = $messagePrefix . ' Eve API %1$s/%2$s'; |
|
| 52 | + $mess = $messagePrefix.' Eve API %1$s/%2$s'; |
|
| 53 | 53 | $subs = [lcfirst($data->getEveApiSectionName()), $data->getEveApiName()]; |
| 54 | 54 | if ($data->hasEveApiArgument('keyID')) { |
| 55 | 55 | $mess .= ' for keyID = %3$s'; |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data)); |
| 182 | 182 | return false; |
| 183 | 183 | } |
| 184 | - if (strtotime($expires[0]['expires'] . '+00:00') < time()) { |
|
| 184 | + if (strtotime($expires[0]['expires'].'+00:00') < time()) { |
|
| 185 | 185 | $mess = 'Expired UtilCachedUntil record found for'; |
| 186 | 186 | $this->getYem() |
| 187 | 187 | ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | if ('' === $currentTime) { |
| 289 | 289 | return $this; |
| 290 | 290 | } |
| 291 | - $dateTime = gmdate('Y-m-d H:i:s', strtotime($currentTime . '+00:00') + $data->getCacheInterval()); |
|
| 291 | + $dateTime = gmdate('Y-m-d H:i:s', strtotime($currentTime.'+00:00') + $data->getCacheInterval()); |
|
| 292 | 292 | $row = [ |
| 293 | 293 | 'accountKey' => $data->hasEveApiArgument('accountKey') ? $data->getEveApiArgument('accountKey') : '0', |
| 294 | 294 | 'apiName' => $data->getEveApiName(), |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | public function wire(ContainerInterface $dic) |
| 51 | 51 | { |
| 52 | 52 | if (empty($dic['Yapeal.Xsl.Transformer'])) { |
| 53 | - $dic['Yapeal.Xsl.Transformer'] = function () use ($dic) { |
|
| 53 | + $dic['Yapeal.Xsl.Transformer'] = function() use ($dic) { |
|
| 54 | 54 | return new $dic['Yapeal.Xsl.transform']($dic['Yapeal.Xsl.dir']); |
| 55 | 55 | }; |
| 56 | 56 | } |
@@ -49,12 +49,12 @@ discard block |
||
| 49 | 49 | public function wire(ContainerInterface $dic) |
| 50 | 50 | { |
| 51 | 51 | if (empty($dic['Yapeal.Log.Strategy'])) { |
| 52 | - $dic['Yapeal.Log.Strategy'] = function () use ($dic) { |
|
| 52 | + $dic['Yapeal.Log.Strategy'] = function() use ($dic) { |
|
| 53 | 53 | return new $dic['Yapeal.Log.Handlers.strategy']((int)$dic['Yapeal.Log.threshold']); |
| 54 | 54 | }; |
| 55 | 55 | } |
| 56 | 56 | if (empty($dic['Yapeal.Log.Logger'])) { |
| 57 | - $dic['Yapeal.Log.Logger'] = function () use ($dic) { |
|
| 57 | + $dic['Yapeal.Log.Logger'] = function() use ($dic) { |
|
| 58 | 58 | $group = []; |
| 59 | 59 | $lineFormatter = new LineFormatter(null, 'Ymd His.u', true, true); |
| 60 | 60 | $lineFormatter->includeStacktraces(); |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | $handler->setFormatter($lineFormatter); |
| 67 | 67 | $group[] = $handler; |
| 68 | 68 | } |
| 69 | - $handler = new $dic['Yapeal.Log.Handlers.stream']($dic['Yapeal.Log.dir'] . $dic['Yapeal.Log.fileName'], |
|
| 69 | + $handler = new $dic['Yapeal.Log.Handlers.stream']($dic['Yapeal.Log.dir'].$dic['Yapeal.Log.fileName'], |
|
| 70 | 70 | 100); |
| 71 | 71 | $group[] = $handler->setFormatter($lineFormatter); |
| 72 | 72 | return new $dic['Yapeal.Log.Handlers.class']($dic['Yapeal.Log.channel'], [ |
@@ -49,13 +49,13 @@ |
||
| 49 | 49 | public function wire(ContainerInterface $dic) |
| 50 | 50 | { |
| 51 | 51 | if (empty($dic['Yapeal.FileSystem.CachePreserver'])) { |
| 52 | - $dic['Yapeal.FileSystem.CachePreserver'] = function () use ($dic) { |
|
| 52 | + $dic['Yapeal.FileSystem.CachePreserver'] = function() use ($dic) { |
|
| 53 | 53 | return new $dic['Yapeal.FileSystem.Handlers.preserve']($dic['Yapeal.FileSystem.Cache.dir'], |
| 54 | 54 | $dic['Yapeal.FileSystem.Cache.preserve']); |
| 55 | 55 | }; |
| 56 | 56 | } |
| 57 | 57 | if (empty($dic['Yapeal.FileSystem.CacheRetriever'])) { |
| 58 | - $dic['Yapeal.FileSystem.CacheRetriever'] = function () use ($dic) { |
|
| 58 | + $dic['Yapeal.FileSystem.CacheRetriever'] = function() use ($dic) { |
|
| 59 | 59 | return new $dic['Yapeal.FileSystem.Handlers.retrieve']($dic['Yapeal.FileSystem.Cache.dir'], |
| 60 | 60 | $dic['Yapeal.FileSystem.Cache.retrieve']); |
| 61 | 61 | }; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | public function wire(ContainerInterface $dic) |
| 50 | 50 | { |
| 51 | 51 | if (empty($dic['Yapeal.Network.Client'])) { |
| 52 | - $dic['Yapeal.Network.Client'] = function ($dic) { |
|
| 52 | + $dic['Yapeal.Network.Client'] = function($dic) { |
|
| 53 | 53 | $appComment = $dic['Yapeal.Network.appComment']; |
| 54 | 54 | $appName = $dic['Yapeal.Network.appName']; |
| 55 | 55 | $appVersion = $dic['Yapeal.Network.appVersion']; |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | ]; |
| 80 | 80 | // Clean up any extra spaces and EOL chars from Yaml. |
| 81 | 81 | array_walk($headers, |
| 82 | - function (&$value) { |
|
| 82 | + function(&$value) { |
|
| 83 | 83 | $value = trim(str_replace(' ', '', (string)$value)); |
| 84 | 84 | }); |
| 85 | 85 | if ('' !== $userAgent) { |
@@ -96,7 +96,7 @@ discard block |
||
| 96 | 96 | }; |
| 97 | 97 | } |
| 98 | 98 | if (empty($dic['Yapeal.Network.Retriever'])) { |
| 99 | - $dic['Yapeal.Network.Retriever'] = function ($dic) { |
|
| 99 | + $dic['Yapeal.Network.Retriever'] = function($dic) { |
|
| 100 | 100 | return new $dic['Yapeal.Network.Handlers.retrieve']($dic['Yapeal.Network.Client'], |
| 101 | 101 | $dic['Yapeal.Network.Cache:retrieve']); |
| 102 | 102 | }; |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | throw new \InvalidArgumentException('Extension service definition is not a Closure or invokable object.'); |
| 88 | 88 | } |
| 89 | 89 | $factory = $this->values[$id]; |
| 90 | - $extended = function ($c) use ($callable, $factory) { |
|
| 90 | + $extended = function($c) use ($callable, $factory) { |
|
| 91 | 91 | return $callable($factory($c), $c); |
| 92 | 92 | }; |
| 93 | 93 | if (isset($this->factories[$factory])) { |
@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess); |
| 170 | 170 | $mess = implode(',', $columns); |
| 171 | 171 | if (512 < strlen($mess)) { |
| 172 | - $mess = substr($mess, 0, 512) . '...'; |
|
| 172 | + $mess = substr($mess, 0, 512).'...'; |
|
| 173 | 173 | } |
| 174 | 174 | $this->getYem() |
| 175 | 175 | ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess); |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | } |
| 227 | 227 | } |
| 228 | 228 | $required = array_reduce($columnDefaults, |
| 229 | - function ($carry, $item) { |
|
| 229 | + function($carry, $item) { |
|
| 230 | 230 | return $carry + (int)(null === $item); |
| 231 | 231 | }, |
| 232 | 232 | 0); |
@@ -234,7 +234,7 @@ discard block |
||
| 234 | 234 | return $this; |
| 235 | 235 | } |
| 236 | 236 | uksort($columnDefaults, |
| 237 | - function ($alpha, $beta) { |
|
| 237 | + function($alpha, $beta) { |
|
| 238 | 238 | $alpha = strtolower($alpha); |
| 239 | 239 | $beta = strtolower($beta); |
| 240 | 240 | if ($alpha < $beta) { |
@@ -52,17 +52,17 @@ discard block |
||
| 52 | 52 | public function wire(ContainerInterface $dic) |
| 53 | 53 | { |
| 54 | 54 | if (empty($dic['Yapeal.Sql.CommonQueries'])) { |
| 55 | - $dic['Yapeal.Sql.CommonQueries'] = function ($dic) { |
|
| 55 | + $dic['Yapeal.Sql.CommonQueries'] = function($dic) { |
|
| 56 | 56 | return new $dic['Yapeal.Sql.Handlers.queries']($dic['Yapeal.Sql.database'], |
| 57 | 57 | $dic['Yapeal.Sql.tablePrefix']); |
| 58 | 58 | }; |
| 59 | 59 | } |
| 60 | 60 | if (empty($dic['Yapeal.Sql.Connection'])) { |
| 61 | 61 | if ('mysql' !== $dic['Yapeal.Sql.platform']) { |
| 62 | - $mess = 'Unknown platform, was given ' . $dic['Yapeal.Sql.platform']; |
|
| 62 | + $mess = 'Unknown platform, was given '.$dic['Yapeal.Sql.platform']; |
|
| 63 | 63 | throw new YapealDatabaseException($mess); |
| 64 | 64 | } |
| 65 | - $dic['Yapeal.Sql.Connection'] = function ($dic) { |
|
| 65 | + $dic['Yapeal.Sql.Connection'] = function($dic) { |
|
| 66 | 66 | $dsn = '%1$s:host=%2$s;charset=utf8mb4'; |
| 67 | 67 | $subs = [$dic['Yapeal.Sql.platform'], $dic['Yapeal.Sql.hostName']]; |
| 68 | 68 | if (!empty($dic['Yapeal.Sql.port'])) { |
@@ -81,20 +81,20 @@ discard block |
||
| 81 | 81 | $database->exec('SET SESSION TIME_ZONE=\'+00:00\''); |
| 82 | 82 | $database->exec('SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci'); |
| 83 | 83 | $database->exec('SET COLLATION_CONNECTION=utf8mb4_unicode_520_ci'); |
| 84 | - $database->exec('SET DEFAULT_STORAGE_ENGINE=' . $dic['Yapeal.Sql.engine']); |
|
| 84 | + $database->exec('SET DEFAULT_STORAGE_ENGINE='.$dic['Yapeal.Sql.engine']); |
|
| 85 | 85 | return $database; |
| 86 | 86 | }; |
| 87 | 87 | } |
| 88 | 88 | if (empty($dic['Yapeal.Sql.Creator'])) { |
| 89 | - $dic['Yapeal.Sql.Creator'] = function () use ($dic) { |
|
| 89 | + $dic['Yapeal.Sql.Creator'] = function() use ($dic) { |
|
| 90 | 90 | $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Sql.dir']); |
| 91 | 91 | $twig = new \Twig_Environment($loader, |
| 92 | 92 | ['debug' => true, 'strict_variables' => true, 'autoescape' => false]); |
| 93 | - $filter = new \Twig_SimpleFilter('ucFirst', function ($value) { |
|
| 93 | + $filter = new \Twig_SimpleFilter('ucFirst', function($value) { |
|
| 94 | 94 | return ucfirst($value); |
| 95 | 95 | }); |
| 96 | 96 | $twig->addFilter($filter); |
| 97 | - $filter = new \Twig_SimpleFilter('lcFirst', function ($value) { |
|
| 97 | + $filter = new \Twig_SimpleFilter('lcFirst', function($value) { |
|
| 98 | 98 | return lcfirst($value); |
| 99 | 99 | }); |
| 100 | 100 | $twig->addFilter($filter); |