Completed
Push — master ( 31b5db...524ecf )
by Michael
03:26
created
lib/Console/Command/YapealAutoMagic.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains class YapealAutoMagic.
5 5
  *
Please login to merge, or discard this patch.
lib/Console/Command/DatabaseUpdater.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains DatabaseUpdater class.
5 5
  *
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     protected function getUpdateFileList(OutputInterface $output)
153 153
     {
154 154
         $fileNames = [];
155
-        $path = $this->getDic()['Yapeal.Sql.dir'] . 'updates/';
155
+        $path = $this->getDic()['Yapeal.Sql.dir'].'updates/';
156 156
         if (!is_readable($path) || !is_dir($path)) {
157 157
             $mess = sprintf('<info>Could NOT access update directory %1$s</info>',
158 158
                 $path);
@@ -235,8 +235,8 @@  discard block
 block discarded – undo
235 235
                 ->execute([$updateVersion]);
236 236
             $pdo->commit();
237 237
         } catch (\PDOException $exc) {
238
-            $mess = $sql . PHP_EOL;
239
-            $mess .= sprintf('Database error message was %s', $exc->getMessage()) . PHP_EOL;
238
+            $mess = $sql.PHP_EOL;
239
+            $mess .= sprintf('Database error message was %s', $exc->getMessage()).PHP_EOL;
240 240
             $mess .= sprintf('Database "version" update failed for %1$s',
241 241
                 $updateVersion);
242 242
             if ($this->getPdo()
Please login to merge, or discard this patch.
lib/Console/Command/EveApiCreatorTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains EveApiCreatorTrait trait.
5 5
  *
@@ -111,8 +111,8 @@  discard block
 block discarded – undo
111 111
         );
112 112
         $dir = $this->getDir();
113 113
         foreach ($templateNames as $templateName) {
114
-            if (is_file($dir . $templateName)) {
115
-                return $dir . $templateName;
114
+            if (is_file($dir.$templateName)) {
115
+                return $dir.$templateName;
116 116
             }
117 117
         }
118 118
         return false;
Please login to merge, or discard this patch.
lib/Xml/EveApiReadWriteInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains EveApiReadWriteInterface Interface.
5 5
  *
Please login to merge, or discard this patch.
lib/Xml/ErrorCacheIntervalSubscriber.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains class ErrorCacheIntervalSubscriber.
5 5
  *
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
         }
82 82
         if ($code < 200) {
83 83
             if (false !== strpos($mess, 'retry after')) {
84
-                $data->setCacheInterval(strtotime(substr($mess, -19) . '+00:00') - time());
84
+                $data->setCacheInterval(strtotime(substr($mess, -19).'+00:00') - time());
85 85
             }
86 86
             $yem->triggerLogEvent('Yapeal.Log.log', Logger::WARNING,
87 87
                 $this->createEventMessage($mess, $data, $eventName));
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $data->setCacheInterval(300);
99 99
         }
100 100
         $apiName = $data->getEveApiName();
101
-        $data->setEveApiName('Error_' . $apiName);
101
+        $data->setEveApiName('Error_'.$apiName);
102 102
         // Cache error XML.
103 103
         $this->emitEvents($data, 'preserve', 'Yapeal.Xml.Error');
104 104
         $data->setEveApiName($apiName);
Please login to merge, or discard this patch.
lib/Xml/EveApiXmlData.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains EveApiXmlData class.
5 5
  *
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
             return $this;
59 59
         }
60 60
         if (!is_string($name)) {
61
-            $mess = 'Name MUST be string but was given ' . gettype($name);
61
+            $mess = 'Name MUST be string but was given '.gettype($name);
62 62
             throw new InvalidArgumentException($mess);
63 63
         }
64 64
         $this->eveApiArguments[$name] = (string)$value;
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
     {
91 91
         $name = (string)$name;
92 92
         if (!array_key_exists($name, $this->eveApiArguments)) {
93
-            $mess = 'Unknown argument ' . $name;
93
+            $mess = 'Unknown argument '.$name;
94 94
             throw new DomainException($mess);
95 95
         }
96 96
         return $this->eveApiArguments[$name];
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
      */
153 153
     public function getHash()
154 154
     {
155
-        $hash = $this->getEveApiName() . $this->getEveApiSectionName();
155
+        $hash = $this->getEveApiName().$this->getEveApiSectionName();
156 156
         $arguments = $this->getEveApiArguments();
157 157
         if (!in_array($this->getEveApiName(), ['accountBalance', 'walletJournal', 'walletTransactions'], true)) {
158 158
             unset($arguments['accountKey']);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
         unset($arguments['mask'], $arguments['rowCount']);
161 161
         ksort($arguments);
162 162
         foreach ($arguments as $key => $value) {
163
-            $hash .= $key . $value;
163
+            $hash .= $key.$value;
164 164
         }
165 165
         return hash('md5', $hash);
166 166
     }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     public function setEveApiName($value)
231 231
     {
232 232
         if (!is_string($value)) {
233
-            $mess = 'Name MUST be string but was given ' . gettype($value);
233
+            $mess = 'Name MUST be string but was given '.gettype($value);
234 234
             throw new InvalidArgumentException($mess);
235 235
         }
236 236
         $this->eveApiName = $value;
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
     public function setEveApiSectionName($value)
248 248
     {
249 249
         if (!is_string($value)) {
250
-            $mess = 'Section name MUST be string but was given ' . gettype($value);
250
+            $mess = 'Section name MUST be string but was given '.gettype($value);
251 251
             throw new InvalidArgumentException($mess);
252 252
         }
253 253
         $this->eveApiSectionName = $value;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
             $xml = '';
268 268
         }
269 269
         if (!is_string($xml)) {
270
-            $mess = 'Xml MUST be string but was given ' . gettype($xml);
270
+            $mess = 'Xml MUST be string but was given '.gettype($xml);
271 271
             throw new InvalidArgumentException($mess);
272 272
         }
273 273
         $this->eveApiXml = $xml;
Please login to merge, or discard this patch.
lib/Configuration/EveApiWiring.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
                     basename(dirname($listener)),
68 68
                     basename($listener, '.php'));
69 69
                 if (empty($dic[$service])) {
70
-                    $dic[$service] = function () use ($dic, $service) {
71
-                        $class = '\\' . str_replace('.', '\\', $service);
70
+                    $dic[$service] = function() use ($dic, $service) {
71
+                        $class = '\\'.str_replace('.', '\\', $service);
72 72
                         /**
73 73
                          * @var \Yapeal\CommonToolsInterface $callable
74 74
                          */
@@ -84,9 +84,9 @@  discard block
 block discarded – undo
84 84
                         return $callable;
85 85
                     };
86 86
                 }
87
-                $mediator->addServiceListener($service . '.start', [$service, 'startEveApi'], 'last');
87
+                $mediator->addServiceListener($service.'.start', [$service, 'startEveApi'], 'last');
88 88
                 if (false === strpos($listener, 'Section')) {
89
-                    $mediator->addServiceListener($service . '.preserve', [$service, 'preserveEveApi'], 'last');
89
+                    $mediator->addServiceListener($service.'.preserve', [$service, 'preserveEveApi'], 'last');
90 90
                 }
91 91
             }
92 92
         }
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         $rdi->setFlags($flags);
108 108
         /** @noinspection SpellCheckingInspection */
109 109
         $rcfi = new \RecursiveCallbackFilterIterator($rdi,
110
-            function (\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
110
+            function(\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
111 111
                 if ($rdi->hasChildren()) {
112 112
                     return true;
113 113
                 }
@@ -134,15 +134,15 @@  discard block
 block discarded – undo
134 134
     private function wireCreator(ContainerInterface $dic, MediatorInterface $mediator)
135 135
     {
136 136
         if (empty($dic['Yapeal.EveApi.Creator'])) {
137
-            $dic['Yapeal.EveApi.Creator'] = function () use ($dic) {
137
+            $dic['Yapeal.EveApi.Creator'] = function() use ($dic) {
138 138
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.EveApi.dir']);
139 139
                 $twig = new \Twig_Environment($loader,
140 140
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
141
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
141
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
142 142
                     return ucfirst($value);
143 143
                 });
144 144
                 $twig->addFilter($filter);
145
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
145
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
146 146
                     return lcfirst($value);
147 147
                 });
148 148
                 $twig->addFilter($filter);
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,15 +50,15 @@  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($loader,
56 56
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
57
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
57
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
58 58
                     return ucfirst($value);
59 59
                 });
60 60
                 $twig->addFilter($filter);
61
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
61
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
62 62
                     return lcfirst($value);
63 63
                 });
64 64
                 $twig->addFilter($filter);
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
             };
74 74
         }
75 75
         if (empty($dic['Yapeal.Xsd.Validator'])) {
76
-            $dic['Yapeal.Xsd.Validator'] = function () use ($dic) {
76
+            $dic['Yapeal.Xsd.Validator'] = function() use ($dic) {
77 77
                 return new $dic['Yapeal.Xsd.Handlers.validate']($dic['Yapeal.Xsd.dir']);
78 78
             };
79 79
         }
Please login to merge, or discard this patch.
lib/Configuration/ErrorWiring.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-declare(strict_types=1);
2
+declare(strict_types = 1);
3 3
 /**
4 4
  * Contains class ErrorWiring.
5 5
  *
@@ -49,12 +49,12 @@  discard block
 block discarded – undo
49 49
     public function wire(ContainerInterface $dic)
50 50
     {
51 51
         if (empty($dic['Yapeal.Error.Strategy'])) {
52
-            $dic['Yapeal.Error.Strategy'] = function () use ($dic) {
52
+            $dic['Yapeal.Error.Strategy'] = function() use ($dic) {
53 53
                 return new $dic['Yapeal.Error.Handlers.strategy']((int)$dic['Yapeal.Error.threshold']);
54 54
             };
55 55
         }
56 56
         if (empty($dic['Yapeal.Error.Logger'])) {
57
-            $dic['Yapeal.Error.Logger'] = function () use ($dic) {
57
+            $dic['Yapeal.Error.Logger'] = function() use ($dic) {
58 58
                 /**
59 59
                  * @var Logger $logger
60 60
                  */
Please login to merge, or discard this patch.