Completed
Push — master ( 70fc1a...2d4410 )
by Michael
02:52
created
lib/EveApi/CommonEveApiTrait.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
                 ->triggerLogEvent('Yapeal.Log.log', Logger::WARNING, $this->createEveApiMessage($mess, $data));
182 182
             return false;
183 183
         }
184
-        if (strtotime($expires[0]['expires'] . '+00:00') < time()) {
184
+        if (strtotime($expires[0]['expires'].'+00:00') < time()) {
185 185
             $mess = 'Expired UtilCachedUntil record found for';
186 186
             $this->getYem()
187 187
                 ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $this->createEveApiMessage($mess, $data));
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
         if ('' === $currentTime) {
289 289
             return $this;
290 290
         }
291
-        $dateTime = gmdate('Y-m-d H:i:s', strtotime($currentTime . '+00:00') + $data->getCacheInterval());
291
+        $dateTime = gmdate('Y-m-d H:i:s', strtotime($currentTime.'+00:00') + $data->getCacheInterval());
292 292
         $row = [
293 293
             'accountKey' => $data->hasEveApiArgument('accountKey') ? $data->getEveApiArgument('accountKey') : '0',
294 294
             'apiName' => $data->getEveApiName(),
Please login to merge, or discard this patch.
lib/Configuration/Wiring.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
     {
107 107
         $names = ['Config', 'Error', 'Event', 'Log', 'Sql', 'Xml', 'Xsd', 'Xsl', 'Cache', 'Network', 'EveApi'];
108 108
         foreach ($names as $name) {
109
-            $className = __NAMESPACE__ . '\\' . $name . 'Wiring';
109
+            $className = __NAMESPACE__.'\\'.$name.'Wiring';
110 110
             if (class_exists($className, true)) {
111 111
                 /**
112 112
                  * @var WiringInterface $class
@@ -115,11 +115,11 @@  discard block
 block discarded – undo
115 115
                 $class->wire($this->dic);
116 116
                 continue;
117 117
             }
118
-            $methodName = 'wire' . $name;
118
+            $methodName = 'wire'.$name;
119 119
             if (method_exists($this, $methodName)) {
120 120
                 $this->$methodName();
121 121
             } else {
122
-                $mess = 'Could NOT find class or method for ' . $name;
122
+                $mess = 'Could NOT find class or method for '.$name;
123 123
                 throw new \LogicException($mess);
124 124
             }
125 125
         }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
         do {
144 144
             $settings = preg_replace_callback(
145 145
                 $regEx,
146
-                function ($match) use ($settings, $dic) {
146
+                function($match) use ($settings, $dic) {
147 147
                     if (!empty($settings[$match['name']])) {
148 148
                         return $settings[$match['name']];
149 149
                     }
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             if (PREG_NO_ERROR !== $lastError) {
165 165
                 $constants = array_flip(get_defined_constants(true)['pcre']);
166 166
                 $lastError = $constants[$lastError];
167
-                $mess = 'Received preg error ' . $lastError;
167
+                $mess = 'Received preg error '.$lastError;
168 168
                 throw new \DomainException($mess);
169 169
             }
170 170
         } while ($count > 0);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $rdi->setFlags($flags);
184 184
         /** @noinspection SpellCheckingInspection */
185 185
         $rcfi = new \RecursiveCallbackFilterIterator(
186
-            $rdi, function (\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
186
+            $rdi, function(\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
187 187
             if ($rdi->hasChildren()) {
188 188
                 return true;
189 189
             }
@@ -218,16 +218,16 @@  discard block
 block discarded – undo
218 218
             $dic['Yapeal.baseDir'] = $path;
219 219
         }
220 220
         if (empty($dic['Yapeal.libDir'])) {
221
-            $dic['Yapeal.libDir'] = $path . 'lib/';
221
+            $dic['Yapeal.libDir'] = $path.'lib/';
222 222
         }
223 223
         $configFiles = [
224
-            $fpn->normalizeFile(__DIR__ . '/yapeal_defaults.yaml'),
225
-            $fpn->normalizeFile($dic['Yapeal.baseDir'] . 'config/yapeal.yaml')
224
+            $fpn->normalizeFile(__DIR__.'/yapeal_defaults.yaml'),
225
+            $fpn->normalizeFile($dic['Yapeal.baseDir'].'config/yapeal.yaml')
226 226
         ];
227 227
         $vendorPos = strpos($path, 'vendor/');
228 228
         if (false !== $vendorPos) {
229 229
             $dic['Yapeal.vendorParentDir'] = substr($path, 0, $vendorPos);
230
-            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml');
230
+            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'].'config/yapeal.yaml');
231 231
         }
232 232
         $settings = [];
233 233
         // Process each file in turn so any substitutions are done in a more
@@ -270,8 +270,8 @@  discard block
 block discarded – undo
270 270
                     basename($subscriber, '.php')
271 271
                 );
272 272
                 if (!isset($dic[$service])) {
273
-                    $dic[$service] = function () use ($dic, $service) {
274
-                        $class = '\\' . str_replace('.', '\\', $service);
273
+                    $dic[$service] = function() use ($dic, $service) {
274
+                        $class = '\\'.str_replace('.', '\\', $service);
275 275
                         /**
276 276
                          * @var \Yapeal\CommonToolsTrait $callable
277 277
                          */
@@ -280,27 +280,27 @@  discard block
 block discarded – undo
280 280
                             ->setPdo($dic['Yapeal.Sql.Connection']);
281 281
                     };
282 282
                 }
283
-                $events = [$service . '.start' => ['startEveApi', 'last']];
283
+                $events = [$service.'.start' => ['startEveApi', 'last']];
284 284
                 if (false === strpos($subscriber, 'Section')) {
285
-                    $events[$service . '.preserve'] = ['preserveEveApi', 'last'];
285
+                    $events[$service.'.preserve'] = ['preserveEveApi', 'last'];
286 286
                 }
287 287
                 $mediator->addServiceSubscriberByEventList($service, $events);
288 288
             }
289 289
         }
290 290
         if (empty($dic['Yapeal.EveApi.Creator'])) {
291
-            $dic['Yapeal.EveApi.Creator'] = function () use ($dic) {
291
+            $dic['Yapeal.EveApi.Creator'] = function() use ($dic) {
292 292
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.EveApi.dir']);
293 293
                 $twig = new \Twig_Environment(
294 294
                     $loader, ['debug' => true, 'strict_variables' => true, 'autoescape' => false]
295 295
                 );
296 296
                 $filter = new \Twig_SimpleFilter(
297
-                    'ucFirst', function ($value) {
297
+                    'ucFirst', function($value) {
298 298
                     return ucfirst($value);
299 299
                 }
300 300
                 );
301 301
                 $twig->addFilter($filter);
302 302
                 $filter = new \Twig_SimpleFilter(
303
-                    'lcFirst', function ($value) {
303
+                    'lcFirst', function($value) {
304 304
                     return lcfirst($value);
305 305
                 }
306 306
                 );
Please login to merge, or discard this patch.
lib/Sql/PreserverTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
157 157
         $mess = implode(',', $columns);
158 158
         if (512 < strlen($mess)) {
159
-            $mess = substr($mess, 0, 512) . '...';
159
+            $mess = substr($mess, 0, 512).'...';
160 160
         }
161 161
         $this->getYem()
162 162
             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess);
@@ -212,13 +212,13 @@  discard block
 block discarded – undo
212 212
                 $columnDefaults[$columnName] = (string)$element;
213 213
             }
214 214
         }
215
-        $required = array_reduce($columnDefaults, function ($carry, $item) {
215
+        $required = array_reduce($columnDefaults, function($carry, $item) {
216 216
             return $carry + (int)(null === $item);
217 217
         }, 0);
218 218
         if ($required > $eleCount) {
219 219
             return $this;
220 220
         }
221
-        uksort($columnDefaults, function ($alpha, $beta) {
221
+        uksort($columnDefaults, function($alpha, $beta) {
222 222
             $alpha = strtolower($alpha);
223 223
             $beta = strtolower($beta);
224 224
             if ($alpha < $beta) {
Please login to merge, or discard this patch.
lib/EveApi/Creator.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
      */
144 144
     protected function getNamespace()
145 145
     {
146
-        return 'Yapeal\EveApi\\' . ucfirst($this->sectionName);
146
+        return 'Yapeal\EveApi\\'.ucfirst($this->sectionName);
147 147
     }
148 148
     /**
149 149
      * Used to determine if API is in section that has an owner.
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
             if ($this->hasOwner()) {
210 210
                 $attributes['ownerID'] = '$ownerID';
211 211
             }
212
-            uksort($attributes, function ($alpha, $beta) {
212
+            uksort($attributes, function($alpha, $beta) {
213 213
                 $alpha = strtolower($alpha);
214 214
                 $beta = strtolower($beta);
215 215
                 if ($alpha < $beta) {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
         if ($this->hasOwner()) {
252 252
             $values['ownerID'] = '$ownerID';
253 253
         }
254
-        uksort($values, function ($alpha, $beta) {
254
+        uksort($values, function($alpha, $beta) {
255 255
             $alpha = strtolower($alpha);
256 256
             $beta = strtolower($beta);
257 257
             if ($alpha < $beta) {
Please login to merge, or discard this patch.
lib/Configuration/XsdWiring.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,19 +50,19 @@  discard block
 block discarded – undo
50 50
     public function wire(ContainerInterface $dic)
51 51
     {
52 52
         if (empty($dic['Yapeal.Xsd.Creator'])) {
53
-            $dic['Yapeal.Xsd.Creator'] = function () use ($dic) {
53
+            $dic['Yapeal.Xsd.Creator'] = function() use ($dic) {
54 54
                     $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Xsd.dir']);
55 55
                     $twig = new \Twig_Environment(
56 56
                         $loader, ['debug' => true, 'strict_variables' => true, 'autoescape' => false]
57 57
                     );
58 58
                     $filter = new \Twig_SimpleFilter(
59
-                        'ucFirst', function ($value) {
59
+                        'ucFirst', function($value) {
60 60
                         return ucfirst($value);
61 61
                     }
62 62
                     );
63 63
                     $twig->addFilter($filter);
64 64
                     $filter = new \Twig_SimpleFilter(
65
-                        'lcFirst', function ($value) {
65
+                        'lcFirst', function($value) {
66 66
                         return lcfirst($value);
67 67
                     }
68 68
                     );
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
                 };
79 79
         }
80 80
         if (empty($dic['Yapeal.Xsd.Validator'])) {
81
-            $dic['Yapeal.Xsd.Validator'] = function () use ($dic) {
81
+            $dic['Yapeal.Xsd.Validator'] = function() use ($dic) {
82 82
                     return new $dic['Yapeal.Xsd.validate']($dic['Yapeal.Xsd.dir']);
83 83
                 };
84 84
         }
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,13 +51,13 @@
 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
-            $dic['Yapeal.Xml.Error.Subscriber'] = function () use ($dic) {
60
+            $dic['Yapeal.Xml.Error.Subscriber'] = function() use ($dic) {
61 61
                     return new $dic['Yapeal.Xml.Handlers.error']();
62 62
                 };
63 63
         }
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
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     public function wire(ContainerInterface $dic)
51 51
     {
52 52
         if (empty($dic['Yapeal.Xsl.Transformer'])) {
53
-            $dic['Yapeal.Xsl.Transformer'] = function () use ($dic) {
53
+            $dic['Yapeal.Xsl.Transformer'] = function() use ($dic) {
54 54
                     return new $dic['Yapeal.Xsl.transform']($dic['Yapeal.Xsl.dir']);
55 55
                 };
56 56
         }
Please login to merge, or discard this patch.
lib/Configuration/SqlWiring.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     public function wire(ContainerInterface $dic)
53 53
     {
54 54
         if (empty($dic['Yapeal.Sql.CommonQueries'])) {
55
-            $dic['Yapeal.Sql.CommonQueries'] = function ($dic) {
55
+            $dic['Yapeal.Sql.CommonQueries'] = function($dic) {
56 56
                 return new $dic['Yapeal.Sql.sharedSql']($dic['Yapeal.Sql.database'], $dic['Yapeal.Sql.tablePrefix']);
57 57
             };
58 58
         }
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
             return $this;
61 61
         }
62 62
         if ('mysql' !== $dic['Yapeal.Sql.platform']) {
63
-            $mess = 'Unknown platform, was given ' . $dic['Yapeal.Sql.platform'];
63
+            $mess = 'Unknown platform, was given '.$dic['Yapeal.Sql.platform'];
64 64
             throw new YapealDatabaseException($mess);
65 65
         }
66
-        $dic['Yapeal.Sql.Connection'] = function ($dic) {
67
-            $dsn = $dic['Yapeal.Sql.platform'] . ':host=' . $dic['Yapeal.Sql.hostName'] . ';charset=utf8mb4';
66
+        $dic['Yapeal.Sql.Connection'] = function($dic) {
67
+            $dsn = $dic['Yapeal.Sql.platform'].':host='.$dic['Yapeal.Sql.hostName'].';charset=utf8mb4';
68 68
             if (!empty($dic['Yapeal.Sql.port'])) {
69
-                $dsn .= ';port=' . $dic['Yapeal.Sql.port'];
69
+                $dsn .= ';port='.$dic['Yapeal.Sql.port'];
70 70
             }
71 71
             /**
72 72
              * @var \PDO $database
@@ -78,19 +78,19 @@  discard block
 block discarded – undo
78 78
             $database->exec('SET SESSION TIME_ZONE=\'+00:00\'');
79 79
             $database->exec('SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci');
80 80
             $database->exec('SET COLLATION_CONNECTION=utf8mb4_unicode_520_ci');
81
-            $database->exec('SET DEFAULT_STORAGE_ENGINE=' . $dic['Yapeal.Sql.engine']);
81
+            $database->exec('SET DEFAULT_STORAGE_ENGINE='.$dic['Yapeal.Sql.engine']);
82 82
             return $database;
83 83
         };
84 84
         if (empty($dic['Yapeal.Sql.Creator'])) {
85
-            $dic['Yapeal.Sql.Creator'] = function () use ($dic) {
85
+            $dic['Yapeal.Sql.Creator'] = function() use ($dic) {
86 86
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Sql.dir']);
87 87
                 $twig = new \Twig_Environment($loader,
88 88
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
89
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
89
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
90 90
                     return ucfirst($value);
91 91
                 });
92 92
                 $twig->addFilter($filter);
93
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
93
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
94 94
                     return lcfirst($value);
95 95
                 });
96 96
                 $twig->addFilter($filter);
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.