@@ -53,7 +53,7 @@ discard block |
||
53 | 53 | if (!empty($dic['Yapeal.Error.Logger'])) { |
54 | 54 | return $this; |
55 | 55 | } |
56 | - $dic['Yapeal.Error.Logger'] = function ($dic) { |
|
56 | + $dic['Yapeal.Error.Logger'] = function($dic) { |
|
57 | 57 | /** |
58 | 58 | * @var Logger $logger |
59 | 59 | */ |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $handler = new $dic['Yapeal.Error.Handlers.stream']('php://stderr', 100); |
70 | 70 | $group[] = $handler->setFormatter($lineFormatter); |
71 | 71 | } |
72 | - $handler = new $dic['Yapeal.Error.Handlers.stream']($dic['Yapeal.Error.dir'] . $dic['Yapeal.Error.fileName'], |
|
72 | + $handler = new $dic['Yapeal.Error.Handlers.stream']($dic['Yapeal.Error.dir'].$dic['Yapeal.Error.fileName'], |
|
73 | 73 | 100); |
74 | 74 | $group[] = $handler->setFormatter($lineFormatter); |
75 | 75 | $logger->pushHandler( |
@@ -56,16 +56,16 @@ |
||
56 | 56 | protected function addOptions($help) |
57 | 57 | { |
58 | 58 | $this->addOption('configFile', 'c', InputOption::VALUE_REQUIRED, 'Configuration file to get settings from.') |
59 | - ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.') |
|
60 | - ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.') |
|
61 | - ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.') |
|
62 | - ->addOption('platform', null, InputOption::VALUE_REQUIRED, |
|
63 | - 'Platform of database driver. Currently only "mysql" can be used.') |
|
64 | - ->addOption('port', null, InputOption::VALUE_REQUIRED, |
|
65 | - 'Port number for remote server. Only needed if using http connection.') |
|
66 | - ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.') |
|
67 | - ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.') |
|
68 | - ->setHelp($help); |
|
59 | + ->addOption('database', 'd', InputOption::VALUE_REQUIRED, 'Name of the database.') |
|
60 | + ->addOption('hostName', 'o', InputOption::VALUE_REQUIRED, 'Host name for database server.') |
|
61 | + ->addOption('password', 'p', InputOption::VALUE_REQUIRED, 'Password used to access database.') |
|
62 | + ->addOption('platform', null, InputOption::VALUE_REQUIRED, |
|
63 | + 'Platform of database driver. Currently only "mysql" can be used.') |
|
64 | + ->addOption('port', null, InputOption::VALUE_REQUIRED, |
|
65 | + 'Port number for remote server. Only needed if using http connection.') |
|
66 | + ->addOption('tablePrefix', 't', InputOption::VALUE_REQUIRED, 'Prefix for database table names.') |
|
67 | + ->addOption('userName', 'u', InputOption::VALUE_REQUIRED, 'User name used to access database.') |
|
68 | + ->setHelp($help); |
|
69 | 69 | } |
70 | 70 | /** @noinspection PhpMissingParentCallCommonInspection */ |
71 | 71 | /** |
@@ -123,7 +123,7 @@ discard block |
||
123 | 123 | */ |
124 | 124 | $statements = str_replace(array_keys($replacements), array_values($replacements), explode(';', $sqlStatements)); |
125 | 125 | // 5 is a 'magic' number that I think is shorter than any legal SQL statement. |
126 | - $statements = array_filter($statements, function ($value) { |
|
126 | + $statements = array_filter($statements, function($value) { |
|
127 | 127 | return 5 <= strlen(trim($value)); |
128 | 128 | }); |
129 | 129 | $progress = null; |
@@ -151,7 +151,7 @@ discard block |
||
151 | 151 | $progress->finish(); |
152 | 152 | $output->writeln(''); |
153 | 153 | } |
154 | - $mess = $sql . PHP_EOL; |
|
154 | + $mess = $sql.PHP_EOL; |
|
155 | 155 | $mess .= sprintf( |
156 | 156 | 'Sql failed in %1$s on statement %2$s with (%3$s) %4$s', |
157 | 157 | $fileName, |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $dic = $this->getDic(); |
183 | 183 | foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) { |
184 | 184 | if (!empty($options[$option])) { |
185 | - $dic[$base . $option] = $options[$option]; |
|
185 | + $dic[$base.$option] = $options[$option]; |
|
186 | 186 | } |
187 | 187 | } |
188 | 188 | if (!empty($options['configFile'])) { |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | if ('Database' === $dir && $this->dropDatabase) { |
107 | 107 | // Add drop database file if requested. |
108 | 108 | $fileList[] = $this->getFpn() |
109 | - ->normalizeFile($path . $dir . '/DropDatabase.sql'); |
|
109 | + ->normalizeFile($path . $dir . '/DropDatabase.sql'); |
|
110 | 110 | } |
111 | 111 | foreach (new \DirectoryIterator($path . $dir . '/') as $fileInfo) { |
112 | 112 | // Add file path if it's a sql create file. |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | && 0 === strpos($fileInfo->getBasename(), 'Create') |
116 | 116 | ) { |
117 | 117 | $fileList[] = $this->getFpn() |
118 | - ->normalizeFile($fileInfo->getPathname()); |
|
118 | + ->normalizeFile($fileInfo->getPathname()); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | } |
@@ -106,9 +106,9 @@ |
||
106 | 106 | if ('Database' === $dir && $this->dropDatabase) { |
107 | 107 | // Add drop database file if requested. |
108 | 108 | $fileList[] = $this->getFpn() |
109 | - ->normalizeFile($path . $dir . '/DropDatabase.sql'); |
|
109 | + ->normalizeFile($path.$dir.'/DropDatabase.sql'); |
|
110 | 110 | } |
111 | - foreach (new \DirectoryIterator($path . $dir . '/') as $fileInfo) { |
|
111 | + foreach (new \DirectoryIterator($path.$dir.'/') as $fileInfo) { |
|
112 | 112 | // Add file path if it's a sql create file. |
113 | 113 | if ($fileInfo->isFile() |
114 | 114 | && 'sql' === $fileInfo->getExtension() |
@@ -67,9 +67,9 @@ |
||
67 | 67 | $sql = $this->getCsq() |
68 | 68 | ->getDeleteFromTable($tableName); |
69 | 69 | $this->getYem() |
70 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
70 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
71 | 71 | $this->getPdo() |
72 | - ->exec($sql); |
|
72 | + ->exec($sql); |
|
73 | 73 | $columnDefaults = [ |
74 | 74 | 'errorCode' => null, |
75 | 75 | 'errorText' => null |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | return []; |
82 | 82 | } |
83 | 83 | $this->getYem() |
84 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
84 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
85 | 85 | try { |
86 | 86 | return $this->getPdo() |
87 | 87 | ->query($sql) |
@@ -89,12 +89,12 @@ discard block |
||
89 | 89 | } catch (PDOException $exc) { |
90 | 90 | $mess = 'Could NOT get a list of active owners for'; |
91 | 91 | $this->getYem() |
92 | - ->triggerLogEvent( |
|
93 | - 'Yapeal.Log.log', |
|
94 | - Logger::WARNING, |
|
95 | - $this->createEveApiMessage($mess, $data), |
|
96 | - ['exception' => $exc] |
|
97 | - ); |
|
92 | + ->triggerLogEvent( |
|
93 | + 'Yapeal.Log.log', |
|
94 | + Logger::WARNING, |
|
95 | + $this->createEveApiMessage($mess, $data), |
|
96 | + ['exception' => $exc] |
|
97 | + ); |
|
98 | 98 | return []; |
99 | 99 | } |
100 | 100 | } |
@@ -66,30 +66,30 @@ |
||
66 | 66 | } |
67 | 67 | $ownerID = $this->extractOwnerID($data->getEveApiArguments()); |
68 | 68 | $this->getYem() |
69 | - ->triggerLogEvent( |
|
70 | - 'Yapeal.Log.log', |
|
71 | - Logger::DEBUG, |
|
72 | - $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
73 | - ); |
|
69 | + ->triggerLogEvent( |
|
70 | + 'Yapeal.Log.log', |
|
71 | + Logger::DEBUG, |
|
72 | + $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
73 | + ); |
|
74 | 74 | $this->getPdo() |
75 | - ->beginTransaction(); |
|
75 | + ->beginTransaction(); |
|
76 | 76 | try { |
77 | 77 | $this->preserveToAPIKeyInfo($xml, $ownerID) |
78 | - ->preserveToCharacters($xml) |
|
79 | - ->preserveToKeyBridge($xml, $ownerID); |
|
78 | + ->preserveToCharacters($xml) |
|
79 | + ->preserveToKeyBridge($xml, $ownerID); |
|
80 | 80 | $this->getPdo() |
81 | - ->commit(); |
|
81 | + ->commit(); |
|
82 | 82 | } catch (PDOException $exc) { |
83 | 83 | $mess = 'Failed to upsert data of'; |
84 | 84 | $this->getYem() |
85 | - ->triggerLogEvent( |
|
86 | - 'Yapeal.Log.log', |
|
87 | - Logger::WARNING, |
|
88 | - $this->createEveApiMessage($mess, $data), |
|
89 | - ['exception' => $exc] |
|
90 | - ); |
|
85 | + ->triggerLogEvent( |
|
86 | + 'Yapeal.Log.log', |
|
87 | + Logger::WARNING, |
|
88 | + $this->createEveApiMessage($mess, $data), |
|
89 | + ['exception' => $exc] |
|
90 | + ); |
|
91 | 91 | $this->getPdo() |
92 | - ->rollBack(); |
|
92 | + ->rollBack(); |
|
93 | 93 | return $event; |
94 | 94 | } |
95 | 95 | return $event->setHandledSufficiently(); |
@@ -74,30 +74,30 @@ discard block |
||
74 | 74 | } |
75 | 75 | $ownerID = $this->extractOwnerID($data->getEveApiArguments()); |
76 | 76 | $this->getYem() |
77 | - ->triggerLogEvent( |
|
78 | - 'Yapeal.Log.log', |
|
79 | - Logger::DEBUG, |
|
80 | - $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
81 | - ); |
|
77 | + ->triggerLogEvent( |
|
78 | + 'Yapeal.Log.log', |
|
79 | + Logger::DEBUG, |
|
80 | + $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
81 | + ); |
|
82 | 82 | $this->getPdo() |
83 | - ->beginTransaction(); |
|
83 | + ->beginTransaction(); |
|
84 | 84 | try { |
85 | 85 | $this->preserveToAccountStatus($xml, $ownerID) |
86 | - ->preserveToMultiCharacterTraining($xml, $ownerID) |
|
87 | - ->preserveToOffers($xml, $ownerID); |
|
86 | + ->preserveToMultiCharacterTraining($xml, $ownerID) |
|
87 | + ->preserveToOffers($xml, $ownerID); |
|
88 | 88 | $this->getPdo() |
89 | - ->commit(); |
|
89 | + ->commit(); |
|
90 | 90 | } catch (PDOException $exc) { |
91 | 91 | $mess = 'Failed to upsert data of'; |
92 | 92 | $this->getYem() |
93 | - ->triggerLogEvent( |
|
94 | - 'Yapeal.Log.log', |
|
95 | - Logger::WARNING, |
|
96 | - $this->createEveApiMessage($mess, $data), |
|
97 | - ['exception' => $exc] |
|
98 | - ); |
|
93 | + ->triggerLogEvent( |
|
94 | + 'Yapeal.Log.log', |
|
95 | + Logger::WARNING, |
|
96 | + $this->createEveApiMessage($mess, $data), |
|
97 | + ['exception' => $exc] |
|
98 | + ); |
|
99 | 99 | $this->getPdo() |
100 | - ->rollBack(); |
|
100 | + ->rollBack(); |
|
101 | 101 | return $event; |
102 | 102 | } |
103 | 103 | return $event->setHandledSufficiently(); |
@@ -115,9 +115,9 @@ discard block |
||
115 | 115 | $sql = $this->getCsq() |
116 | 116 | ->getDeleteFromTableWithOwnerID($tableName, $ownerID); |
117 | 117 | $this->getYem() |
118 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
118 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
119 | 119 | $this->getPdo() |
120 | - ->exec($sql); |
|
120 | + ->exec($sql); |
|
121 | 121 | $columnDefaults = [ |
122 | 122 | 'createDate' => '1970-01-01 00:00:01', |
123 | 123 | 'logonCount' => null, |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | $sql = $this->getCsq() |
143 | 143 | ->getDeleteFromTableWithOwnerID($tableName, $ownerID); |
144 | 144 | $this->getYem() |
145 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
145 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
146 | 146 | $this->getPdo() |
147 | - ->exec($sql); |
|
147 | + ->exec($sql); |
|
148 | 148 | $columnDefaults = [ |
149 | 149 | 'ownerID' => $ownerID, |
150 | 150 | 'trainingEnd' => null |
@@ -165,9 +165,9 @@ discard block |
||
165 | 165 | $sql = $this->getCsq() |
166 | 166 | ->getDeleteFromTableWithOwnerID($tableName, $ownerID); |
167 | 167 | $this->getYem() |
168 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
168 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $sql); |
|
169 | 169 | $this->getPdo() |
170 | - ->exec($sql); |
|
170 | + ->exec($sql); |
|
171 | 171 | $columnDefaults = [ |
172 | 172 | 'from' => null, |
173 | 173 | 'ISK' => '0.0', |
@@ -68,11 +68,11 @@ discard block |
||
68 | 68 | } |
69 | 69 | if (false === $data->getEveApiXml()) { |
70 | 70 | $this->getYem() |
71 | - ->triggerLogEvent( |
|
72 | - 'Yapeal.Log.log', |
|
73 | - Logger::NOTICE, |
|
74 | - $this->getEmptyXmlDataMessage($data, $eventSuffix) |
|
75 | - ); |
|
71 | + ->triggerLogEvent( |
|
72 | + 'Yapeal.Log.log', |
|
73 | + Logger::NOTICE, |
|
74 | + $this->getEmptyXmlDataMessage($data, $eventSuffix) |
|
75 | + ); |
|
76 | 76 | $result = false; |
77 | 77 | break; |
78 | 78 | } |
@@ -97,17 +97,17 @@ discard block |
||
97 | 97 | $this->setYem($yem); |
98 | 98 | $data = $event->getData(); |
99 | 99 | $this->getYem() |
100 | - ->triggerLogEvent( |
|
101 | - 'Yapeal.Log.log', |
|
102 | - Logger::DEBUG, |
|
103 | - $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
104 | - ); |
|
100 | + ->triggerLogEvent( |
|
101 | + 'Yapeal.Log.log', |
|
102 | + Logger::DEBUG, |
|
103 | + $this->getReceivedEventMessage($data, $eventName, __CLASS__) |
|
104 | + ); |
|
105 | 105 | // If method doesn't exist still needs array with member for count but return '0' from extractOwnerID(). |
106 | 106 | $active = method_exists($this, 'getActive') ? $this->getActive($data) : [[null]]; |
107 | 107 | if (0 === count($active)) { |
108 | 108 | $mess = 'No active owners found for'; |
109 | 109 | $this->getYem() |
110 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data)); |
|
110 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data)); |
|
111 | 111 | $this->emitEvents($data, 'end'); |
112 | 112 | return $event->setHandledSufficiently(); |
113 | 113 | } |
@@ -115,8 +115,8 @@ discard block |
||
115 | 115 | foreach ($active as $arguments) { |
116 | 116 | // Set arguments, reset interval, and clear xml data. |
117 | 117 | $data->setEveApiArguments($arguments) |
118 | - ->setCacheInterval($untilInterval) |
|
119 | - ->setEveApiXml(); |
|
118 | + ->setCacheInterval($untilInterval) |
|
119 | + ->setEveApiXml(); |
|
120 | 120 | if ($this->cacheNotExpired($data)) { |
121 | 121 | $event->setHandledSufficiently(); |
122 | 122 | continue; |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | ->getUtilCachedUntilExpires($data->getEveApiName(), $data->getEveApiSectionName(), |
140 | 140 | $this->extractOwnerID($data->getEveApiArguments())); |
141 | 141 | $this->getYem() |
142 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
142 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
143 | 143 | try { |
144 | 144 | $expires = $this->getPdo() |
145 | 145 | ->query($sql) |
@@ -147,30 +147,30 @@ discard block |
||
147 | 147 | } catch (PDOException $exc) { |
148 | 148 | $mess = 'Could NOT get cache expired for'; |
149 | 149 | $this->getYem() |
150 | - ->triggerLogEvent( |
|
151 | - 'Yapeal.Log.log', |
|
152 | - Logger::WARNING, |
|
153 | - $this->createEveApiMessage($mess, $data), |
|
154 | - ['exception' => $exc] |
|
155 | - ); |
|
150 | + ->triggerLogEvent( |
|
151 | + 'Yapeal.Log.log', |
|
152 | + Logger::WARNING, |
|
153 | + $this->createEveApiMessage($mess, $data), |
|
154 | + ['exception' => $exc] |
|
155 | + ); |
|
156 | 156 | return false; |
157 | 157 | } |
158 | 158 | if (0 === count($expires)) { |
159 | 159 | $mess = 'No UtilCachedUntil record found for'; |
160 | 160 | $this->getYem() |
161 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
|
161 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
|
162 | 162 | return false; |
163 | 163 | } |
164 | 164 | if (1 < count($expires)) { |
165 | 165 | $mess = 'Multiple UtilCachedUntil records found for'; |
166 | 166 | $this->getYem() |
167 | - ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data)); |
|
167 | + ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data)); |
|
168 | 168 | return false; |
169 | 169 | } |
170 | 170 | if (strtotime($expires[0]['expires'] . '+00:00') < time()) { |
171 | 171 | $mess = 'Expired UtilCachedUntil record found for'; |
172 | 172 | $this->getYem() |
173 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
|
173 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
|
174 | 174 | return false; |
175 | 175 | } |
176 | 176 | return true; |
@@ -208,19 +208,19 @@ discard block |
||
208 | 208 | $sql = $this->getCsq() |
209 | 209 | ->getApiLock($data->getHash()); |
210 | 210 | $this->getYem() |
211 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
211 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
212 | 212 | $context = []; |
213 | 213 | $success = false; |
214 | 214 | try { |
215 | 215 | $success = (bool)$this->getPdo() |
216 | - ->query($sql) |
|
217 | - ->fetchColumn(); |
|
216 | + ->query($sql) |
|
217 | + ->fetchColumn(); |
|
218 | 218 | } catch (PDOException $exc) { |
219 | 219 | $context = ['exception' => $exc]; |
220 | 220 | } |
221 | 221 | $mess = $success ? 'Got lock for' : 'Could NOT get lock for'; |
222 | 222 | $this->getYem() |
223 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
223 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
224 | 224 | return $success; |
225 | 225 | } |
226 | 226 | /** |
@@ -234,19 +234,19 @@ discard block |
||
234 | 234 | $sql = $this->getCsq() |
235 | 235 | ->getApiLockRelease($data->getHash()); |
236 | 236 | $this->getYem() |
237 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
237 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
238 | 238 | $context = []; |
239 | 239 | $success = false; |
240 | 240 | try { |
241 | 241 | $success = (bool)$this->getPdo() |
242 | - ->query($sql) |
|
243 | - ->fetchColumn(); |
|
242 | + ->query($sql) |
|
243 | + ->fetchColumn(); |
|
244 | 244 | } catch (PDOException $exc) { |
245 | 245 | $context = ['exception' => $exc]; |
246 | 246 | } |
247 | 247 | $mess = $success ? 'Released lock for' : 'Could NOT release lock for'; |
248 | 248 | $this->getYem() |
249 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
249 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
250 | 250 | return $success; |
251 | 251 | } |
252 | 252 | /** |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | $sql = $this->getCsq() |
279 | 279 | ->getUtilCachedUntilUpsert(); |
280 | 280 | $this->getYem() |
281 | - ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
281 | + ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql); |
|
282 | 282 | $pdo = $this->getPdo(); |
283 | 283 | $pdo->beginTransaction(); |
284 | 284 | $context = []; |
@@ -294,7 +294,7 @@ discard block |
||
294 | 294 | } |
295 | 295 | $mess = $success ? 'Updated cached until date/time of' : 'Could NOT update cached until date/time of'; |
296 | 296 | $this->getYem() |
297 | - ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
297 | + ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $this->createEveApiMessage($mess, $data), $context); |
|
298 | 298 | return $this; |
299 | 299 | } |
300 | 300 | /** |
@@ -167,7 +167,7 @@ discard block |
||
167 | 167 | ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data)); |
168 | 168 | return false; |
169 | 169 | } |
170 | - if (strtotime($expires[0]['expires'] . '+00:00') < time()) { |
|
170 | + if (strtotime($expires[0]['expires'].'+00:00') < time()) { |
|
171 | 171 | $mess = 'Expired UtilCachedUntil record found for'; |
172 | 172 | $this->getYem() |
173 | 173 | ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data)); |
@@ -267,7 +267,7 @@ discard block |
||
267 | 267 | } |
268 | 268 | $dateTime = gmdate( |
269 | 269 | 'Y-m-d H:i:s', |
270 | - strtotime($currentTime . '+00:00') + $data->getCacheInterval() |
|
270 | + strtotime($currentTime.'+00:00') + $data->getCacheInterval() |
|
271 | 271 | ); |
272 | 272 | $row = [ |
273 | 273 | $data->getEveApiName(), |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | return $this; |
58 | 58 | } |
59 | 59 | if (!is_string($name)) { |
60 | - $mess = 'Name MUST be string but was given ' . gettype($name); |
|
60 | + $mess = 'Name MUST be string but was given '.gettype($name); |
|
61 | 61 | throw new InvalidArgumentException($mess); |
62 | 62 | } |
63 | 63 | $this->eveApiArguments[$name] = (string)$value; |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | { |
90 | 90 | $name = (string)$name; |
91 | 91 | if (!array_key_exists($name, $this->eveApiArguments)) { |
92 | - $mess = 'Unknown argument ' . $name; |
|
92 | + $mess = 'Unknown argument '.$name; |
|
93 | 93 | throw new DomainException($mess); |
94 | 94 | } |
95 | 95 | return $this->eveApiArguments[$name]; |
@@ -151,14 +151,14 @@ discard block |
||
151 | 151 | */ |
152 | 152 | public function getHash() |
153 | 153 | { |
154 | - $hash = $this->getEveApiName() . $this->getEveApiSectionName(); |
|
154 | + $hash = $this->getEveApiName().$this->getEveApiSectionName(); |
|
155 | 155 | $arguments = $this->getEveApiArguments(); |
156 | 156 | ksort($arguments); |
157 | 157 | foreach ($arguments as $key => $value) { |
158 | 158 | if ('mask' === $key) { |
159 | 159 | continue; |
160 | 160 | } |
161 | - $hash .= $key . $value; |
|
161 | + $hash .= $key.$value; |
|
162 | 162 | } |
163 | 163 | return hash('md5', $hash); |
164 | 164 | } |
@@ -228,7 +228,7 @@ discard block |
||
228 | 228 | public function setEveApiName($value) |
229 | 229 | { |
230 | 230 | if (!is_string($value)) { |
231 | - $mess = 'Name MUST be string but was given ' . gettype($value); |
|
231 | + $mess = 'Name MUST be string but was given '.gettype($value); |
|
232 | 232 | throw new InvalidArgumentException($mess); |
233 | 233 | } |
234 | 234 | $this->eveApiName = $value; |
@@ -245,7 +245,7 @@ discard block |
||
245 | 245 | public function setEveApiSectionName($value) |
246 | 246 | { |
247 | 247 | if (!is_string($value)) { |
248 | - $mess = 'Section name MUST be string but was given ' . gettype($value); |
|
248 | + $mess = 'Section name MUST be string but was given '.gettype($value); |
|
249 | 249 | throw new InvalidArgumentException($mess); |
250 | 250 | } |
251 | 251 | $this->eveApiSectionName = $value; |
@@ -265,7 +265,7 @@ discard block |
||
265 | 265 | $xml = ''; |
266 | 266 | } |
267 | 267 | if (!is_string($xml)) { |
268 | - $mess = 'Xml MUST be string but was given ' . gettype($xml); |
|
268 | + $mess = 'Xml MUST be string but was given '.gettype($xml); |
|
269 | 269 | throw new InvalidArgumentException($mess); |
270 | 270 | } |
271 | 271 | $this->eveApiXml = $xml; |