Completed
Push — master ( 75748b...36048b )
by Michael
06:58
created
lib/EveApi/Account/APIKeyInfo.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -66,30 +66,30 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
lib/EveApi/Account/AccountStatus.php 1 patch
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -74,30 +74,30 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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',
Please login to merge, or discard this patch.
lib/EveApi/CommonEveApiTrait.php 1 patch
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.