Passed
Push — master ( 6292f6...e5b7ab )
by Mathias
10:49 queued 04:59
created
module/Core/test/CoreTest/Controller/AdminControllerEventTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 
31 31
     protected $target = '\Core\Controller\AdminControllerEvent';
32 32
 
33
-    protected $inheritance = [ '\Laminas\EventManager\Event' ];
33
+    protected $inheritance = ['\Laminas\EventManager\Event'];
34 34
 
35 35
     public function testCreatesModelPriorityListUponCreation()
36 36
     {
@@ -64,10 +64,10 @@  discard block
 block discarded – undo
64 64
     public function provideAddViewTemplateTestData()
65 65
     {
66 66
         return [
67
-            [ [ 'test', 'template' ], ['test', 'template', [], 0] ],
68
-            [ [ 'test', 'template', [ 'var' => 'iable']], [ 'test', 'template', [ 'var' => 'iable'], 0] ],
69
-            [ [ 'test', 'template', 10] , ['test', 'template', [], 10] ],
70
-            [ [ 'test', 'template', [ 'var' => 'iable'], 10 ], [ 'test', 'template', [ 'var' => 'iable'], 10 ]],
67
+            [['test', 'template'], ['test', 'template', [], 0]],
68
+            [['test', 'template', ['var' => 'iable']], ['test', 'template', ['var' => 'iable'], 0]],
69
+            [['test', 'template', 10], ['test', 'template', [], 10]],
70
+            [['test', 'template', ['var' => 'iable'], 10], ['test', 'template', ['var' => 'iable'], 10]],
71 71
         ];
72 72
     }
73 73
 
@@ -94,12 +94,12 @@  discard block
 block discarded – undo
94 94
     public function provideAddViewVariablesTestData()
95 95
     {
96 96
         return [
97
-            [ [ 'test' ] , ['test', ['name' => 'test'], 0] ],
98
-            [ [ 'test', [ 'var' => 'iable'] ], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 0 ] ],
99
-            [ [ 'test', [ 'var' => 'iable'], 10], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 10 ]],
100
-            [ [ [ 'name' => 'other', 'var' => 'test' ], 10], ['other', ['name' => 'other', 'var' => 'test' ], 10] ],
101
-            [ [ 'test', ['name' => 'other'] ], [ 'test', [ 'name' => 'other' ], 0] ],
102
-            [ [ 'test', 10 ], ['test', ['name' => 'test'], 10]],
97
+            [['test'], ['test', ['name' => 'test'], 0]],
98
+            [['test', ['var' => 'iable']], ['test', ['name' => 'test', 'var' => 'iable'], 0]],
99
+            [['test', ['var' => 'iable'], 10], ['test', ['name' => 'test', 'var' => 'iable'], 10]],
100
+            [[['name' => 'other', 'var' => 'test'], 10], ['other', ['name' => 'other', 'var' => 'test'], 10]],
101
+            [['test', ['name' => 'other']], ['test', ['name' => 'other'], 0]],
102
+            [['test', 10], ['test', ['name' => 'test'], 10]],
103 103
         ];
104 104
     }
105 105
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/AdminControllerTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@
 block discarded – undo
39 39
      */
40 40
     protected $target = '\Core\Controller\AdminController';
41 41
 
42
-    protected $inheritance = [ 'Laminas\Mvc\Controller\AbstractActionController' ];
42
+    protected $inheritance = ['Laminas\Mvc\Controller\AbstractActionController'];
43 43
 
44 44
     protected function setUp(): void
45 45
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/MailService/SendMailTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
     protected function setUp(): void
