Completed
Push — master ( 2b818c...df4948 )
by Michael
04:25
created
lib/Sql/CommonSqlQueries.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -380,11 +380,11 @@
 block discarded – undo
380 380
     public function getUpsert($tableName, array $columnNameList, $rowCount)
381 381
     {
382 382
         $columns = implode('","', $columnNameList);
383
-        $rowPrototype = '(' . implode(',', array_fill(0, count($columnNameList), '?')) . ')';
383
+        $rowPrototype = '('.implode(',', array_fill(0, count($columnNameList), '?')).')';
384 384
         $rows = implode(',', array_fill(0, $rowCount, $rowPrototype));
385 385
         $updates = [];
386 386
         foreach ($columnNameList as $column) {
387
-            $updates[] = '"' . $column . '"=VALUES("' . $column . '")';
387
+            $updates[] = '"'.$column.'"=VALUES("'.$column.'")';
388 388
         }
389 389
         $updates = implode(',', $updates);
390 390
         $sql = sprintf(
Please login to merge, or discard this patch.
lib/Sql/Creator.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -238,18 +238,18 @@
 block discarded – undo
238 238
         }
239 239
         $name = strtolower($name);
240 240
         foreach ([
241
-                     'descr'          => 'TEXT NOT NULL',
242
-                     'name'           => 'CHAR(100) NOT NULL',
243
-                     'balance'        => 'DECIMAL(17, 2) NOT NULL',
244
-                     'isk'            => 'DECIMAL(17, 2) NOT NULL',
245
-                     'tax'            => 'DECIMAL(17, 2) NOT NULL',
246
-                     'timeefficiency' => 'TINYINT(3) UNSIGNED NOT NULL',
247
-                     'date'           => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
248
-                     'time'           => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
249
-                     'until'          => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
250
-                     'errorcode'      => 'SMALLINT(4) UNSIGNED NOT NULL',
251
-                     'level'          => 'SMALLINT(4) UNSIGNED NOT NULL'
252
-                 ] as $search => $replace) {
241
+                        'descr'          => 'TEXT NOT NULL',
242
+                        'name'           => 'CHAR(100) NOT NULL',
243
+                        'balance'        => 'DECIMAL(17, 2) NOT NULL',
244
+                        'isk'            => 'DECIMAL(17, 2) NOT NULL',
245
+                        'tax'            => 'DECIMAL(17, 2) NOT NULL',
246
+                        'timeefficiency' => 'TINYINT(3) UNSIGNED NOT NULL',
247
+                        'date'           => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
248
+                        'time'           => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
249
+                        'until'          => 'DATETIME NOT NULL DEFAULT \'1970-01-01 00:00:01\'',
250
+                        'errorcode'      => 'SMALLINT(4) UNSIGNED NOT NULL',
251
+                        'level'          => 'SMALLINT(4) UNSIGNED NOT NULL'
252
+                    ] as $search => $replace) {
253 253
             if (false !== strpos($name, $search)) {
254 254
                 return $replace;
255 255
             }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
             'className'   => lcfirst($this->apiName),
119 119
             'tables'      => $this->tables,
120 120
             'sectionName' => lcfirst($this->sectionName),
121
-            'version' => gmdate('YmdHis', $sec) . sprintf('.%0-3s', floor($mSec * 1000))
121
+            'version' => gmdate('YmdHis', $sec).sprintf('.%0-3s', floor($mSec * 1000))
122 122
         ];
123 123
         // Add create or replace view.
