Completed
Push — master ( 4fdcaf...4db8fc )
by Michael
03:27
created
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.
specs/Spec/Container/ContainerSpec.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -40,41 +40,41 @@  discard block
 block discarded – undo
40 40
     }
41 41
     public function itShouldAllowDefiningNewServiceAfterFreezingFirst()
42 42
     {
43
-        $this['foo'] = function () {
43
+        $this['foo'] = function() {
44 44
             return 'fooValue';
45 45
         };
46 46
         $this['foo'];
47
-        $this['bar'] = function () {
47
+        $this['bar'] = function() {
48 48
             return 'barValue';
49 49
         };
50 50
         $this['bar']->shouldReturn('barValue');
51 51
     }
52 52
     public function itShouldAllowExtendingNonFrozenService()
53 53
     {
54
-        $this['foo'] = function () {
54
+        $this['foo'] = function() {
55 55
             return 'foo';
56 56
         };
57 57
         $this['foo'] = $this->extend('foo',
58
-            function ($foo) {
58
+            function($foo) {
59 59
                 return "$foo.bar";
60 60
             });
61 61
         $this['foo'] = $this->extend('foo',
62
-            function ($foo) {
62
+            function($foo) {
63 63
                 return "$foo.baz";
64 64
             });
65 65
         $this['foo']->shouldReturn('foo.bar.baz');
66 66
     }
67 67
     public function itShouldAllowExtendingOtherServiceAfterFreezingFirst()
68 68
     {
69
-        $this['foo'] = function () {
69
+        $this['foo'] = function() {
70 70
             return 'foo';
71 71
         };
72
-        $this['bar'] = function () {
72
+        $this['bar'] = function() {
73 73
             return 'bar';
74 74
         };
75 75
         $this['foo'];
76 76
         $this['bar'] = $this->extend('bar',
77
-            function ($bar, $app) {
77
+            function($bar, $app) {
78 78
                 return "$bar.baz";
79 79
             });
80 80
         $this['bar']->shouldReturn('bar.baz');
@@ -89,19 +89,19 @@  discard block
 block discarded – undo
89 89
     }
90 90
     public function itShouldAllowRemovingFrozenServiceAndThenSettingAgain()
91 91
     {
92
-        $this['foo'] = function () {
92
+        $this['foo'] = function() {
93 93
             return 'fooValue';
94 94
         };
95 95
         $this['foo'];
96 96
         unset($this['foo']);
97
-        $this['foo'] = function () {
97
+        $this['foo'] = function() {
98 98
             return 'barValue';
99 99
         };
100 100
     }
101 101
     public function itShouldAlsoUnsetKeyWhenUnsettingOffsets()
102 102
     {
103 103
         $this['param'] = 'value';
104
-        $this['service'] = function () {
104
+        $this['service'] = function() {
105 105
             return new MockService();
106 106
         };
107 107
         $this->keys()
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
     public function itShouldNotInvokeProtectedServices()
145 145
     {
146 146
         $services = [
147
-            function ($value) {
147
+            function($value) {
148 148
                 $service = new MockService();
149 149
                 $service->value = $value;
150 150
                 return $service;
@@ -158,10 +158,10 @@  discard block
 block discarded – undo
158 158
     }
159 159
     public function itShouldPassContainerAsParameter()
160 160
     {
161
-        $this['service'] = function () {
161
+        $this['service'] = function() {
162 162
             return new MockService();
163 163
         };
164
-        $this['container'] = function ($container) {
164
+        $this['container'] = function($container) {
165 165
             return $container;
166 166
         };
167 167
         $this['service']->shouldNotEqual($this);
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     }
170 170
     public function itShouldReturnDifferentInstancesOfSameTypeFromFactory()
171 171
     {
172
-        $this['service'] = $this->factory(function () {
172
+        $this['service'] = $this->factory(function() {
173 173
             return new MockService();
174 174
         });
175 175
         $serviceOne = $this['service']->shouldHaveType('Spec\Yapeal\MockService');
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
     }
178 178
     public function itShouldReturnOriginalInstanceFromRawWhenUsingFactory()
179 179
     {
180
-        $definition = $this->factory(function () {
180
+        $definition = $this->factory(function() {
181 181
             return 'foo';
182 182
         });
183 183
         $this['service'] = $definition;
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
     }
188 188
     public function itShouldReturnSameInstanceAndTypeAsCallableReturns()
189 189
     {
190
-        $this['service'] = function () {
190
+        $this['service'] = function() {
191 191
             return new MockService();
192 192
         };
193 193
         $serviceOne = $this['service']->shouldHaveType('Spec\Yapeal\MockService');
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
     public function itShouldReturnTrueFromOffsetExistsForAnySetKey()
204 204
     {
205 205
         $this['param'] = 'value';
206
-        $this['service'] = function () {
206
+        $this['service'] = function() {
207 207
             return new MockService();
208 208
         };
209 209
         $this['null'] = null;
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
             ->during('extend',
244 244
                 [
245 245
                     $id,
246
-                    function () {
246
+                    function() {
247 247
                     }
248 248
                 ]);
249 249
     }
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
         if (version_compare(PHP_VERSION, '7.0.0', '>=')) {
267 267
             throw new SkippingException('Unneeded on PHP 7.x or higher caught by TypeError');
268 268
         }
269
-        $this['foo'] = function () {
269
+        $this['foo'] = function() {
270 270
             return 'foo';
271 271
         };
272 272
         $this->shouldThrow(new \InvalidArgumentException('Extension service definition is not a Closure or invokable object.'))
@@ -298,24 +298,24 @@  discard block
 block discarded – undo
298 298
             ->during('extend',
299 299
                 [
300 300
                     'param',
301
-                    function () {
301
+                    function() {
302 302
                     }
303 303
                 ]);
304 304
         $this['non_invokable'] = $this->shouldThrow(new \InvalidArgumentException('Identifier "non_invokable" does not contain an object definition.'))
305 305
             ->during('extend',
306 306
                 [
307 307
                     'non_invokable',
308
-                    function () {
308
+                    function() {
309 309
                     }
310 310
                 ]);
311 311
     }
312 312
     public function itThrowsExceptionWhenTryingToExtendingFrozenService()
313 313
     {
314
-        $this['foo'] = function () {
314
+        $this['foo'] = function() {
315 315
             return 'foo';
316 316
         };
317 317
         $this['foo'] = $this->extend('foo',
318
-            function ($foo) {
318
+            function($foo) {
319 319
                 return "$foo.bar";
320 320
             });
321 321
         $this['foo']->shouldReturn('foo.bar');
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
             ->during('extend',
324 324
                 [
325 325
                     'foo',
326
-                    function ($foo) {
326
+                    function($foo) {
327 327
                         return "$foo.baz";
328 328
                     }
329 329
                 ]);
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
     public function itThrowsExceptionWhenTryingToGetOffsetAfterTheyHaveBeenUnset()
332 332
     {
333 333
         $this['param'] = 'value';
334
-        $this['service'] = function () {
334
+        $this['service'] = function() {
335 335
             return new MockService();
336 336
         };
337 337
         $this->keys()
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
     }
345 345
     public function itThrowsExceptionWhenTryingToOverWriteFrozenService()
346 346
     {
347
-        $this['foo'] = function () {
347
+        $this['foo'] = function() {
348 348
             return 'foo';
349 349
         };
350 350
         $this['foo'];
@@ -352,7 +352,7 @@  discard block
 block discarded – undo
352 352
             ->during('offsetSet',
353 353
                 [
354 354
                     'foo',
355
-                    function () {
355
+                    function() {
356 356
                         return 'bar';
357 357
                     }
358 358
                 ]);
Please login to merge, or discard this patch.