41 41
     {
42 42
         $test = $this;
43
-        $sendCallback = function ($value) use ($test) {
43
+        $sendCallback = function($value) use ($test) {
44 44
             return $value === $test->expectedMail;
45 45
         };
46 46
         $transport = $this->getMockForAbstractClass('\Laminas\Mail\Transport\TransportInterface');
@@ -109,9 +109,9 @@  discard block
 block discarded – undo
109 109
     public function testOverrideRecipient()
110 110
     {
111 111
         $overrideEmail = 'overidden@email';
112
-        $ccEmail="cc@email";
113
-        $bccEmail="bcc@email";
114
-        $toEmail="to@email";
112
+        $ccEmail = "cc@email";
113
+        $bccEmail = "bcc@email";
114
+        $toEmail = "to@email";
115 115
         
116 116
         $recipients = new AddressList();
117 117
         $recipients->add($overrideEmail);
@@ -128,13 +128,13 @@  discard block
 block discarded – undo
128 128
         $this->target->send($mail);
129 129
 
130 130
         $headers = $mail->getHeaders();
131
-        $expectedTo = 'To: ' . $overrideEmail;
131
+        $expectedTo = 'To: '.$overrideEmail;
132 132
         $this->assertFalse($headers->has('cc'));
133 133
         $this->assertFalse($headers->has('bcc'));
134 134
         $this->assertTrue($headers->has('X-Original-Recipients'));
135 135
 
136 136
         $this->assertEquals($expectedTo, $headers->get('to')->toString());
137
-        $this->assertEquals('X-Original-Recipients: To: ' . $toEmail . '; Cc: ' . $ccEmail . '; Bcc: ' . $bccEmail, $headers->get('X-Original-Recipients')->toString());
137
+        $this->assertEquals('X-Original-Recipients: To: '.$toEmail.'; Cc: '.$ccEmail.'; Bcc: '.$bccEmail, $headers->get('X-Original-Recipients')->toString());
138 138
     }
139 139
 
140 140
     public function testSetsXMailerHeader()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/OptionsAbstractFactoryTest.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -56,10 +56,10 @@  discard block
 block discarded – undo
56 56
         ];
57 57
 
58 58
         return [
59
-            [ [], 'testnameone', 'Test/Name.One', false ],
60
-            [ $cfg1, 'testnametwo', 'Test.Name/Two', true ],
61
-            [ $cfg1, 'othername', '', false ],
62
-            [ $cfg1, 'nonexistant', 'Non.Existant', false ],
59
+            [[], 'testnameone', 'Test/Name.One', false],
60
+            [$cfg1, 'testnametwo', 'Test.Name/Two', true],
61
+            [$cfg1, 'othername', '', false],
62
+            [$cfg1, 'nonexistant', 'Non.Existant', false],
63 63
         ];
64 64
     }
65 65
 
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
         $services = $this->getServiceLocatorMock($optionsConfig);
81 81
 
82
-        $method = "assert" . ($expected ? 'True' : 'False');
82
+        $method = "assert".($expected ? 'True' : 'False');
83 83
         $this->$method($target->canCreateServiceWithName($services, $name, $requestedName));
84 84
     }
85 85
 
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
         ];
92 92
 
93 93
         return [
94
-            [ [], 'Test/Name.One', false ],
95
-            [ $cfg1, 'Test.Name/Two', true ],
96
-            [ $cfg1, 'othername', true ],
97
-            [ $cfg1, 'Non.Existant', false ],
94
+            [[], 'Test/Name.One', false],
95
+            [$cfg1, 'Test.Name/Two', true],
96
+            [$cfg1, 'othername', true],
97
+            [$cfg1, 'Non.Existant', false],
98 98
         ];
99 99
     }
100 100
 
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 
144 144
         $services = $this->getServiceLocatorMock([
145 145
             'TestOption' => [
146
-                'class' => __NAMESPACE__ . '\SimpleOptionsMock',
146
+                'class' => __NAMESPACE__.'\SimpleOptionsMock',
147 147
                 'mode' => 'invalid',
148 148
             ]
149 149
         ]);
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
      */
159 159
     public function testCreatesSimpleOptionsInstance()