124 124
         if (!in_array(strtolower($this->apiName), array_map('strtolower', $tableNames), true)) {
@@ -194,7 +194,7 @@  discard block
 block discarded – undo
194 194
         $names = explode(
195 195
             ',',
196 196
             sprintf(
197
-                '%1$s/%2$s.%3$s.%4$s,%1$s/%2$s.%4$s,%1$s/%3$s.%4$s,' . '%2$s.%3$s.%4$s,%2$s.%4$s,%3$s.%4$s,sql.%4$s',
197
+                '%1$s/%2$s.%3$s.%4$s,%1$s/%2$s.%4$s,%1$s/%3$s.%4$s,'.'%2$s.%3$s.%4$s,%2$s.%4$s,%3$s.%4$s,sql.%4$s',
198 198
                 ucfirst($data->getEveApiSectionName()),
199 199
                 $data->getEveApiName(),
200 200
                 $platform,
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             )
203 203
         );
204 204
         foreach ($names as $fileName) {
205
-            if (is_file($this->getDir() . $fileName)) {
205
+            if (is_file($this->getDir().$fileName)) {
206 206
                 return $fileName;
207 207
             }
208 208
         }
Please login to merge, or discard this patch.
lib/EveApi/Char/AssetList.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -74,28 +74,28 @@  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->preserveToAssetList($xml, $ownerID);
86 86
             $this->getPdo()
87
-                 ->commit();
87
+                    ->commit();
88 88
         } catch (PDOException $exc) {
89 89
             $mess = 'Failed to upsert data of';
90 90
             $this->getYem()
91
-                 ->triggerLogEvent(
92
-                     'Yapeal.Log.log',
93
-                     Logger::WARNING,
94
-                     $this->createEveApiMessage($mess, $data),
95
-                     ['exception' => $exc]
96
-                 );
91
+                    ->triggerLogEvent(
92
+                        'Yapeal.Log.log',
93
+                        Logger::WARNING,
94
+                        $this->createEveApiMessage($mess, $data),
95
+                        ['exception' => $exc]
96
+                    );
97 97
             $this->getPdo()
98
-                 ->rollBack();
98
+                    ->rollBack();
99 99
             return $event;
100 100
         }
101 101
         return $event->setHandledSufficiently();
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
         $sql = $this->getCsq()
114 114
                     ->getDeleteFromTableWithOwnerID($tableName, $ownerID);
115 115
         $this->getYem()
116
-             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
116
+                ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
117 117
         $this->getPdo()
118
-             ->exec($sql);
118
+                ->exec($sql);
119 119
         $columnDefaults = [
120 120
             'flag' => '0',
121 121
             'itemID' => null,
Please login to merge, or discard this patch.
lib/Xsd/Validator.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
         $this->setYem($yem);
71 71
         $data = $event->getData();
72 72
         $this->getYem()
73
-             ->triggerLogEvent(
74
-                 'Yapeal.Log.log',
75
-                 Logger::DEBUG,
76
-                 $this->getReceivedEventMessage($data, $eventName, __CLASS__)
77
-             );
73
+                ->triggerLogEvent(
74
+                    'Yapeal.Log.log',
75
+                    Logger::DEBUG,
76
+                    $this->getReceivedEventMessage($data, $eventName, __CLASS__)
77
+                );
78 78
         $fileName = $this->findEveApiFile($data->getEveApiSectionName(), $data->getEveApiName(), 'xsd');
79 79
         if ('' === $fileName) {
80 80
             return $event;
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             if (0 !== count($errors)) {
92 92
                 foreach ($errors as $error) {
93 93
                     $this->getYem()
94
-                         ->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $error->message);
94
+                            ->triggerLogEvent('Yapeal.Log.log', Logger::NOTICE, $error->message);
95 95
                 }
96 96
             }
97 97
             libxml_clear_errors();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      */
54 54
     public function __construct($dir = __DIR__)
55 55
     {
56
-        $this->setRelativeBaseDir($dir . '/');
56
+        $this->setRelativeBaseDir($dir.'/');
57 57
     }
58 58
     /**
59 59
      * @param EveApiEventInterface $event
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             libxml_clear_errors();
98 98
             libxml_use_internal_errors($oldErrors);
99 99
             $apiName = $data->getEveApiName();
100
-            $data->setEveApiName('Invalid_' . $apiName);
100
+            $data->setEveApiName('Invalid_'.$apiName);
101 101
             // Cache error XML.
102 102
             $this->emitEvents($data, 'cache');
103 103
             $data->setEveApiName($apiName);
Please login to merge, or discard this patch.
lib/EveApi/Corp/AssetList.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -74,28 +74,28 @@  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->preserveToAssetList($xml, $ownerID);
86 86
             $this->getPdo()
87
-                 ->commit();
87
+                    ->commit();
88 88
         } catch (PDOException $exc) {
89 89
             $mess = 'Failed to upsert data of';
90 90
             $this->getYem()
91
-                 ->triggerLogEvent(
92
-                     'Yapeal.Log.log',
93
-                     Logger::WARNING,
94
-                     $this->createEveApiMessage($mess, $data),
95
-                     ['exception' => $exc]
96
-                 );
91
+                    ->triggerLogEvent(
92
+                        'Yapeal.Log.log',
93
+                        Logger::WARNING,
94
+                        $this->createEveApiMessage($mess, $data),
95
+                        ['exception' => $exc]
96
+                    );
97 97
             $this->getPdo()
98
-                 ->rollBack();
98
+                    ->rollBack();
99 99
             return $event;
100 100
         }
101 101
         return $event->setHandledSufficiently();
@@ -113,9 +113,9 @@  discard block
 block discarded – undo
113 113
         $sql = $this->getCsq()
114 114
                     ->getDeleteFromTableWithOwnerID($tableName, $ownerID);
115 115
         $this->getYem()
116
-             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
116
+                ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $sql);
117 117
         $this->getPdo()
118
-             ->exec($sql);
118
+                ->exec($sql);
119 119
         $columnDefaults = [
120 120
             'flag' => '0',
121 121
             'itemID' => null,
Please login to merge, or discard this patch.
lib/Event/EveApiEventEmitterTrait.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -91,35 +91,35 @@
 block discarded – undo
91 91
         $event = null;
92 92
         foreach ($eventNames as $eventName) {
93 93
             $this->getYem()
94
-                 ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->getEmittingEventMessage($data, $eventName));
94
+                    ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->getEmittingEventMessage($data, $eventName));
95 95
             $event = $this->getYem()
96
-                          ->triggerEveApiEvent($eventName, $data);
96
+                            ->triggerEveApiEvent($eventName, $data);
97 97
             $data = $event->getData();
98 98
             if ($event->hasBeenHandled()) {
99 99
                 $this->getYem()
100
-                     ->triggerLogEvent(
101
-                         'Yapeal.Log.log',
102
-                         Logger::INFO,
103
-                         $this->getWasHandledEventMessage($data, $eventName)
104
-                     );
100
+                        ->triggerLogEvent(
101
+                            'Yapeal.Log.log',
102
+                            Logger::INFO,
103
+                            $this->getWasHandledEventMessage($data, $eventName)
104
+                        );
105 105
                 break;
106 106
             }
107 107
             if ($event->isSufficientlyHandled()) {
108 108
                 $this->getYem()
109
-                     ->triggerLogEvent(
110
-                         'Yapeal.Log.log',
111
-                         Logger::INFO,
112
-                         $this->getSufficientlyHandledEventMessage($data, $eventName)
113
-                     );
109
+                        ->triggerLogEvent(
110
+                            'Yapeal.Log.log',
111
+                            Logger::INFO,
112
+                            $this->getSufficientlyHandledEventMessage($data, $eventName)
113
+                        );
114 114
             }
115 115
         }
116 116
         if (null === $event || !$event->isSufficientlyHandled()) {
117 117
             $this->getYem()
118
-                 ->triggerLogEvent(
119
-                     'Yapeal.Log.log',
120
-                     Logger::NOTICE,
121
-                     $this->getNonHandledEventMessage($data, $eventSuffix)
122
-                 );
118
+                    ->triggerLogEvent(
119
+                        'Yapeal.Log.log',
120
+                        Logger::NOTICE,
121
+                        $this->getNonHandledEventMessage($data, $eventSuffix)
122
+                    );
123 123
             return false;
124 124
         }
125 125
         return true;
Please login to merge, or discard this patch.
lib/Xml/ErrorCacheIntervalSubscriber.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -59,11 +59,11 @@  discard block
 block discarded – undo
59 59
         $this->setYem($yem);
60 60
         $data = $event->getData();
61 61
         $this->getYem()
62
-             ->triggerLogEvent(
63
-                 'Yapeal.Log.log',
64
-                 Logger::DEBUG,
65
-                 $this->getReceivedEventMessage($data, $eventName, __CLASS__)
66
-             );
62
+                ->triggerLogEvent(
63
+                    'Yapeal.Log.log',
64
+                    Logger::DEBUG,
65
+                    $this->getReceivedEventMessage($data, $eventName, __CLASS__)
66
+                );
67 67
         $simple = new \SimpleXMLElement($data->getEveApiXml());
68 68
         /** @noinspection PhpUndefinedFieldInspection */
69 69
         $errorText = (string)$simple->error[0];
@@ -102,6 +102,6 @@  discard block
 block discarded – undo
102 102
         $this->emitEvents($data, 'cache');
103 103
         $data->setEveApiName($apiName);
104 104
         return $event->setData($data)
105
-                     ->setHandledSufficiently();
105
+                        ->setHandledSufficiently();
106 106
     }
107 107
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
         }
