Completed
Push — master ( 524ecf...598fe1 )
by Michael
02:48
created
lib/Console/Command/NetworkCache.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 NetworkCache class.
5 5
  *
@@ -136,12 +136,12 @@  discard block
 block discarded – undo
136 136
         $data->setEveApiName($apiName)
137 137
             ->setEveApiSectionName($sectionName)
138 138
             ->setEveApiArguments($posts);
139
-        $mess = 'Starting ' . $this->getName() . ' of';
139
+        $mess = 'Starting '.$this->getName().' of';
140 140
         $mess = $this->createEveApiMessage($mess, $data);
141 141
         $this->getYem()
142 142
             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
143 143
         if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) {
144
-            $output->writeln('<info>' . $mess . '</info>');
144
+            $output->writeln('<info>'.$mess.'</info>');
145 145
         }
146 146
         foreach (['retrieve', 'preserve'] as $eventName) {
147 147
             $this->emitEvents($data, $eventName, 'Yapeal.EveApi.Raw');
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
             $this->getYem()
153 153
                 ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
154 154
             if ($output::VERBOSITY_QUIET !== $output->getVerbosity()) {
155
-                $output->writeln('<error>' . $mess . '</error>');
155
+                $output->writeln('<error>'.$mess.'</error>');
156 156
             }
157 157
             return 2;
158 158
         }
Please login to merge, or discard this patch.
lib/Console/Command/DatabaseInitializer.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 DatabaseInitializer class.
5 5
  *
@@ -150,9 +150,9 @@  discard block
 block discarded – undo
150 150
             if ('Database' === $dir && $this->dropDatabase) {
151 151
                 // Add drop database file if requested.
152 152
                 $fileList[] = $this->getFpn()
153
-                    ->normalizeFile($path . $dir . '/DropDatabase.sql');
153
+                    ->normalizeFile($path.$dir.'/DropDatabase.sql');
154 154
             }
155
-            foreach (new \DirectoryIterator($path . $dir . '/') as $fileInfo) {
155
+            foreach (new \DirectoryIterator($path.$dir.'/') as $fileInfo) {
156 156
                 // Add file path if it's a sql create file.
157 157
                 if ($fileInfo->isFile()
158 158
                     && 'sql' === $fileInfo->getExtension()
Please login to merge, or discard this patch.
lib/Console/Command/AbstractDatabaseCommon.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 AbstractDatabaseCommon class.
5 5
  *
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
          */
121 121
         $statements = str_replace(array_keys($replacements), array_values($replacements), explode(';', $sqlStatements));
122 122
         // 5 is a 'magic' number that I think is shorter than any legal SQL statement.
123
-        $statements = array_filter($statements, function ($value) {
123
+        $statements = array_filter($statements, function($value) {
124 124
             return 5 <= strlen(trim($value));
125 125
         });
126 126
         $progress = null;
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
                     $progress->finish();
149 149
                     $output->writeln('');
150 150
                 }
151
-                $mess = $sql . PHP_EOL;
151
+                $mess = $sql.PHP_EOL;
152 152
                 $mess .= sprintf(
153 153
                     'Sql failed in %1$s on statement %2$s with (%3$s) %4$s',
154 154
                     $fileName,
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
         $base = 'Yapeal.Sql.';
184 184
         foreach (['class', 'database', 'hostName', 'password', 'platform', 'tablePrefix', 'userName'] as $option) {
185 185
             if (!empty($options[$option])) {
186
-                $dic[$base . $option] = $options[$option];
186
+                $dic[$base.$option] = $options[$option];
187 187
             }
188 188
         }
189 189
         return $this;
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/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.