@@ -74,7 +74,7 @@ |
||
74 | 74 | $this->setYem($yem); |
75 | 75 | } |
76 | 76 | $data = $event->getData(); |
77 | - $data->setEveApiName($data->getEveApiName() . 'History'); |
|
77 | + $data->setEveApiName($data->getEveApiName().'History'); |
|
78 | 78 | // Insure history has already been updated first so current data overwrites old data. |
79 | 79 | $this->emitEvents($data, 'start'); |
80 | 80 | return parent::startEveApi($event, $eventName, $yem); |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | */ |
53 | 53 | public function __construct($dir = __DIR__) |
54 | 54 | { |
55 | - $this->setRelativeBaseDir($dir . '/'); |
|
55 | + $this->setRelativeBaseDir($dir.'/'); |
|
56 | 56 | } |
57 | 57 | /** |
58 | 58 | * @param EveApiEventInterface $event |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | $mess = 'Received HTML result from '; |
77 | 77 | $yem->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $this->createEveApiMessage($mess, $data)); |
78 | 78 | $apiName = $data->getEveApiName(); |
79 | - $data->setEveApiName('Invalid_' . $apiName); |
|
79 | + $data->setEveApiName('Invalid_'.$apiName); |
|
80 | 80 | // Cache error html. |
81 | 81 | $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error'); |
82 | 82 | $data->setEveApiName($apiName); |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | libxml_use_internal_errors(false); |
107 | 107 | libxml_clear_errors(); |
108 | 108 | $apiName = $data->getEveApiName(); |
109 | - $data->setEveApiName('Invalid_' . $apiName); |
|
109 | + $data->setEveApiName('Invalid_'.$apiName); |
|
110 | 110 | // Cache error causing XML. |
111 | 111 | $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error'); |
112 | 112 | $data->setEveApiName($apiName); |
@@ -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 | }; |
@@ -74,7 +74,7 @@ |
||
74 | 74 | $this->setYem($yem); |
75 | 75 | } |
76 | 76 | $data = $event->getData(); |
77 | - $data->setEveApiName($data->getEveApiName() . 'History'); |
|
77 | + $data->setEveApiName($data->getEveApiName().'History'); |
|
78 | 78 | // Insure history has already been updated first so current data overwrites old data. |
79 | 79 | $this->emitEvents($data, 'start'); |
80 | 80 | return parent::startEveApi($event, $eventName, $yem); |
@@ -135,12 +135,12 @@ discard block |
||
135 | 135 | $data->setEveApiName($apiName) |
136 | 136 | ->setEveApiSectionName($sectionName) |
137 | 137 | ->setEveApiArguments($posts); |
138 | - $mess = 'Starting ' . $this->getName() . ' of'; |
|
138 | + $mess = 'Starting '.$this->getName().' of'; |
|
139 | 139 | $mess = $this->createEveApiMessage($mess, $data); |
140 | 140 | $this->getYem() |
141 | 141 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess); |
142 | 142 | if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) { |
143 | - $output->writeln('<info>' . $mess . '</info>'); |
|
143 | + $output->writeln('<info>'.$mess.'</info>'); |
|
144 | 144 | } |
145 | 145 | foreach (['retrieve', 'preserve'] as $eventName) { |
146 | 146 | $this->emitEvents($data, $eventName, 'Yapeal.EveApi.Raw'); |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $this->getYem() |
152 | 152 | ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess); |
153 | 153 | if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) { |
154 | - $output->writeln('<error>' . $mess . '</error>'); |
|
154 | + $output->writeln('<error>'.$mess.'</error>'); |
|
155 | 155 | } |
156 | 156 | return 2; |
157 | 157 | } |
@@ -103,10 +103,10 @@ discard block |
||
103 | 103 | public function setCachePath($value = null) |
104 | 104 | { |
105 | 105 | if ($value === null) { |
106 | - $value = dirname(dirname(__DIR__)) . '/cache/'; |
|
106 | + $value = dirname(dirname(__DIR__)).'/cache/'; |
|
107 | 107 | } |
108 | 108 | if (!is_string($value)) { |
109 | - $mess = 'Cache path MUST be string, but was given ' . gettype($value); |
|
109 | + $mess = 'Cache path MUST be string, but was given '.gettype($value); |
|
110 | 110 | throw new \InvalidArgumentException($mess); |
111 | 111 | } |
112 | 112 | $this->cachePath = $this->getFpn() |
@@ -169,8 +169,8 @@ discard block |
||
169 | 169 | return true; |
170 | 170 | } |
171 | 171 | $now = time(); |
172 | - $current = strtotime($current . '+00:00'); |
|
173 | - $until = strtotime($until . '+00:00'); |
|
172 | + $current = strtotime($current.'+00:00'); |
|
173 | + $until = strtotime($until.'+00:00'); |
|
174 | 174 | // At minimum use cached XML for 5 minutes (300 secs). |
175 | 175 | if (($now - $current) <= 300) { |
176 | 176 | return false; |
@@ -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])) { |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | protected function getUpdateFileList(OutputInterface $output) |
152 | 152 | { |
153 | 153 | $fileNames = []; |
154 | - $path = $this->getDic()['Yapeal.Sql.dir'] . 'updates/'; |
|
154 | + $path = $this->getDic()['Yapeal.Sql.dir'].'updates/'; |
|
155 | 155 | if (!is_readable($path) || !is_dir($path)) { |
156 | 156 | $mess = sprintf('<info>Could NOT access update directory %1$s</info>', |
157 | 157 | $path); |
@@ -234,8 +234,8 @@ discard block |
||
234 | 234 | ->execute([$updateVersion]); |
235 | 235 | $pdo->commit(); |
236 | 236 | } catch (\PDOException $exc) { |
237 | - $mess = $sql . PHP_EOL; |
|
238 | - $mess .= sprintf('Database error message was %s', $exc->getMessage()) . PHP_EOL; |
|
237 | + $mess = $sql.PHP_EOL; |
|
238 | + $mess .= sprintf('Database error message was %s', $exc->getMessage()).PHP_EOL; |
|
239 | 239 | $mess .= sprintf('Database "version" update failed for %1$s', |
240 | 240 | $updateVersion); |
241 | 241 | if ($this->getPdo() |