Completed
Push — master ( 2d4410...211342 )
by Michael
05:20
created
lib/Container/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -87,7 +87,7 @@
 block discarded – undo
87 87
             throw new \InvalidArgumentException('Extension service definition is not a Closure or invokable object.');
88 88
         }
89 89
         $factory = $this->values[$id];
90
-        $extended = function ($c) use ($callable, $factory) {
90
+        $extended = function($c) use ($callable, $factory) {
91 91
             return $callable($factory($c), $c);
92 92
         };
93 93
         if (isset($this->factories[$factory])) {
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/Sql/PreserverTrait.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
             ->triggerLogEvent('Yapeal.Log.log', Logger::INFO, $mess);
170 170
         $mess = implode(',', $columns);
171 171
         if (512 < strlen($mess)) {
172
-            $mess = substr($mess, 0, 512) . '...';
172
+            $mess = substr($mess, 0, 512).'...';
173 173
         }
174 174
         $this->getYem()
175 175
             ->triggerLogEvent('Yapeal.Log.log', Logger::DEBUG, $mess);
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
             }
227 227
         }
228 228
         $required = array_reduce($columnDefaults,
229
-            function ($carry, $item) {
229
+            function($carry, $item) {
230 230
                 return $carry + (int)(null === $item);
231 231
             },
232 232
             0);
@@ -234,7 +234,7 @@  discard block
 block discarded – undo
234 234
             return $this;
235 235
         }
