Completed
Push — master ( 598fe1...4a905b )
by Michael
03:41
created
lib/FileSystem/CachePreserver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -103,10 +103,10 @@
 block discarded – undo
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
         if ('' === $this->cachePath) {
Please login to merge, or discard this patch.
lib/Xml/ErrorCacheIntervalSubscriber.php 1 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/ErrorWiring.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
     public function wire(ContainerInterface $dic)
51 51
     {
52 52
         if (empty($dic['Yapeal.Error.Strategy'])) {
53
-            $dic['Yapeal.Error.Strategy'] = function () use ($dic) {
53
+            $dic['Yapeal.Error.Strategy'] = function() use ($dic) {
54 54
                 return new $dic['Yapeal.Error.Handlers.strategy']((int)$dic['Yapeal.Error.threshold']);
55 55
             };
56 56
         }
57 57
         if (empty($dic['Yapeal.Error.Logger'])) {
58
-            $dic['Yapeal.Error.Logger'] = function () use ($dic) {
58
+            $dic['Yapeal.Error.Logger'] = function() use ($dic) {
59 59
                 /**
60 60
                  * @var Logger $logger
61 61
                  */
Please login to merge, or discard this patch.
lib/Xsl/Transformer.php 1 patch
Spacing   +5 added lines, -5 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
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
         }
111 111
         $arguments = $data->getEveApiArguments();
112 112
         if (!empty($arguments['vCode'])) {
113
-            $arguments['vCode'] = substr($arguments['vCode'], 0, 8) . '...';
113
+            $arguments['vCode'] = substr($arguments['vCode'], 0, 8).'...';
114 114
         }
115 115
         if (!in_array($data->getEveApiName(), ['accountBalance', 'walletJournal', 'walletTransactions'], true)) {
116 116
             unset($arguments['accountKey']);
@@ -120,8 +120,8 @@  discard block
 block discarded – undo
120 120
         $json = json_encode($arguments);
121 121
         $xml = str_replace(["encoding='UTF-8'?>\r\n<eveapi", "encoding='UTF-8'?>\n<eveapi"],
122 122
             [
123
-                "encoding='UTF-8'?>\r\n<?yapeal.parameters.json " . $json . "?>\r\n<eveapi",
124
-                "encoding='UTF-8'?>\n<?yapeal.parameters.json " . $json . "?>\n<eveapi"
123
+                "encoding='UTF-8'?>\r\n<?yapeal.parameters.json ".$json."?>\r\n<eveapi",
124
+                "encoding='UTF-8'?>\n<?yapeal.parameters.json ".$json."?>\n<eveapi"
125 125
             ],
126 126
             $xml);
127 127
         $data->setEveApiXml($xml);
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
                 }
169 169
             }
170 170
             $apiName = $data->getEveApiName();
171
-            $data->setEveApiName('Untransformed_' . $apiName);
171
+            $data->setEveApiName('Untransformed_'.$apiName);
172 172
             // Cache error causing XML.
173 173
             $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error');
174 174
             $data->setEveApiName($apiName);
Please login to merge, or discard this patch.
lib/Xsd/Creator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
             'className' => lcfirst($data->getEveApiName()),
96 96
             'tables' => $this->tables,
97 97
             'sectionName' => lcfirst($this->sectionName),
98
-            'version' => gmdate('YmdHis', $sec) . sprintf('.%0-3s', floor($mSec * 1000))
98
+            'version' => gmdate('YmdHis', $sec).sprintf('.%0-3s', floor($mSec * 1000))
99 99
         ];
100 100
         try {
101 101
             $contents = $this->getTwig()
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
                 $columns[$colName] = $this->inferTypeFromName($colName);
183 183
             }
184 184
             uksort($columns,
185
-                function ($alpha, $beta) {
185
+                function($alpha, $beta) {
186 186
                     $alpha = strtolower($alpha);
187 187
                     $beta = strtolower($beta);
188 188
                     if ($alpha < $beta) {
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
             $tables[$tableName] = ['attributes' => $columns];
196 196
         }
197 197
         uksort($tables,
198
-            function ($alpha, $beta) {
198
+            function($alpha, $beta) {
199 199
                 $alpha = strtolower($alpha);
200 200
                 $beta = strtolower($beta);
201 201
                 if ($alpha < $beta) {
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
             $columns[$name] = $this->inferTypeFromName($name, true);
232 232
         }
233 233
         uksort($columns,
234
-            function ($alpha, $beta) {
234
+            function($alpha, $beta) {
235 235
                 $alpha = strtolower($alpha);
236 236
                 $beta = strtolower($beta);
237 237
                 if ($alpha < $beta) {
Please login to merge, or discard this patch.
lib/Xsd/Validator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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);
Please login to merge, or discard this patch.
lib/FileSystem/CacheRetriever.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,10 +103,10 @@  discard block
 block discarded – undo
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
 block discarded – undo
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;
Please login to merge, or discard this patch.
lib/Console/Command/DatabaseUpdater.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.
lib/Console/Command/EveApiCreatorTrait.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -83,7 +83,7 @@
 block discarded – undo
83 83
      * @param \Yapeal\Xml\EveApiReadWriteInterface $data
84 84
      * @param array                                $context
85 85
      *
86
-     * @return bool|string
86
+     * @return false|string
87 87
      * @throws \DomainException
88 88
      * @throws \InvalidArgumentException
89 89
      * @throws \LogicException
Please login to merge, or discard this patch.