Passed
Push — master ( c58a40...6d37ad )
by Mathias
10:02 queued 04:27
created
module/Core/test/CoreTest/Factory/View/Helper/SocialButtonsFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         $options = new ModuleOptions();
47 47
         $config = ['testwert'];
48 48
 
49
-        $HauptServiceLocator =  $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
49
+        $HauptServiceLocator = $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
50 50
         $HauptServiceLocator->expects($this->exactly(2))->method('get')->withConsecutive(['Auth/Options'], ['Config'])->will($this->onConsecutiveCalls($options, $config));
51 51
 
52 52
         $target = new SocialButtonsFactory();
Please login to merge, or discard this patch.
Factory/EventManager/EventManagerAbstractFactory/AttachListenersTest.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -46,13 +46,13 @@  discard block
 block discarded – undo
46 46
     protected function setUp(): void
47 47
     {
48 48
         $this->target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
49
-                             ->setMethods([ 'createEventManager', 'getConfig' ])
50
-                             ->getMock();
49
+                                ->setMethods([ 'createEventManager', 'getConfig' ])
50
+                                ->getMock();
51 51
 
52 52
         $events = $this->getMockBuilder('\Laminas\EventManager\EventManager')
53
-                       ->disableOriginalConstructor()
54
-                       ->setMethods(['attach'])
55
-                       ->getMock();
53
+                        ->disableOriginalConstructor()
54
+                        ->setMethods(['attach'])
55
+                        ->getMock();
56 56
 
57 57
         $this->target->expects($this->once())->method('createEventManager')->willReturn($events);
58 58
         $this->events = $events;
@@ -67,8 +67,8 @@  discard block
 block discarded – undo
67 67
     protected function getServiceManagerMock($listeners, $expectLazyListeners = false)
68 68
     {
69 69
         $services = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager')
70
-                         ->disableOriginalConstructor()
71
-                         ->getMock();
70
+                            ->disableOriginalConstructor()
71
+                            ->getMock();
72 72
 
73 73
 
74 74
         $hasMap = [ ];
@@ -101,8 +101,8 @@  discard block
 block discarded – undo
101 101
         ;
102 102
 
103 103
         $services->expects($this->exactly(count($getMap)))
104
-                 ->method('get')
105
-                 ->will($this->returnValueMap($getMap))
104
+                    ->method('get')
105
+                    ->will($this->returnValueMap($getMap))
106 106
         ;
107 107
 
108 108
         return $services;
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
     public function testCallsAttachOnListenerAggregates()
167 167
     {
168 168
         $aggregateMock = $this->getMockBuilder('\Laminas\EventManager\ListenerAggregateInterface')
169
-                              ->getMockForAbstractClass();
169
+                                ->getMockForAbstractClass();
170 170
         $aggregateMock->expects($this->exactly(2))->method('attach')->withConsecutive([ $this->events, 1], [$this->events, -100]);
171 171
         
172 172
         $this->setTargetListenerConfig(['TestAggregate', 'TestAggregate2' => -100]);
Please login to merge, or discard this patch.
Spacing   +101 added lines, -101 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     protected function setUp(): void
47 47
     {
48 48
         $this->target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
49
-                             ->setMethods([ 'createEventManager', 'getConfig' ])
49
+                             ->setMethods(['createEventManager', 'getConfig'])
50 50
                              ->getMock();
51 51
 
52 52
         $events = $this->getMockBuilder('\Laminas\EventManager\EventManager')
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
     protected function setTargetListenerConfig($config)
62 62
     {
63
-        $cfg = [ 'listeners' => $config ];
63
+        $cfg = ['listeners' => $config];
64 64
         $this->target->expects($this->once())->method('getConfig')->willReturn($cfg);
65 65
     }
66 66
 
@@ -71,14 +71,14 @@  discard block
 block discarded – undo
71 71
                          ->getMock();
72 72
 
73 73
 
74
-        $hasMap = [ ];
75
-        $getMap = [ ];
74
+        $hasMap = [];
75
+        $getMap = [];
76 76
         $defaultListenerMock = new AttachListenerTestListenerMock();
77 77
 
78 78
         $lazyAggregateMock = $this->getLazyAggregateMock($expectLazyListeners);
79 79
         if ($expectLazyListeners) {
80 80
             $lazyAggregateMock->expects($this->once())->method('attach');
81
-            $getMap[] = [ 'Core/Listener/DeferredListenerAggregate', $lazyAggregateMock ];
81
+            $getMap[] = ['Core/Listener/DeferredListenerAggregate', $lazyAggregateMock];
82 82
         }
83 83
 
84 84
         foreach ($listeners as $serviceName => $listenerMock) {
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
             }
89 89
 
90 90
             if (false === $listenerMock) {
91
-                $hasMap[] = [ $serviceName, false];
91
+                $hasMap[] = [$serviceName, false];
92 92
             } else {
93
-                $hasMap[] = [ $serviceName, true ];
94
-                $getMap[] = [ $serviceName, $listenerMock ];
93
+                $hasMap[] = [$serviceName, true];
94
+                $getMap[] = [$serviceName, $listenerMock];
95 95
             }
96 96
         }
97 97
 
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 
136 136
     public function testPullsListenersFromServiceManager()
137 137
     {
138
-        $this->setTargetListenerConfig(['TestListener' => ['test-event','doSomething',1]]);
138
+        $this->setTargetListenerConfig(['TestListener' => ['test-event', 'doSomething', 1]]);
139 139
         $services = $this->getServiceManagerMock(['TestListener']);
140 140
         $this->target->createServiceWithName($services, 'irrelevant', 'irrelevant');
141 141
     }
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
     public function testCreatesListenersInstances()
144 144
     {
145 145
         $this->setTargetListenerConfig(
146
-            ['\CoreTest\Factory\EventManager\EventManagerAbstractFactory\AttachListenerTestListenerMock' => ['test-event','doSomething',1]]
146
+            ['\CoreTest\Factory\EventManager\EventManagerAbstractFactory\AttachListenerTestListenerMock' => ['test-event', 'doSomething', 1]]
147 147
         );
148 148
         $services = $this->getServiceManagerMock([
149 149
             '\CoreTest\Factory\EventManager\EventManagerAbstractFactory\AttachListenerTestListenerMock' => false
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
     {
168 168
         $aggregateMock = $this->getMockBuilder('\Laminas\EventManager\ListenerAggregateInterface')
169 169
                               ->getMockForAbstractClass();
170
-        $aggregateMock->expects($this->exactly(2))->method('attach')->withConsecutive([ $this->events, 1], [$this->events, -100]);
170
+        $aggregateMock->expects($this->exactly(2))->method('attach')->withConsecutive([$this->events, 1], [$this->events, -100]);
171 171
         
172 172
         $this->setTargetListenerConfig(['TestAggregate', 'TestAggregate2' => -100]);
173 173
         $services = $this->getServiceManagerMock(['TestAggregate' => $aggregateMock, 'TestAggregate2' => $aggregateMock]);
@@ -179,8 +179,8 @@  discard block
 block discarded – undo
179 179
     {
180 180
         $listenerMock = new AttachListenerTestListenerMock();
181 181
         $this->setTargetListenerConfig([
182
-            'TestListener1' => ['test-event1','doSomething',1],
183
-            'TestListener2' => ['test-event2','doSomething',2]
182
+            'TestListener1' => ['test-event1', 'doSomething', 1],
183
+            'TestListener2' => ['test-event2', 'doSomething', 2]
184 184
         ]);
185 185
         $services = $this->getServiceManagerMock([
186 186
             'TestListener1' => $listenerMock,
@@ -190,8 +190,8 @@  discard block
 block discarded – undo
190 190
             ->expects($this->exactly(2))
191 191
             ->method('attach')
192 192
             ->withConsecutive(
193
-                ['test-event1', [$listenerMock,'doSomething'], 1 ],
194
-                ['test-event2', [$listenerMock, 'doSomething'], 2 ]
193
+                ['test-event1', [$listenerMock, 'doSomething'], 1],
194
+                ['test-event2', [$listenerMock, 'doSomething'], 2]
195 195
             )
196 196
         ;
197 197
 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $listenerMock = new AttachListenerTestListenerMock();
204 204
         $singleEvent = 'event';
205 205
         $expectSingleEvent = $singleEvent;
206
-        $multiEvent  = [ 'event1', 'event2' ];
206
+        $multiEvent  = ['event1', 'event2'];
207 207
         $method = 'doSomething';
208 208
         $additionalMethod = 'doSomethingElse';
209 209
         $priority = 1;
@@ -212,30 +212,30 @@  discard block
 block discarded – undo
212 212
         $notLazy = false;
213 213
 
214 214
         $listeners = [
215
-            'Test01' => [ $singleEvent, $method],
216
-            'Test02' => [ $singleEvent, $method ],
217
-            'Test03' => [ $multiEvent, $method ],
218
-            'Test04' => [ $singleEvent, $method ],
219
-            'Test05' => [ $multiEvent, $method ],
220
-            'Test06' => [ $singleEvent, $method, $priority ],
221
-            'Test07' => [ $multiEvent, $method, $priority ],
222
-            'Test08' => [ $singleEvent, $method, $priority, $lazy ],
223
-            'Test09' => [ $multiEvent, $method, $priority, $lazy ],
224
-            'Test10' => [ $singleEvent,$method, $priority ],
225
-            'Test11' => [ $multiEvent, $method, $priority ],
226
-            'Test12' => [ $singleEvent,$method, $lazy ],
227
-            'Test13' => [ $multiEvent,$method, $lazy ],
228
-            'Test14' => [ $singleEvent, $method, $additionalMethod ],
229
-            'Test15' => [ $multiEvent, $method, $lazy, $priority, $notLazy, $additionalPriority ],
215
+            'Test01' => [$singleEvent, $method],
216
+            'Test02' => [$singleEvent, $method],
217
+            'Test03' => [$multiEvent, $method],
218
+            'Test04' => [$singleEvent, $method],
219
+            'Test05' => [$multiEvent, $method],
220
+            'Test06' => [$singleEvent, $method, $priority],
221
+            'Test07' => [$multiEvent, $method, $priority],
222
+            'Test08' => [$singleEvent, $method, $priority, $lazy],
223
+            'Test09' => [$multiEvent, $method, $priority, $lazy],
224
+            'Test10' => [$singleEvent, $method, $priority],
225
+            'Test11' => [$multiEvent, $method, $priority],
226
+            'Test12' => [$singleEvent, $method, $lazy],
227
+            'Test13' => [$multiEvent, $method, $lazy],
228
+            'Test14' => [$singleEvent, $method, $additionalMethod],
229
+            'Test15' => [$multiEvent, $method, $lazy, $priority, $notLazy, $additionalPriority],
230 230
         ];
231 231
 
232 232
         $expectedLazyListeners = [
233
-            [ 'service' => 'Test08', 'event' => $expectSingleEvent, 'method' => $method, 'priority' => $priority ],
234
-            [ 'service' => 'Test09', 'event' => 'event1', 'method' => $method, 'priority' => $priority ],
235
-            [ 'service' => 'Test09', 'event' => 'event2', 'method' => $method, 'priority' => $priority ],
236
-            [ 'service' => 'Test12', 'event' => $expectSingleEvent, 'method' => $method, 'priority' => 1 ],
237
-            [ 'service' => 'Test13', 'event' => 'event1', 'method' => $method, 'priority' => 1],
238
-            [ 'service' => 'Test13', 'event' => 'event2', 'method' => $method, 'priority' => 1],
233
+            ['service' => 'Test08', 'event' => $expectSingleEvent, 'method' => $method, 'priority' => $priority],
234
+            ['service' => 'Test09', 'event' => 'event1', 'method' => $method, 'priority' => $priority],
235
+            ['service' => 'Test09', 'event' => 'event2', 'method' => $method, 'priority' => $priority],
236
+            ['service' => 'Test12', 'event' => $expectSingleEvent, 'method' => $method, 'priority' => 1],
237
+            ['service' => 'Test13', 'event' => 'event1', 'method' => $method, 'priority' => 1],
238
+            ['service' => 'Test13', 'event' => 'event2', 'method' => $method, 'priority' => 1],
239 239
         ];
240 240
 
241 241
         $servicesCfg = array_fill_keys([
@@ -252,26 +252,26 @@  discard block
 block discarded – undo
252 252
 
253 253
         $this->setTargetListenerConfig($listeners);
254 254
         $services = $this->getServiceManagerMock($servicesCfg, true);
255
-        $expectedCallback = [$listenerMock,'doSomething'];
255
+        $expectedCallback = [$listenerMock, 'doSomething'];
256 256
         $this->events->expects($this->exactly(16))
257 257
             ->method('attach')
258 258
             ->withConsecutive(
259
-                [ $expectSingleEvent, $expectedCallback, 1 ],
260
-                [ $expectSingleEvent, $expectedCallback, 1 ],
261
-                [ 'event1', $expectedCallback, 1],
262
-                [ 'event2', $expectedCallback, 1],
263
-                [ $expectSingleEvent, $expectedCallback, 1],
264
-                [ 'event1', $expectedCallback, 1],
265
-                [ 'event2', $expectedCallback, 1],
266
-                [ $expectSingleEvent, $expectedCallback, $priority],
267
-                [ 'event1', $expectedCallback, $priority],
268
-                [ 'event2', $expectedCallback, $priority],
269
-                [ $expectSingleEvent, $expectedCallback, $priority ],
270
-                [ 'event1', $expectedCallback, $priority ],
271
-                [ 'event2', $expectedCallback, $priority ],
272
-                [ $expectSingleEvent, [$listenerMock,$additionalMethod], 1],
273
-                [ 'event1', $expectedCallback, $additionalPriority ],
274
-                [ 'event2', $expectedCallback, $additionalPriority ]
259
+                [$expectSingleEvent, $expectedCallback, 1],
260
+                [$expectSingleEvent, $expectedCallback, 1],
261
+                ['event1', $expectedCallback, 1],
262
+                ['event2', $expectedCallback, 1],
263
+                [$expectSingleEvent, $expectedCallback, 1],
264
+                ['event1', $expectedCallback, 1],
265
+                ['event2', $expectedCallback, 1],
266
+                [$expectSingleEvent, $expectedCallback, $priority],
267
+                ['event1', $expectedCallback, $priority],
268
+                ['event2', $expectedCallback, $priority],
269
+                [$expectSingleEvent, $expectedCallback, $priority],
270
+                ['event1', $expectedCallback, $priority],
271
+                ['event2', $expectedCallback, $priority],
272
+                [$expectSingleEvent, [$listenerMock, $additionalMethod], 1],
273
+                ['event1', $expectedCallback, $additionalPriority],
274
+                ['event2', $expectedCallback, $additionalPriority]
275 275
         );
276 276
 
277 277
         $this->target->createServiceWithName($services, '', '');
@@ -280,32 +280,32 @@  discard block
 block discarded – undo
280 280
     public function testNormalizeListenerOptionsWithArrayHashSpecification()
281 281
     {
282 282
         $listenerMock = new AttachListenerTestListenerMock();
283
-        $singleEvent = [ 'singleEvent' ];
284
-        $priorityEvent = [ 'prioEvent' => 10 ];
285
-        $methodEvent = [ 'methodEvent' => 'doSomething' ];
286
-        $singleAndPriorityAndMethodEvent = [ 'single', 'priority' => 10, 'method' => 'doSomething'];
287
-        $verboseEvent = [ 'verbose' => [ 'method' => 'doSomething', 'priority' => 20]];
288
-        $verboseFullEvent = [ 'verbose' => [ 'method' => ['doSomething', 'doSomethingElse' => 25], 'priority' => 30]];
289
-        $multiEvent = [ 'multi1', 'multi2' ];
283
+        $singleEvent = ['singleEvent'];
284
+        $priorityEvent = ['prioEvent' => 10];
285
+        $methodEvent = ['methodEvent' => 'doSomething'];
286
+        $singleAndPriorityAndMethodEvent = ['single', 'priority' => 10, 'method' => 'doSomething'];
287
+        $verboseEvent = ['verbose' => ['method' => 'doSomething', 'priority' => 20]];
288
+        $verboseFullEvent = ['verbose' => ['method' => ['doSomething', 'doSomethingElse' => 25], 'priority' => 30]];
289
+        $multiEvent = ['multi1', 'multi2'];
290 290
 
291 291
         $listeners = [
292
-            'Test01' => [ 'events' => $singleEvent, 'method' => 'doSomething'],
293
-            'Test02' => [ 'events' => $priorityEvent, 'method' => 'doSomething'],
294
-            'Test03' => [ 'events' => $methodEvent, 'method' => 'doSomething'],
295
-            'Test04' => [ 'events' => $singleEvent, 'method'=>'doSomething', 'priority' => 12],
296
-            'Test05' => [ 'events' => $priorityEvent, 'method'=>'doSomething', 'priority' => 12],
297
-            'Test06' => [ 'events' => $methodEvent,'method'=>'doSomething', 'priority' => 12],
298
-            'Test07' => [ 'events' => $singleEvent, 'method' => 'doSomething'],
299
-            'Test08' => [ 'events' => $priorityEvent, 'method' => 'doSomething'],
300
-            'Test09' => [ 'events' => $methodEvent, 'method' => 'doSomethingElse'],
301
-            'Test10' => [ 'events' => $singleEvent, 'method' => 'doSomething', 'priority' => 12],
302
-            'Test11' => [ 'events' => $priorityEvent, 'method' => 'doSomethingElse', 'priority' => 12],
303
-            'Test12' => [ 'events' => $methodEvent, 'method' => 'doSomethingElse', 'priority' => 12],
304
-            'Test13' => [ 'events' => $singleAndPriorityAndMethodEvent, 'method'=> 'doSomething'],
305
-            'Test14' => [ 'events' => $verboseEvent],
306
-            'Test15' => [ 'events' => $verboseFullEvent],
307
-            'Test16' => [ 'events' => $singleEvent, 'lazy' => true],
308
-            'Test17' => [ 'events' => $multiEvent, 'method' => 'multiMethod' ],
292
+            'Test01' => ['events' => $singleEvent, 'method' => 'doSomething'],
293
+            'Test02' => ['events' => $priorityEvent, 'method' => 'doSomething'],
294
+            'Test03' => ['events' => $methodEvent, 'method' => 'doSomething'],
295
+            'Test04' => ['events' => $singleEvent, 'method'=>'doSomething', 'priority' => 12],
296
+            'Test05' => ['events' => $priorityEvent, 'method'=>'doSomething', 'priority' => 12],
297
+            'Test06' => ['events' => $methodEvent, 'method'=>'doSomething', 'priority' => 12],
298
+            'Test07' => ['events' => $singleEvent, 'method' => 'doSomething'],
299
+            'Test08' => ['events' => $priorityEvent, 'method' => 'doSomething'],
300
+            'Test09' => ['events' => $methodEvent, 'method' => 'doSomethingElse'],
301
+            'Test10' => ['events' => $singleEvent, 'method' => 'doSomething', 'priority' => 12],
302
+            'Test11' => ['events' => $priorityEvent, 'method' => 'doSomethingElse', 'priority' => 12],
303
+            'Test12' => ['events' => $methodEvent, 'method' => 'doSomethingElse', 'priority' => 12],
304
+            'Test13' => ['events' => $singleAndPriorityAndMethodEvent, 'method'=> 'doSomething'],
305
+            'Test14' => ['events' => $verboseEvent],
306
+            'Test15' => ['events' => $verboseFullEvent],
307
+            'Test16' => ['events' => $singleEvent, 'lazy' => true],
308
+            'Test17' => ['events' => $multiEvent, 'method' => 'multiMethod'],
309 309
         ];
310 310
     
311 311
         $servicesCfg = array_fill_keys([
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
             'Test15', 'Test17',
315 315
         ], $listenerMock);
316 316
         $expectedLazyListeners = [
317
-            [ 'service' => 'Test16', 'event' => $singleEvent[0], 'method' => null, 'priority' => 1 ],
317
+            ['service' => 'Test16', 'event' => $singleEvent[0], 'method' => null, 'priority' => 1],
318 318
         ];
319 319
 
320 320
         $lazyAggregateMock = $this->getLazyAggregateMock();
@@ -328,33 +328,33 @@  discard block
 block discarded – undo
328 328
         $this->setTargetListenerConfig($listeners);
329 329
         $services = $this->getServiceManagerMock($servicesCfg, true);
330 330
         
331
-        $callback1 = [$listenerMock,'doSomething'];
332
-        $callback2 = [$listenerMock,'doSomethingElse'];
331
+        $callback1 = [$listenerMock, 'doSomething'];
332
+        $callback2 = [$listenerMock, 'doSomethingElse'];
333 333
         $this->events
334 334
             ->expects($this->exactly(20))
335 335
             ->method('attach')
336 336
             ->withConsecutive(
337
-                [ $singleEvent[0], $callback1, 1 ],
338
-                [ 'prioEvent', $callback1, 10 ],
339
-                [ 'methodEvent', $callback1, 1],
340
-                [ $singleEvent[0], $callback1, 12],
341
-                [ 'prioEvent', $callback1, 10],
342
-                [ 'methodEvent', $callback1, 12],
343
-                [ $singleEvent[0], $callback1, 1],
344
-                [ 'prioEvent' , $callback1, 10],
345
-                [ 'methodEvent', $callback1, 1],
346
-                [ $singleEvent[0], $callback1, 12],
347
-                [ 'prioEvent', $callback2, 10],
348
-                [ 'methodEvent', $callback1, 12],
349
-                [ 'single', $callback1, 1 ],
350
-                [ 'method' , $callback1, 1],
351
-                [ 'priority', $callback1, 10],
337
+                [$singleEvent[0], $callback1, 1],
338
+                ['prioEvent', $callback1, 10],
339
+                ['methodEvent', $callback1, 1],
340
+                [$singleEvent[0], $callback1, 12],
341
+                ['prioEvent', $callback1, 10],
342
+                ['methodEvent', $callback1, 12],
343
+                [$singleEvent[0], $callback1, 1],
344
+                ['prioEvent', $callback1, 10],
345
+                ['methodEvent', $callback1, 1],
346
+                [$singleEvent[0], $callback1, 12],
347
+                ['prioEvent', $callback2, 10],
348
+                ['methodEvent', $callback1, 12],
349
+                ['single', $callback1, 1],
350
+                ['method', $callback1, 1],
351
+                ['priority', $callback1, 10],
352 352
                 //[ [ 'method' ], $callback1, 1],
353
-                [ 'verbose', $callback1, 20],
354
-                [ 'verbose', $callback1, 30],
355
-                [ 'verbose', $callback2, 25],
356
-                [ 'multi1', [$listenerMock,'multiMethod'], 1],
357
-                [ 'multi2', [$listenerMock,'multiMethod'], 1]
353
+                ['verbose', $callback1, 20],
354
+                ['verbose', $callback1, 30],
355
+                ['verbose', $callback2, 25],
356
+                ['multi1', [$listenerMock, 'multiMethod'], 1],
357
+                ['multi2', [$listenerMock, 'multiMethod'], 1]
358 358
             )
359 359
         ;
360 360
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Event/FormEventTest.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -36,41 +36,41 @@
 block discarded – undo
36 36
      */
37 37
     protected $target = '\Core\Form\Event\FormEvent';
38 38
 
39
-    protected $inheritance = [ '\Laminas\EventManager\Event' ];
39
+    protected $inheritance = ['\Laminas\EventManager\Event'];
40 40
 
41 41
     public function propertiesProvider()
42 42
     {
43 43
         $form = new Form();
44 44
         $container = new Container();
45 45
         return [
46
-            [ 'Form', '@\Laminas\Form\Form' ],
47
-            [ 'Form', '@\Core\Form\Container' ],
48
-            [ 'Form', [ 'value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either' ] ] ],
49
-            [ 'Target', 'TestTarget' ],
50
-            [ 'Target', [
46
+            ['Form', '@\Laminas\Form\Form'],
47
+            ['Form', '@\Core\Form\Container'],
48
+            ['Form', ['value' => 'invalid', 'setter_exception' => ['\InvalidArgumentException', 'Form must either']]],
49
+            ['Target', 'TestTarget'],
50
+            ['Target', [
51 51
                 'value' => $form,
52
-                'expect_property' => [ 'form', $form ]
52
+                'expect_property' => ['form', $form]
53 53
             ]],
54
-            [ 'Target', [
54
+            ['Target', [
55 55
                 'value' => $container,
56
-                'expect_property' => [ 'form', $container ],
56
+                'expect_property' => ['form', $container],
57 57
             ]],
58
-            [ 'Target', [
58
+            ['Target', [
59 59
                 'value' => 'NonFormOrContainer',
60
-                'expect_property' => [ 'form', null ],
60
+                'expect_property' => ['form', null],
61 61
             ]],
62
-            [ 'Params', [ 'value' => [ 'param1' => 'value1' ]]],
63
-            [ 'Params', [
64
-                'value' => [ 'form' => $form ],
65
-                'expect_property' => [ 'form', $form ]
62
+            ['Params', ['value' => ['param1' => 'value1']]],
63
+            ['Params', [
64
+                'value' => ['form' => $form],
65
+                'expect_property' => ['form', $form]
66 66
             ]],
67
-            [ 'Params', [
68
-                'value' => [ 'form' => $container ],
69
-                'expect_property' => [ 'form', $container ]
67
+            ['Params', [
68
+                'value' => ['form' => $container],
69
+                'expect_property' => ['form', $container]
70 70
             ]],
71
-            [ 'Params', [
72
-                'value' => [ 'form' => 'notAnFormInstance' ],
73
-                'expect_property' => [ 'form', null ]
71
+            ['Params', [
72
+                'value' => ['form' => 'notAnFormInstance'],
73
+                'expect_property' => ['form', null]
74 74
             ]]
75 75
         ];
76 76
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Form/Service/InjectHeadscriptInitializerTest.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -85,8 +85,8 @@  discard block
 block discarded – undo
85 85
         $this->formElementManagerMock->expects($this->never())->method('getServiceLocator');
86 86
         $instance = $this->getMockForAbstractClass('\Core\Form\HeadscriptProviderInterface');
87 87
         $instance->expects($this->exactly(2))
88
-                 ->method('getHeadscripts')
89
-                 ->will($this->onConsecutiveCalls('notanarray', array()));
88
+                    ->method('getHeadscripts')
89
+                    ->will($this->onConsecutiveCalls('notanarray', array()));
90 90
 
91 91
         $this->target->initialize($instance, $this->formElementManagerMock);
92 92
         $this->target->initialize($instance, $this->formElementManagerMock);
@@ -95,14 +95,14 @@  discard block
 block discarded – undo
95 95
     public function testInjectsScriptsToTheHeadscriptViewHelper()
96 96
     {
97 97
         $basepath = $this->getMockBuilder('\Laminas\View\Helper\BasePath')
98
-                         ->disableOriginalConstructor()->getMock();
98
+                            ->disableOriginalConstructor()->getMock();
99 99
 
100 100
         $basepath->expects($this->any())
101
-                 ->method('__invoke')->will($this->returnArgument(0));
101
+                    ->method('__invoke')->will($this->returnArgument(0));
102 102
 
103 103
 
104 104
         $headscript = $this->getMockBuilder('\Laminas\View\Helper\HeadScript')
105
-                           ->disableOriginalConstructor()->getMock();
105
+                            ->disableOriginalConstructor()->getMock();
106 106
 
107 107
         $scripts = array('test/script.js', 'yetanother/test/script.tst');
108 108
 
@@ -111,9 +111,9 @@  discard block
 block discarded – undo
111 111
         $this->instanceMock = $instance;
112 112
 
113 113
         $headscript->expects($this->exactly(2))
114
-                   ->method('__call')->withConsecutive(
115
-                       array('appendFile', array($scripts[0])),
116
-                       array('appendFile', array($scripts[1]))
114
+                    ->method('__call')->withConsecutive(
115
+                        array('appendFile', array($scripts[0])),
116
+                        array('appendFile', array($scripts[1]))
117 117
             );
118 118
 
119 119
         $helpers = $this->getMockBuilder('\Laminas\View\HelperPluginManager')
@@ -128,9 +128,9 @@  discard block
 block discarded – undo
128 128
         $services = $this->formElementManagerMock;
129 129
 
130 130
         $services->expects($this->exactly(1))
131
-                 ->method('get')
132
-                 ->with('ViewHelperManager')
133
-                 ->willReturn($helpers)
131
+                    ->method('get')
132
+                    ->with('ViewHelperManager')
133
+                    ->willReturn($helpers)
134 134
         ;
135 135
 
136 136
         $this->target->initialize($instance, $services);
Please login to merge, or discard this patch.
module/Jobs/src/Factory/Form/ActiveOrganizationSelectFactory.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -53,13 +53,13 @@
 block discarded – undo
53 53
         if ($initialId) {
54 54
             /* @var $serviceLocator \Laminas\ServiceManager\AbstractPluginManager
55 55
              * @var $repository \Organizations\Repository\Organization */
56
-            $repositories   = $container->get('repositories');
56
+            $repositories = $container->get('repositories');
57 57
             $repository = $repositories->get('Organizations');
58
-            $organization  = $repository->find($initialId);
58
+            $organization = $repository->find($initialId);
59 59
             $organizations[] = $organization;
60 60
         }
61 61
 
62
-        $select         = new OrganizationSelect();
62
+        $select = new OrganizationSelect();
63 63
 
64 64
         $select->setSelectableOrganizations($organizations);
65 65
         $select->setAttribute('data-ajax', '?ajax=jobs.admin.activeorganizations');
Please login to merge, or discard this patch.
module/Jobs/src/Form/BaseFieldset.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -46,14 +46,14 @@  discard block
 block discarded – undo
46 46
 
47 47
             $locationsStrategy = new \Laminas\Hydrator\Strategy\ClosureStrategy(
48 48
                 /* extract */
49
-                function ($value) use ($geoLocationStrategy, $geoLocationIsMultiple) {
49
+                function($value) use ($geoLocationStrategy, $geoLocationIsMultiple) {
50 50
                     $value = $geoLocationIsMultiple ? $value : $value->first();
51 51
 
52 52
                     return $geoLocationStrategy->extract($value);
53 53
                 },
54 54
 
55 55
                 /* hydrate */
56
-                function ($value) use ($geoLocationStrategy, $geoLocationIsMultiple) {
56
+                function($value) use ($geoLocationStrategy, $geoLocationIsMultiple) {
57 57
                     if ($geoLocationIsMultiple) {
58 58
                         return $geoLocationStrategy->hydrate($value);
59 59
                     }
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
         $values = [];
124 124
         foreach ($this->object->getLocations() as $loc) {
125 125
             $values[] = trim(
126
-                $loc->getPostalCode() . ' ' . $loc->getCity() . ', ' . $loc->getRegion(),
126
+                $loc->getPostalCode().' '.$loc->getCity().', '.$loc->getRegion(),
127 127
                 ' ,'
128 128
             );
129 129
         }
130 130
 
131 131
         if (count($values)) {
132 132
             if ($isMultiple) {
133
-                return '<ul><li>' . join('</li><li>', $values) . '</li></ul>';
133
+                return '<ul><li>'.join('</li><li>', $values).'</li></ul>';
134 134
             } else {
135 135
                 return $values[0];
136 136
             }
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Listener/PublisherTest.php 2 patches
Indentation   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -131,62 +131,62 @@  discard block
 block discarded – undo
131 131
                 ->will($this->returnValue('<html />'));
132 132
 
133 133
         $this->viewPhpRendererStrategy = $this->getMockBuilder('\Laminas\View\Strategy\PhpRendererStrategy')
134
-                          ->disableOriginalConstructor()
135
-                          ->getMock();
134
+                            ->disableOriginalConstructor()
135
+                            ->getMock();
136 136
 
137 137
         $this->viewPhpRendererStrategy->expects($this->once())
138
-                          ->method('getRenderer')
139
-                          ->will($this->returnValue($this->renderer));
138
+                            ->method('getRenderer')
139
+                            ->will($this->returnValue($this->renderer));
140 140
 
141 141
         $this->response = $this->getMockBuilder('\Laminas\Http\Response')
142
-                                              ->disableOriginalConstructor()
143
-                                              ->getMock();
142
+                                                ->disableOriginalConstructor()
143
+                                                ->getMock();
144 144
 
145 145
         $this->jobEvent = $this->getMockBuilder('\Jobs\Listener\Events\JobEvent')
146
-                               ->disableOriginalConstructor()
147
-                               ->getMock();
146
+                                ->disableOriginalConstructor()
147
+                                ->getMock();
148 148
 
149 149
         $this->job = $this->getMockBuilder('\Jobs\Entity\Job')
150
-                          ->disableOriginalConstructor()
151
-                          ->getMock();
150
+                            ->disableOriginalConstructor()
151
+                            ->getMock();
152 152
 
153 153
         $this->publisher = $this->getMockBuilder('\Jobs\Entity\Publisher')
154
-                          ->disableOriginalConstructor()
155
-                          ->getMock();
154
+                            ->disableOriginalConstructor()
155
+                            ->getMock();
156 156
 
157 157
         $this->publisher->expects($this->at(0))
158
-                           ->method('__get')
159
-                           ->with('externalId')
160
-                           ->will($this->returnValue('externalId32'));
158
+                            ->method('__get')
159
+                            ->with('externalId')
160
+                            ->will($this->returnValue('externalId32'));
161 161
 
162 162
         $this->publisher->expects($this->at(1))
163
-                           ->method('__get')
164
-                           ->with('reference')
165
-                           ->will($this->returnValue('reference32'));
163
+                            ->method('__get')
164
+                            ->with('reference')
165
+                            ->will($this->returnValue('reference32'));
166 166
 
167 167
         $this->publisher->expects($this->any())
168
-                              ->method('__set')
169
-                              ->will($this->returnCallback($staticClassPrefix . 'publisherSetter'));
168
+                                ->method('__set')
169
+                                ->will($this->returnCallback($staticClassPrefix . 'publisherSetter'));
170 170
 
171 171
         $this->htmlAbsPathFilter = $this->getMockBuilder('\Core\Filter\HtmlAbsPathFilter')
172 172
                                     ->disableOriginalConstructor()
173 173
                                     ->getMock();
174 174
 
175 175
         $this->htmlAbsPathFilter->expects($this->any())
176
-                              ->method('filter')
177
-                              ->will($this->returnCallback($staticClassPrefix . 'absPathFilter'));
176
+                                ->method('filter')
177
+                                ->will($this->returnCallback($staticClassPrefix . 'absPathFilter'));
178 178
 
179 179
         $this->filterManager = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager')
180
-                                     ->disableOriginalConstructor()
181
-                                     ->getMock();
180
+                                        ->disableOriginalConstructor()
181
+                                        ->getMock();
182 182
 
183 183
         $this->filterManager->expects($this->at(0))
184 184
                         ->method('get')
185 185
                         ->willReturn($this->htmlAbsPathFilter);
186 186
 
187 187
         $this->restClient = $this->getMockBuilder('\Core\Service\RestClient')
188
-                                 ->disableOriginalConstructor()
189
-                                 ->getMock();
188
+                                    ->disableOriginalConstructor()
189
+                                    ->getMock();
190 190
 
191 191
         //$this->restClient->expects($this->at(0))
192 192
         //                   ->method('getHost')
@@ -202,8 +202,8 @@  discard block
 block discarded – undo
202 202
             ->will($this->returnValue($this->response));
203 203
 
204 204
         $this->organization = $this->getMockBuilder('\Organizations\Entity\Organization')
205
-                                 ->disableOriginalConstructor()
206
-                                 ->getMock();
205
+                                    ->disableOriginalConstructor()
206
+                                    ->getMock();
207 207
 
208 208
         $this->organization->expects($this->at(0))
209 209
                         ->method('__get')
@@ -211,21 +211,21 @@  discard block
 block discarded – undo
211 211
                         ->will($this->returnValue('name32'));
212 212
 
213 213
         $this->provider = $this->getMockBuilder('\Jobs\Options\ProviderOptions')
214
-                                   ->disableOriginalConstructor()
215
-                                   ->getMock();
214
+                                    ->disableOriginalConstructor()
215
+                                    ->getMock();
216 216
 
217 217
         $this->providerChannel = $this->getMockBuilder('\Jobs\Options\ChannelOptions')
218
-                                      ->disableOriginalConstructor()
219
-                                      ->getMock();
218
+                                        ->disableOriginalConstructor()
219
+                                        ->getMock();
220 220
 
221 221
         $this->providerChannel->expects($this->any())
222
-                              ->method('__get')
223
-                              ->will($this->returnCallback($staticClassPrefix . 'providerChannelGetter'));
222
+                                ->method('__get')
223
+                                ->will($this->returnCallback($staticClassPrefix . 'providerChannelGetter'));
224 224
 
225 225
         $this->provider->expects($this->any(0))
226
-                       ->method('__get')
227
-                       ->with('channels')
228
-                       ->willReturn(array('bbb value' => $this->providerChannel));
226
+                        ->method('__get')
227
+                        ->with('channels')
228
+                        ->willReturn(array('bbb value' => $this->providerChannel));
229 229
 
230 230
         $this->viewModel = $this->getMockBuilder('\Laminas\View\Model\ViewModel')
231 231
                                 ->disableOriginalConstructor()
@@ -306,13 +306,13 @@  discard block
 block discarded – undo
306 306
     protected function setRestReturn($referenceUpdate, $applyIdUpdate)
307 307
     {
308 308
         $this->response->expects($this->any())
309
-                       ->method('getBody')
310
-                       ->will($this->returnValue(json_encode(
311
-                           array(
312
-                               'referenceUpdate' => $referenceUpdate,
313
-                               'applyIdUpdate' => $applyIdUpdate
314
-                           )
315
-                       )));
309
+                        ->method('getBody')
310
+                        ->will($this->returnValue(json_encode(
311
+                            array(
312
+                                'referenceUpdate' => $referenceUpdate,
313
+                                'applyIdUpdate' => $applyIdUpdate
314
+                            )
315
+                        )));
316 316
     }
317 317
 
318 318
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
         
113 113
         $this->target = new Publisher($this->serviceManager);
114 114
 
115
-        $staticClassPrefix = '\\' . __CLASS__ . '::';
115
+        $staticClassPrefix = '\\'.__CLASS__.'::';
116 116
 
117 117
         $this->log = $this->getMockBuilder('\Laminas\Log\Logger')
118 118
             ->disableOriginalConstructor()
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 
167 167
         $this->publisher->expects($this->any())
168 168
                               ->method('__set')
169
-                              ->will($this->returnCallback($staticClassPrefix . 'publisherSetter'));
169
+                              ->will($this->returnCallback($staticClassPrefix.'publisherSetter'));
170 170
 
171 171
         $this->htmlAbsPathFilter = $this->getMockBuilder('\Core\Filter\HtmlAbsPathFilter')
172 172
                                     ->disableOriginalConstructor()
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
         $this->htmlAbsPathFilter->expects($this->any())
176 176
                               ->method('filter')
177
-                              ->will($this->returnCallback($staticClassPrefix . 'absPathFilter'));
177
+                              ->will($this->returnCallback($staticClassPrefix.'absPathFilter'));
178 178
 
179 179
         $this->filterManager = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager')
180 180
                                      ->disableOriginalConstructor()
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 
221 221
         $this->providerChannel->expects($this->any())
222 222
                               ->method('__get')
223
-                              ->will($this->returnCallback($staticClassPrefix . 'providerChannelGetter'));
223
+                              ->will($this->returnCallback($staticClassPrefix.'providerChannelGetter'));
224 224
 
225 225
         $this->provider->expects($this->any(0))
226 226
                        ->method('__get')
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Factory/JobEventManagerFactoryTest.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,8 +49,8 @@
 block discarded – undo
49 49
         $expectedIdentifiers = array('Jobs', 'Jobs/Events');
50 50
         $eventManager = new EventManager();
51 51
         $services = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager')
52
-                         ->disableOriginalConstructor()
53
-                         ->getMock();
52
+                            ->disableOriginalConstructor()
53
+                            ->getMock();
54 54
 
55 55
         $services->expects($this->once())->method('get')->with('EventManager')->willReturn($eventManager);
56 56
 
Please login to merge, or discard this patch.
module/Jobs/test/JobsTest/Factory/Model/ApiJobDehydratorFactoryTest.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,12 +57,12 @@
 block discarded – undo
57 57
                 ->willReturn($urlHelper);
58 58
 
59 59
         $serviceManagerMock = $this->getMockBuilder('\Laminas\ServiceManager\ServiceManager')
60
-                                   ->disableOriginalConstructor()
61
-                                   ->getMock();
60
+                                    ->disableOriginalConstructor()
61
+                                    ->getMock();
62 62
 
63 63
         $serviceManagerMock->expects($this->once())->method('get')
64
-                           ->with('ViewHelperManager')
65
-                           ->willReturn($helpers);
64
+                            ->with('ViewHelperManager')
65
+                            ->willReturn($helpers);
66 66
 
67 67
         $service = $target->__invoke($serviceManagerMock, 'irrelevant');
68 68
 
Please login to merge, or discard this patch.