236 236
         uksort($columnDefaults,
237
-            function ($alpha, $beta) {
237
+            function($alpha, $beta) {
238 238
                 $alpha = strtolower($alpha);
239 239
                 $beta = strtolower($beta);
240 240
                 if ($alpha < $beta) {
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
          * @var WiringInterface $class
107 107
          */
108 108
         foreach ($names as $name) {
109
-            $setting = $base . strtolower($name);
109
+            $setting = $base.strtolower($name);
110 110
             if (!empty($dic[$setting])
111 111
                 && is_subclass_of($dic[$setting], '\\Yapeal\\Configuration\\WiringInterface', true)
112 112
             ) {
@@ -114,11 +114,11 @@  discard block
 block discarded – undo
114 114
                 $class->wire($dic);
115 115
                 continue;
116 116
             }
117
-            $methodName = 'wire' . $name;
117
+            $methodName = 'wire'.$name;
118 118
             if (method_exists($this, $methodName)) {
119 119
                 $this->$methodName();
120 120
             } else {
121
-                $mess = 'Could NOT find class or method for ' . $name;
121
+                $mess = 'Could NOT find class or method for '.$name;
122 122
                 throw new \LogicException($mess);
123 123
             }
124 124
         }
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
         $dic = $this->dic;
142 142
         do {
143 143
             $settings = preg_replace_callback($regEx,
144
-                function ($match) use ($settings, $dic) {
144
+                function($match) use ($settings, $dic) {
145 145
                     if (!empty($settings[$match['name']])) {
146 146
                         return $settings[$match['name']];
147 147
                     }
@@ -161,7 +161,7 @@  discard block
 block discarded – undo
161 161
             if (PREG_NO_ERROR !== $lastError) {
162 162
                 $constants = array_flip(get_defined_constants(true)['pcre']);
163 163
                 $lastError = $constants[$lastError];
164
-                $mess = 'Received preg error ' . $lastError;
164
+                $mess = 'Received preg error '.$lastError;
165 165
                 throw new \DomainException($mess);
166 166
             }
167 167
         } while ($count > 0);
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         $rdi->setFlags($flags);
181 181
         /** @noinspection SpellCheckingInspection */
182 182
         $rcfi = new \RecursiveCallbackFilterIterator($rdi,
183
-            function (\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
183
+            function(\SplFileInfo $current, $key, \RecursiveDirectoryIterator $rdi) {
184 184
                 if ($rdi->hasChildren()) {
185 185
                     return true;
186 186
                 }
@@ -214,16 +214,16 @@  discard block
 block discarded – undo
214 214
             $dic['Yapeal.baseDir'] = $path;
215 215
         }
216 216
         if (empty($dic['Yapeal.libDir'])) {
217
-            $dic['Yapeal.libDir'] = $path . 'lib/';
217
+            $dic['Yapeal.libDir'] = $path.'lib/';
218 218
         }
219 219
         $configFiles = [
220
-            $fpn->normalizeFile(__DIR__ . '/yapeal_defaults.yaml'),
221
-            $fpn->normalizeFile($dic['Yapeal.baseDir'] . 'config/yapeal.yaml')
220
+            $fpn->normalizeFile(__DIR__.'/yapeal_defaults.yaml'),
221
+            $fpn->normalizeFile($dic['Yapeal.baseDir'].'config/yapeal.yaml')
222 222
         ];
223 223
         $vendorPos = strpos($path, 'vendor/');
224 224
         if (false !== $vendorPos) {
225 225
             $dic['Yapeal.vendorParentDir'] = substr($path, 0, $vendorPos);
226
-            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'] . 'config/yapeal.yaml');
226
+            $configFiles[] = $fpn->normalizeFile($dic['Yapeal.vendorParentDir'].'config/yapeal.yaml');
227 227
         }
228 228
         $settings = [];
229 229
         // Process each file in turn so any substitutions are done in a more
@@ -269,8 +269,8 @@  discard block
 block discarded – undo
269 269
                     basename(dirname($subscriber)),
270 270
                     basename($subscriber, '.php'));
271 271
                 if (!isset($dic[$service])) {
272
-                    $dic[$service] = function () use ($dic, $service) {
273
-                        $class = '\\' . str_replace('.', '\\', $service);
272
+                    $dic[$service] = function() use ($dic, $service) {
273
+                        $class = '\\'.str_replace('.', '\\', $service);
274 274
                         /**
275 275
                          * @var \Yapeal\CommonToolsInterface|\Yapeal\Event\EveApiPreserverInterface $callable
276 276
                          */
@@ -283,23 +283,23 @@  discard block
 block discarded – undo
283 283
                         return $callable;
284 284
                     };
285 285
                 }
286
-                $events = [$service . '.start' => ['startEveApi', 'last']];
286
+                $events = [$service.'.start' => ['startEveApi', 'last']];
287 287
                 if (false === strpos($subscriber, 'Section')) {
288
-                    $events[$service . '.preserve'] = ['preserveEveApi', 'last'];
288
+                    $events[$service.'.preserve'] = ['preserveEveApi', 'last'];
289 289
                 }
290 290
                 $mediator->addServiceSubscriberByEventList($service, $events);
291 291
             }
292 292
         }
293 293
         if (empty($dic['Yapeal.EveApi.Creator'])) {
294
-            $dic['Yapeal.EveApi.Creator'] = function () use ($dic) {
294
+            $dic['Yapeal.EveApi.Creator'] = function() use ($dic) {
295 295
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.EveApi.dir']);
296 296
                 $twig = new \Twig_Environment($loader,
297 297
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
298
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
298
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
299 299
                     return ucfirst($value);
300 300
                 });
301 301
                 $twig->addFilter($filter);
302
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
302
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
303 303
                     return lcfirst($value);
304 304
                 });
305 305
                 $twig->addFilter($filter);
Please login to merge, or discard this patch.
lib/Configuration/SqlWiring.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -52,17 +52,17 @@  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.Handlers.queries']($dic['Yapeal.Sql.database'],
57 57
                     $dic['Yapeal.Sql.tablePrefix']);
58 58
             };
59 59
         }
60 60
         if (empty($dic['Yapeal.Sql.Connection'])) {
61 61
             if ('mysql' !== $dic['Yapeal.Sql.platform']) {
62
-                $mess = 'Unknown platform, was given ' . $dic['Yapeal.Sql.platform'];
62
+                $mess = 'Unknown platform, was given '.$dic['Yapeal.Sql.platform'];
63 63
                 throw new YapealDatabaseException($mess);
64 64
             }
65
-            $dic['Yapeal.Sql.Connection'] = function ($dic) {
65
+            $dic['Yapeal.Sql.Connection'] = function($dic) {
66 66
                 $dsn = '%1$s:host=%2$s;charset=utf8mb4';
67 67
                 $subs = [$dic['Yapeal.Sql.platform'], $dic['Yapeal.Sql.hostName']];
68 68
                 if (!empty($dic['Yapeal.Sql.port'])) {
@@ -81,20 +81,20 @@  discard block
 block discarded – undo
81 81
                 $database->exec('SET SESSION TIME_ZONE=\'+00:00\'');
82 82
                 $database->exec('SET NAMES utf8mb4 COLLATE utf8mb4_unicode_520_ci');
83 83
                 $database->exec('SET COLLATION_CONNECTION=utf8mb4_unicode_520_ci');
84
-                $database->exec('SET DEFAULT_STORAGE_ENGINE=' . $dic['Yapeal.Sql.engine']);
84
+                $database->exec('SET DEFAULT_STORAGE_ENGINE='.$dic['Yapeal.Sql.engine']);
85 85
                 return $database;
86 86
             };
87 87
         }
88 88
         if (empty($dic['Yapeal.Sql.Creator'])) {
89
-            $dic['Yapeal.Sql.Creator'] = function () use ($dic) {
89
+            $dic['Yapeal.Sql.Creator'] = function() use ($dic) {
90 90
                 $loader = new \Twig_Loader_Filesystem($dic['Yapeal.Sql.dir']);
91 91
                 $twig = new \Twig_Environment($loader,
92 92
                     ['debug' => true, 'strict_variables' => true, 'autoescape' => false]);
93
-                $filter = new \Twig_SimpleFilter('ucFirst', function ($value) {
93
+                $filter = new \Twig_SimpleFilter('ucFirst', function($value) {
94 94
                     return ucfirst($value);
95 95
                 });
96 96
                 $twig->addFilter($filter);
97
-                $filter = new \Twig_SimpleFilter('lcFirst', function ($value) {
97
+                $filter = new \Twig_SimpleFilter('lcFirst', function($value) {
98 98
                     return lcfirst($value);
99 99
                 });
100 100
                 $twig->addFilter($filter);
Please login to merge, or discard this patch.