Passed
Push — master ( 0fbfd0...0a4722 )
by Carsten
11:27
created
module/Core/test/CoreTest/Mail/FileTransportTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $options = $this->createMock(FileOptions::class);
36 36
         $options->expects($this->once())
37 37
             ->method('getCallback')
38
-            ->willReturn([$this,'getFileName'])
38
+            ->willReturn([$this, 'getFileName'])
39 39
         ;
40 40
         $options->expects($this->exactly(2))
41 41
             ->method('getPath')
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/TranslatorAwareMessageTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
      */
39 39
     private $target = TranslatorAwareMessage::class;
40 40
 
41
-    private $inheritance = [ Message::class, TranslatorAwareInterface::class ];
41
+    private $inheritance = [Message::class, TranslatorAwareInterface::class];
42 42
 
43 43
     public function propertiesProvider()
44 44
     {
45
-        $setTranslator = function () {
45
+        $setTranslator = function() {
46 46
             $this->target->setTranslator(new Translator());
47 47
         };
48 48
 
Please login to merge, or discard this patch.
CoreTest/Listener/LanguageRouteListener/OnDispatchErrorCallbackTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     private $target = [
41 41
         LanguageRouteListener::class,
42
-        'mock' => [ 'detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
42
+        'mock' => ['detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
43 43
         'args' => 'getConstructorArgs'
44 44
     ];
45 45
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             ->expects($this->once())
147 147
             ->method('match')
148 148
             ->with($this->callback(
149
-                function ($v) {
149
+                function($v) {
150 150
                     Assert::assertEquals('/base/uri/xx/see/no/lang', (string) $v->getUri());
151 151
                     return true;
152 152
                 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ->expects($this->once())
179 179
             ->method('match')
180 180
             ->with($this->callback(
181
-                function ($v) {
181
+                function($v) {
182 182
                     Assert::assertEquals('/base/uri/xx/non/mappable/route', (string) $v->getUri());
183 183
                     return true;
184 184
                 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             ->expects($this->once())
208 208
             ->method('match')
209 209
             ->with($this->callback(
210
-                function ($v) {
210
+                function($v) {
211 211
                     Assert::assertEquals('/base/uri/default/see/no/lang', (string) $v->getUri());
212 212
                     return true;
213 213
                 }
@@ -231,6 +231,6 @@  discard block
 block discarded – undo
231 231
     public function getConstructorArgs()
232 232
     {
233 233
         $this->moduleOptions = new ModuleOptions();
234
-        return [new LocaleService([]),$this->moduleOptions];
234
+        return [new LocaleService([]), $this->moduleOptions];
235 235
     }
236 236
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/AjaxEventTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     private $target = AjaxEvent::class;
34 34
 
35
-    private $inheritance = [ Event::class ];
35
+    private $inheritance = [Event::class];
36 36
 
37 37
     public function propertiesProvider()
38 38
     {
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
             ['contentType', [
43 43
                 'value' => 'test/type',
44 44
                 'default' => AjaxEvent::TYPE_JSON,
45
-                'post' => function () {
45
+                'post' => function() {
46 46
                     $this->assertEquals('test/type', $this->target->getParam('contentType'));
47 47
                 },
48 48
             ]],
49 49
             ['contentType', [
50
-                'pre' => function () {
50
+                'pre' => function() {
51 51
                     $this->target->setParam('contentType', 'type/test');
52 52
                 },
53 53
                 'value' => 'type/test',
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
             ['request', [
58 58
                 'value' => $request,
59 59
                 'default' => null,
60
-                'post' => function () use ($request) {
60
+                'post' => function() use ($request) {
61 61
                     $this->assertSame($request, $this->target->getParam('request'));
62 62
                 },
63 63
             ]],
64 64
             ['request', [
65
-                'pre' => function () use ($request) {
65
+                'pre' => function() use ($request) {
66 66
                     $this->target->setParam('request', $request);
67 67
                 },
68 68
                 'value' => $request,
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             ['response', [
73 73
                 'value' => $response,
74 74
                 'default' => null,
75
-                'post' => function () use ($response) {
75
+                'post' => function() use ($response) {
76 76
                     $this->assertSame($response, $this->target->getParam('response'));
77 77
                 },
78 78
             ]],
79 79
             ['response', [
80
-                'pre' => function () use ($response) {
80
+                'pre' => function() use ($response) {
81 81
                     $this->target->setParam('response', $response);
82 82
                 },
83 83
                 'value' => $response,
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
             ['result', [
89 89
                 'value' => 'testResult',
90 90
                 'default' => null,
91
-                'post' => function () {
91
+                'post' => function() {
92 92
                     $this->assertEquals('testResult', $this->target->getParam('result'));
93 93
                 },
94 94
             ]],
95 95
             ['result', [
96
-                'pre' => function () {
96
+                'pre' => function() {
97 97
                     $this->target->setParam('result', 'testResult');
98 98
                 },
99 99
                 'value' => 'testResult',
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/CreatePaginatorEventTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class CreatePaginatorEventTest extends TestCase
28 28
 {
29
-    use TestSetterGetterTrait,SetupTargetTrait;
29
+    use TestSetterGetterTrait, SetupTargetTrait;
30 30
 
31 31
     protected $target = [
32 32
         'class' => CreatePaginatorEvent::class
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
             ->getMock()
44 44
         ;
45 45
         return [
46
-            ['paginatorParams',[
46
+            ['paginatorParams', [
47 47
                 'value'     =>['name'=>'value'],
48 48
                 'default'   => array(),
49 49
             ]],
50
-            ['paginatorName',[
50
+            ['paginatorName', [
51 51
                 'value' => 'Some/Paginator',
52 52
                 'default'   => null,
53 53
             ]],
54
-            ['paginators',$paginators],
55
-            ['paginator',$paginator]
54
+            ['paginators', $paginators],
55
+            ['paginator', $paginator]
56 56
         ];
57 57
     }
58 58
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/FileEventTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private $target = FileEvent::class;
33 33
 
34
-    private $inheritance = [ Event::class ];
34
+    private $inheritance = [Event::class];
35 35
 
36 36
     public function propertiesProvider()
37 37
     {
@@ -41,13 +41,13 @@  discard block
 block discarded – undo
41 41
             ['params', [
42 42
                 'value' => ['file' => $file, 'one' => 'two'],
43 43
                 'expect' => ['one' => 'two'],
44
-                'post' => function () use ($file) {
44
+                'post' => function() use ($file) {
45 45
                     $this->assertSame($file, $this->target->getFile());
46 46
                 },
47 47
             ]],
48 48
             ['file', $file],
49 49
             ['file', [
50
-                'pre' => function () use ($file) {
50
+                'pre' => function() use ($file) {
51 51
                     $this->target->setParam('file', $file);
52 52
                 },
53 53
                 'ignore_setter' => true,
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/MongoQueueTest.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
     private $target = [
38 38
         MongoQueue::class,
39 39
         'setupArgs',
40
-        '@testInheritance' => [ 'as_reflection' => true ],
40
+        '@testInheritance' => ['as_reflection' => true],
41 41
         '@testConstruction' => false,
42 42
         '@testPushLazyWithStringName' => '#mockPush',
43 43
         '@testPushLazyWithArraySpec' => '#mockPush',
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
         ]
47 47
     ];
48 48
 
49
-    private $inheritance = [ AbstractQueue::class ];
49
+    private $inheritance = [AbstractQueue::class];
50 50
 
51 51
     /**
52 52
      *
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
             ->setMethods(['getInsertedId'])->getMock();
128 128
         $resultMock->expects($this->once())->method('getInsertedId')->willReturn('ID');
129 129
         $this->mongoCollectionMock->expects($this->once())->method('insertOne')
130
-            ->with($this->callback(function ($value) {
130
+            ->with($this->callback(function($value) {
131 131
                 return isset($value['queue']) && $value['queue'] == $this->queueName
132 132
                     && isset($value['status']) && $value['status'] == MongoQueue::STATUS_PENDING
133 133
                     && !isset($value['tried'])
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                            ->setMethods(['getInsertedId'])->getMock();
157 157
         $resultMock->expects($this->once())->method('getInsertedId')->willReturn('ID');
158 158
         $this->mongoCollectionMock->expects($this->once())->method('insertOne')
159
-                                  ->with($this->callback(function ($value) use ($options) {
159
+                                  ->with($this->callback(function($value) use ($options) {
160 160
                                       return isset($value['queue']) && $value['queue'] == $this->queueName
161 161
                                              && isset($value['status']) && $value['status'] == MongoQueue::STATUS_PENDING
162 162
                                              && !isset($value['tried'])
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
                                              && isset($value['created']) && isset($value['scheduled'])
165 165
                                              && $value['scheduled'] instanceof \MongoDB\BSON\UTCDateTime
166 166
                                              && $value['created'] instanceof \MongoDB\BSON\UTCDateTime
167
-                                             && (int) ((string) $value['scheduled']) - (int) ((string)$value['created']) == $options['delay'] * 1000
167
+                                             && (int) ((string) $value['scheduled']) - (int) ((string) $value['created']) == $options['delay'] * 1000
168 168
                                              && isset($value['priority']) && $value['priority'] == $options['priority']
169 169
                                           ;
170 170
                                   }))
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                                   ->with(
188 188
                                       $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
189 189
                                       $this->callback(
190
-                                          function ($value) {
190
+                                          function($value) {
191 191
                                               if (!array_key_exists('$set', $value)) {
192 192
                                                   return false;
193 193
                                               }
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
         $this->jobManagerMock->expects($this->once())->method('get')->with(get_class($job))->willReturn(new $this->testJobClass());
217 217
         $this->mongoCollectionMock->expects($this->once())->method('findOneAndUpdate')
218 218
                                   ->with(
219
-                                      $this->callback(function ($value) {
219
+                                      $this->callback(function($value) {
220 220
                                           return
221 221
                                                     isset($value['queue']) && $value['queue'] == $this->queueName
222 222
                                                     && isset($value['status']) && $value['status'] == MongoQueue::STATUS_PENDING
@@ -224,7 +224,7 @@  discard block
 block discarded – undo
224 224
                                               ;
225 225
                                       }),
226 226
                                       $this->callback(
227
-                                          function ($value) {
227
+                                          function($value) {
228 228
                                               if (!array_key_exists('$set', $value)) {
229 229
                                                   return false;
230 230
                                               }
@@ -234,10 +234,10 @@  discard block
 block discarded – undo
234 234
                                               ;
235 235
                                           }
236 236
                                       ),
237
-                                      $this->callback(function ($value) {
237
+                                      $this->callback(function($value) {
238 238
                                           return
239 239
                                             isset($value['sort']) && $value['sort'] == ['priority' => 1, 'scheduled' => 1]
240
-                                              && isset($value['returnDocument'])&&$value['returnDocument'] = \MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER
240
+                                              && isset($value['returnDocument']) && $value['returnDocument'] = \MongoDB\Operation\FindOneAndUpdate::RETURN_DOCUMENT_AFTER
241 241
                                               ;
242 242
                                       })
243 243
                                   )
@@ -264,8 +264,8 @@  discard block
 block discarded – undo
264 264
         /* @var AbstractJob $job2 */
265 265
         $job1 = new $this->testJobClass('TestJob1');
266 266
         $job2 = new $this->testJobClass('TestJob2');
267
-        $filter = [ 'queue' => $this->queueName ];
268
-        $opt    = [ 'sort' => [ 'scheduled' => 1, 'priority' => 1 ] ];
267
+        $filter = ['queue' => $this->queueName];
268
+        $opt    = ['sort' => ['scheduled' => 1, 'priority' => 1]];
269 269
         $envelopes = [
270 270
             [
271 271
                 '_id' => $job1->getId(),
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
             ],
282 282
         ];
283 283
         $this->jobManagerMock->expects($this->exactly(2))->method('get')
284
-            ->with($this->testJobClass)->will($this->returnCallback(function () {
284
+            ->with($this->testJobClass)->will($this->returnCallback(function() {
285 285
                 return new $this->testJobClass();
286 286
             }));
287 287
 
@@ -307,8 +307,8 @@  discard block
 block discarded – undo
307 307
         $jobs = $this->target->listing();
308 308
 
309 309
         $this->assertEquals(1, $cursor->called, "Cursor::toArray should have been called exactly one time, but was called '{$cursor->called}' times'");
310
-        $this->assertTrue(is_array($jobs), 'Return value should have been an array, but is "' . gettype($jobs) . '" instead."');
311
-        $this->assertTrue(2 == count($jobs), 'Only 2 jobs should have been returned, but it were ' . count($jobs));
310
+        $this->assertTrue(is_array($jobs), 'Return value should have been an array, but is "'.gettype($jobs).'" instead."');
311
+        $this->assertTrue(2 == count($jobs), 'Only 2 jobs should have been returned, but it were '.count($jobs));
312 312
 
313 313
         $this->assertArrayHasKey('job', $jobs[0]);
314 314
         $this->assertEquals($job1, $jobs[0]['job'], 'Job1 is not the same');
@@ -323,8 +323,8 @@  discard block
 block discarded – undo
323 323
             'limit' => 10,
324 324
         ];
325 325
 
326
-        $filter = [ 'queue' => $this->queueName, 'status' => $options['status'] ];
327
-        $opt    = [ 'sort' => [ 'scheduled' => 1, 'priority' => 1 ], 'limit' => $options['limit'] ];
326
+        $filter = ['queue' => $this->queueName, 'status' => $options['status']];
327
+        $opt    = ['sort' => ['scheduled' => 1, 'priority' => 1], 'limit' => $options['limit']];
328 328
 
329 329
         $this->jobManagerMock->expects($this->never())->method('get');
330 330
         $cursor = new class() {
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
                                   ->with(
352 352
                                       $this->equalTo(['_id' => new \MongoDB\BSON\ObjectID($job->getId())]),
353 353
                                       $this->callback(
354
-                                          function ($value) use ($options) {
354
+                                          function($value) use ($options) {
355 355
                                               if (!array_key_exists('$set', $value)) {
356 356
                                                   return false;
357 357
                                               }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/MongoQueueFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     private $target = MongoQueueFactory::class;
40 40
 
41
-    private $inheritance = [ FactoryInterface::class ];
41
+    private $inheritance = [FactoryInterface::class];
42 42
 
43 43
     public function testCreateServiceWithoutConfig()
44 44
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Queue/Strategy/LogStrategyTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         '@testConstructor*' => false,
50 50
     ];
51 51
 
52
-    private $inheritance = [ AbstractStrategy::class ];
52
+    private $inheritance = [AbstractStrategy::class];
53 53
 
54 54
     private $attributes = [
55 55
         'tmpl' => [
Please login to merge, or discard this patch.