81 81
         if ($code < 200) {
82 82
             if (false !== strpos($mess, 'retry after')) {
83
-                $data->setCacheInterval(strtotime(substr($mess, -19) . '+00:00') - time());
83
+                $data->setCacheInterval(strtotime(substr($mess, -19).'+00:00') - time());
84 84
             }
85 85
             $yem->triggerLogEvent('Yapeal.Log.log', Logger::WARNING,
86 86
                 $this->createEventMessage($mess, $data, $eventName));
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
             $data->setCacheInterval(300);
98 98
         }
99 99
         $apiName = $data->getEveApiName();
100
-        $data->setEveApiName('Error_' . $apiName);
100
+        $data->setEveApiName('Error_'.$apiName);
101 101
         // Cache error XML.
102 102
         $this->emitEvents($data, 'cache');
103 103
         $data->setEveApiName($apiName);
Please login to merge, or discard this patch.
lib/Configuration/XslWiring.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
     {
52 52
         if (empty($dic['Yapeal.Xsl.Transformer'])) {
53 53
             $dic['Yapeal.Xsl.Transformer'] = $dic->factory(
54
-                function ($dic) {
54
+                function($dic) {
55 55
                     return new $dic['Yapeal.Xsl.transform']($dic['Yapeal.Xsl.dir']);
56 56
                 }
57 57
             );
Please login to merge, or discard this patch.
lib/Configuration/XmlWiring.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,14 +51,14 @@
 block discarded – undo
51 51
     {
52 52
         if (empty($dic['Yapeal.Xml.Data'])) {
53 53
             $dic['Yapeal.Xml.Data'] = $dic->factory(
54
-                function ($dic) {
54
+                function($dic) {
55 55
                     return new $dic['Yapeal.Xml.data']();
56 56
                 }
57 57
             );
58 58
         }
59 59
         if (empty($dic['Yapeal.Xml.Error.Subscriber'])) {
60 60
             $dic['Yapeal.Xml.Error.Subscriber'] = $dic->factory(
61
-                function ($dic) {
61
+                function($dic) {
62 62
                     return new $dic['Yapeal.Xml.Handlers.error']();
63 63
                 }
64 64
             );
Please login to merge, or discard this patch.