Completed
Push — master ( 82874d...cc7fe7 )
by Michael
02:53
created
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/XmlWiring.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.Xml.Data'])) {
53
-            $dic['Yapeal.Xml.Data'] = $dic->factory(function ($dic) {
53
+            $dic['Yapeal.Xml.Data'] = $dic->factory(function($dic) {
54 54
                 return new $dic['Yapeal.Xml.Handlers.data']();
55 55
             });
56 56
         }
57 57
         if (empty($dic['Yapeal.Xml.Error.Subscriber'])) {
58
-            $dic['Yapeal.Xml.Error.Subscriber'] = function () use ($dic) {
58
+            $dic['Yapeal.Xml.Error.Subscriber'] = function() use ($dic) {
59 59
                 return new $dic['Yapeal.Xml.Handlers.error']();
60 60
             };
61 61
         }
Please login to merge, or discard this patch.
lib/Configuration/Wiring.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
          * @var WiringInterface $class
103 103
          */
104 104
         foreach ($names as $name) {
105
-            $setting = $base . strtolower($name);
105
+            $setting = $base.strtolower($name);
106 106
             if (!empty($dic[$setting])
107 107
                 && is_subclass_of($dic[$setting], '\\Yapeal\\Configuration\\WiringInterface', true)
108 108
             ) {
@@ -110,11 +110,11 @@  discard block
 block discarded – undo
110 110
                 $class->wire($dic);
111 111
                 continue;
112 112
             }
113
-            $methodName = 'wire' . $name;
113
+            $methodName = 'wire'.$name;
114 114
             if (method_exists($this, $methodName)) {
115 115
                 $this->$methodName();
116 116
             } else {
117
-                $mess = 'Could NOT find class or method for ' . $name;
117
+                $mess = 'Could NOT find class or method for '.$name;
118 118
                 throw new \LogicException($mess);
119 119
             }
120 120
         }
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $dic = $this->dic;
138 138
         do {
139 139
             $settings = preg_replace_callback($regEx,
140
-                function ($match) use ($settings, $dic) {
140
+                function($match) use ($settings, $dic) {
141 141
                     if (!empty($settings[$match['name']])) {
142 142
                         return $settings[$match['name']];
143 143
                     }
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
             if (PREG_NO_ERROR !== $lastError) {
158 158
                 $constants = array_flip(get_defined_constants(true)['pcre']);
159 159
                 $lastError = $constants[$lastError];
160
-                $mess = 'Received preg error ' . $lastError;
160
+                $mess = 'Received preg error '.$lastError;
161 161
                 throw new \DomainException($mess);
162 162
             }
163 163
         } while ($count > 0);
@@ -177,16 +177,16 @@  discard block
 block discarded – undo
177 177
             $dic['Yapeal.baseDir'] = $path;
178 178
         }
179 179
         if (empty($dic['Yapeal.libDir'])) {
180
-            $dic['Yapeal.libDir'] = $path . 'lib/';
180
+            $dic['Yapeal.libDir'] = $path.'lib/';
181 181
         }
182 182
         $configFiles = [
183
-            $fpn->normalizeFile(__DIR__ . '/yapeal_defaults.yaml'),
184
-            $fpn->normalizeFile($dic['Yapeal.baseDir'] . 'config/yapeal.yaml')
183
+            $fpn->normalizeFile(__DIR__.'/yapeal_defaults.yaml'),
184
+            $fpn->normalizeFile($dic['Yapeal.baseDir'].'config/yapeal.yaml')
185 185
         ];
186 186
         $vendorPos = strpos($path, 'vendor/');
187 187
         if (false !== $vendorPos) {
188 188
             $dic['Yapeal.vendorParentDir'] = substr($path, 0, $vendorPos);
189
-            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml');
189
+            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'].'config/yapeal.yaml');
190 190
         }
191 191
         $settings = [];
192 192
         // Process each file in turn so any substitutions are done in a more
Please login to merge, or discard this patch.
lib/Xml/EveApiXmlData.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     public function getEveApiArgument(string $name): string
78 78
     {
79 79
         if (!array_key_exists($name, $this->eveApiArguments)) {
80
-            $mess = 'Unknown argument ' . $name;
80
+            $mess = 'Unknown argument '.$name;
81 81
             throw new \DomainException($mess);
82 82
         }
83 83
         return $this->eveApiArguments[$name];
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
      */
140 140
     public function getHash(): string
141 141
     {
142
-        $hash = $this->getEveApiName() . $this->getEveApiSectionName();
142
+        $hash = $this->getEveApiName().$this->getEveApiSectionName();
143 143
         $arguments = $this->getEveApiArguments();
144 144
         if (!in_array($this->getEveApiName(), ['accountBalance', 'walletJournal', 'walletTransactions'], true)) {
145 145
             unset($arguments['accountKey']);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         unset($arguments['mask'], $arguments['rowCount']);
148 148
         ksort($arguments);
149 149
         foreach ($arguments as $key => $value) {
150
-            $hash .= $key . $value;
150
+            $hash .= $key.$value;
151 151
         }
152 152
         return hash('md5', $hash);
153 153
     }
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
     public function setEveApiName(string $value)
218 218
     {
219 219
         if (!is_string($value)) {
220
-            $mess = 'Name MUST be string but was given ' . gettype($value);
220
+            $mess = 'Name MUST be string but was given '.gettype($value);
221 221
             throw new \InvalidArgumentException($mess);
222 222
         }
223 223
         $this->eveApiName = $value;
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
     public function setEveApiSectionName(string $value)
235 235
     {
236 236
         if (!is_string($value)) {
237
-            $mess = 'Section name MUST be string but was given ' . gettype($value);
237
+            $mess = 'Section name MUST be string but was given '.gettype($value);
238 238
             throw new \InvalidArgumentException($mess);
239 239
         }
240 240
         $this->eveApiSectionName = $value;
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
             $xml = '';
255 255
         }
256 256
         if (!is_string($xml)) {
257
-            $mess = 'Xml MUST be string but was given ' . gettype($xml);
257
+            $mess = 'Xml MUST be string but was given '.gettype($xml);
258 258
             throw new \InvalidArgumentException($mess);
259 259
         }
260 260
         $this->eveApiXml = $xml;
Please login to merge, or discard this patch.
lib/Sql/SqlSubsTrait.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
         $statements = explode("\n", $sql);
71 71
         // Filter out non-sql lines like comments and blank lines.
72 72
         $statements = array_filter($statements,
73
-            function ($statement) {
73
+            function($statement) {
74 74
                 /** @noinspection IfReturnReturnSimplificationInspection */
75 75
                 if (0 === strpos($statement, '-- ')
76 76
                     || '' === trim($statement)
@@ -92,9 +92,9 @@  discard block
 block discarded – undo
92 92
     protected function getSqlSubs(ContainerInterface $dic)
93 93
     {
94 94
         $keys = $dic->keys();
95
-        $platform = '.' . $dic['Yapeal.Sql.platform'];
95
+        $platform = '.'.$dic['Yapeal.Sql.platform'];
96 96
         $filteredKeys = array_filter($keys,
97
-            function ($key) use ($platform) {
97
+            function($key) use ($platform) {
98 98
                 $classes = ['Yapeal.Sql.CommonQueries', 'Yapeal.Sql.Connection', 'Yapeal.Sql.Creator'];
99 99
                 $isPlatform = false !== strpos($key, $platform);
100 100
                 $hasPlatforms = false !== strpos($key, 'Platforms.');
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
             });
107 107
         $replacements = [];
108 108
         foreach ($filteredKeys as $key) {
109
-            $subName = '{' . substr($key, strrpos($key, '.') + 1) . '}';
109
+            $subName = '{'.substr($key, strrpos($key, '.') + 1).'}';
110 110
             $replacements[$subName] = $dic[$key];
111 111
         }
112 112
         return $replacements;
Please login to merge, or discard this patch.
lib/Configuration/SqlWiring.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     public function wire(ContainerInterface $dic)
55 55
     {
56 56
         if (empty($dic['Yapeal.Sql.CommonQueries'])) {
57
-            $dic['Yapeal.Sql.CommonQueries'] = function ($dic) {
57
+            $dic['Yapeal.Sql.CommonQueries'] = function($dic) {
58 58
                 /**
59 59
                  * @var CommonSqlQueries $csq
60 60
                  */
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
     {
78 78
         if (empty($dic['Yapeal.Sql.Connection'])) {
79 79
             $replacements = $this->getSqlSubs($dic);
80
-            $dic['Yapeal.Sql.Connection'] = function () use ($dic, $replacements) {
80
+            $dic['Yapeal.Sql.Connection'] = function() use ($dic, $replacements) {
81 81
                 $dsn = $replacements['{dsn}'];
82 82
                 $dsn = str_replace(array_keys($replacements), array_values($replacements), $dsn);
83 83
                 /**
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
     private function wireCreator(ContainerInterface $dic)
104 104
     {
105 105
         if (empty($dic['Yapeal.Sql.Creator'])) {
106
-            $dic['Yapeal.Sql.Creator'] = function () use ($dic) {
106
+            $dic['Yapeal.Sql.Creator'] = function() use ($dic) {
107 107
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Sql.dir']);
108 108
                 $twig = new \Twig_Environment($loader,
109 109
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
110
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
110
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
111 111
                     return ucfirst($value);
112 112
                 });
113 113
                 $twig->addFilter($filter);
114
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
114
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
115 115
                     return lcfirst($value);
116 116
                 });
117 117
                 $twig->addFilter($filter);
Please login to merge, or discard this patch.
lib/Configuration/EventWiring.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -49,17 +49,17 @@
 block discarded – undo
49 49
     public function wire(ContainerInterface $dic)
50 50
     {
51 51
         if (empty($dic['Yapeal.Event.EveApiEvent'])) {
52
-            $dic['Yapeal.Event.EveApi'] = $dic->factory(function ($dic) {
52
+            $dic['Yapeal.Event.EveApi'] = $dic->factory(function($dic) {
53 53
                 return new $dic['Yapeal.Event.Factories.eveApi']();
54 54
             });
55 55
         }
56 56
         if (empty($dic['Yapeal.Event.LogEvent'])) {
57
-            $dic['Yapeal.Event.LogEvent'] = $dic->factory(function ($dic) {
57
+            $dic['Yapeal.Event.LogEvent'] = $dic->factory(function($dic) {
58 58
                 return new $dic['Yapeal.Event.Factories.log'];
59 59
             });
60 60
         }
61 61
         if (empty($dic['Yapeal.Event.Mediator'])) {
62
-            $dic['Yapeal.Event.Mediator'] = function ($dic) {
62
+            $dic['Yapeal.Event.Mediator'] = function($dic) {
63 63
                 return new $dic['Yapeal.Event.Handlers.mediator']($dic);
64 64
             };
65 65
         }
Please login to merge, or discard this patch.
lib/EveApi/Char/IndustryJobs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
         }
77 77
         $data = $event->getData();
78 78
         $apiName = $data->getEveApiName();
79
-        $data->setEveApiName($apiName . 'History');
79
+        $data->setEveApiName($apiName.'History');
80 80
         // Insure history has already been updated first so current data overwrites old data.
81 81
         $this->emitEvents($data, 'start');
82 82
         $data->setEveApiName($apiName)
Please login to merge, or discard this patch.
lib/FileSystem/CommonFileHandlingTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
         if (false === $this->deleteWithRetry($pathFile)) {
78 78
             return false;
79 79
         }
80
-        $tmpFile = sprintf('%1$s/%2$s.tmp', $path, hash('sha1', $baseFile . microtime()));
80
+        $tmpFile = sprintf('%1$s/%2$s.tmp', $path, hash('sha1', $baseFile.microtime()));
81 81
         if (false === $this->safeDataWrite($data, $tmpFile)) {
82 82
             return false;
83 83
         }
Please login to merge, or discard this patch.