160 160
     {
161
-        $optionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
161
+        $optionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
162 162
         $cfg = [
163 163
             'SimpleOptions' => [
164 164
                 'class' => $optionsMockClass,
165
-                'options' => [ 'one' => 'three' ]
165
+                'options' => ['one' => 'three']
166 166
             ]
167 167
         ];
168 168
 
@@ -203,8 +203,8 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function testCreateNestedOptionsInstance()
205 205
     {
206
-        $nestedOptionsMockClass = __NAMESPACE__ . '\NestedOptionsMock';
207
-        $simpleOptionsMockClass = __NAMESPACE__ . '\SimpleOptionsMock';
206
+        $nestedOptionsMockClass = __NAMESPACE__.'\NestedOptionsMock';
207
+        $simpleOptionsMockClass = __NAMESPACE__.'\SimpleOptionsMock';
208 208
 
209 209
         $cfg = [
210 210
             'NestedOptions' => [
@@ -212,9 +212,9 @@  discard block
 block discarded – undo
212 212
                 'mode' => OptionsAbstractFactory::MODE_NESTED,
213 213
                 'options' => [
214 214
                     'skalar' => 'itsworking',
215
-                    'array' => [ 'its' => 'working' ],
216
-                    'opt1' => [ '__class__' => $simpleOptionsMockClass ],
217
-                    'opt2' => [ '__class__' => $simpleOptionsMockClass, 'two' => 'four' ],
215
+                    'array' => ['its' => 'working'],
216
+                    'opt1' => ['__class__' => $simpleOptionsMockClass],
217
+                    'opt2' => ['__class__' => $simpleOptionsMockClass, 'two' => 'four'],
218 218
                 ],
219 219
             ],
220 220
         ];
@@ -228,14 +228,14 @@  discard block
 block discarded – undo
228 228
 
229 229
         $this->assertInstanceOf($nestedOptionsMockClass, $options);
230 230
         $this->assertEquals('itsworking', $options->getSkalar());
231
-        $this->assertEquals([ 'its' => 'working' ], $options->getArray());
231
+        $this->assertEquals(['its' => 'working'], $options->getArray());
232 232
         $this->assertEquals('One', $options->getOpt1()->getOne());
233 233
         $this->assertEquals('four', $options->getOpt2()->getTwo());
234 234
     }
235 235
 
236 236
     protected function getServiceLocatorMock($optionsConfig = [])
237 237
     {
238
-        $optionsConfig = [ 'options' => $optionsConfig ];
238
+        $optionsConfig = ['options' => $optionsConfig];
239 239
         $services = $this->getMockBuilder('Laminas\ServiceManager\ServiceManager')->disableOriginalConstructor()->getMock();
240 240
 
241 241
         $services->expects($this->once())->method('get')->with('config')->willReturn($optionsConfig);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 class SimpleOptionsMock extends AbstractOptions
248 248
 {
249 249
     protected $one = "One";
250
-    protected $two= "Two";
250
+    protected $two = "Two";
251 251
 
252 252
     /**
253 253
      * @param string $one
Please login to merge, or discard this patch.
Core/test/CoreTest/Factory/Navigation/DefaultNavigationFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     private $target = DefaultNavigationFactory::class;
37 37
 
38
-    private $inheritance = [ '\Laminas\Navigation\Service\DefaultNavigationFactory' ];
38
+    private $inheritance = ['\Laminas\Navigation\Service\DefaultNavigationFactory'];
39 39
 
40 40
     public function testSetsActiveFlagOnPagesProvidingTheActiveOnOption()
41 41
     {
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 'active_on' => 'notMatchedRoute',
48 48
             ],
49 49
             'page3' => [
50
-                'active_on' => [ 'matchedRouteName', 'anotherRoute' ],
50
+                'active_on' => ['matchedRouteName', 'anotherRoute'],
51 51
             ],
52 52
             'page4' => []
53 53
         ];
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                 'active_on' => 'notMatchedRoute',
78 78
             ],
79 79
             'page3' => [
80
-                'active_on' => [ 'matchedRouteName', 'anotherRoute' ],
80
+                'active_on' => ['matchedRouteName', 'anotherRoute'],
81 81
             ],
82 82
             'page4' => []
83 83
         ];
Please login to merge, or discard this patch.
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 1 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.
EventManagerAbstractFactory/InheritanceAndConfigMergingTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         '@testCanCreateServiceWithName' => ['mock' => ['canCreate' => 1]],
41 41
     ];
42 42
 
43
-    protected $inheritance = [ '\Laminas\ServiceManager\Factory\AbstractFactoryInterface' ];
43
+    protected $inheritance = ['\Laminas\ServiceManager\Factory\AbstractFactoryInterface'];
44 44
 
45 45
     public function testDeterminesIfItCanCreateAnEventManagerByName()
46 46
     {
@@ -66,17 +66,17 @@  discard block
 block discarded – undo
66 66
         $config1 = [];
67 67
 
68 68
         $config2 = [
69
-            'event_manager' => [ 'Test2/Events' => [
69
+            'event_manager' => ['Test2/Events' => [
70 70
                 'service' => 'TestService',
71 71
                 'configure' => false,
72
-                'identifiers' => [ 'TestEvents', 'AnotherId' ],
72
+                'identifiers' => ['TestEvents', 'AnotherId'],
73 73
                 'event' => 'SomeEventClass',
74
-                'listeners' => [ 'listener' => 'event' ]
74
+                'listeners' => ['listener' => 'event']
75 75
             ]]
76 76
         ];
77 77
         return [
78
-            [ $config1, 'Test1/Events' ],
79
-            [ $config2, 'Test2/Events' ],
78
+            [$config1, 'Test1/Events'],
79
+            [$config2, 'Test2/Events'],
80 80
         ];
81 81
     }
82 82
 
@@ -91,14 +91,14 @@  discard block
 block discarded – undo
91 91
         $defaults = [
92 92
             'service' => 'EventManager',
93 93
             'configure' => true,
94
-            'identifiers' => [ $reqName ],
94
+            'identifiers' => [$reqName],
95 95
             'event' => '\Laminas\EventManager\Event',
96 96
             'listeners' => [],
97 97
         ];
98 98
 
99 99
         /* @var EventManagerAbstractFactory|\PHPUnit_Framework_MockObject_MockObject $target */
100 100
         $target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
101
-                       ->setMethods([ 'createEventManager', 'attachListeners' ])
101
+                       ->setMethods(['createEventManager', 'attachListeners'])
102 102
                        ->getMock();
103 103
 
104 104
         $services = new ServiceManager();
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.