Passed
Push — develop ( 86ca6f...0e6a78 )
by Mathias
22:00 queued 14:21
created
EventManagerAbstractFactory/InheritanceAndConfigMergingTest.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -44,16 +44,16 @@  discard block
 block discarded – undo
44 44
     {
45 45
         $services = new ServiceManager();
46 46
         $this->assertTrue(
47
-             $this->target->canCreate(
47
+                $this->target->canCreate(
48 48
                 $services,'Any.string/Value/Events'
49
-             ),
50
-             'Checking correct name failed.'
49
+                ),
50
+                'Checking correct name failed.'
51 51
         );
52 52
         $this->assertFalse(
53
-             $this->target->canCreate(
53
+                $this->target->canCreate(
54 54
                 $services,'Any.string.not.ending/in/Events.but has it in the middle!'
55
-             ),
56
-             'Checking invalid name failed.'
55
+                ),
56
+                'Checking invalid name failed.'
57 57
         );
58 58
     }
59 59
 
@@ -94,8 +94,8 @@  discard block
 block discarded – undo
94 94
 
95 95
         /* @var EventManagerAbstractFactory|\PHPUnit_Framework_MockObject_MockObject $target */
96 96
         $target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
97
-                       ->setMethods([ 'createEventManager', 'attachListeners' ])
98
-                       ->getMock();
97
+                        ->setMethods([ 'createEventManager', 'attachListeners' ])
98
+                        ->getMock();
99 99
 
100 100
         $services = new ServiceManager();
101 101
         $services->setService('Config', $config);
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -38,20 +38,20 @@  discard block
 block discarded – undo
38 38
         '@testCanCreateServiceWithName' => ['mock' => ['canCreate' => 1]],
39 39
     ];
40 40
 
41
-    protected $inheritance = [ '\Zend\ServiceManager\Factory\AbstractFactoryInterface' ];
41
+    protected $inheritance = ['\Zend\ServiceManager\Factory\AbstractFactoryInterface'];
42 42
 
43 43
     public function testDeterminesIfItCanCreateAnEventManagerByName()
44 44
     {
45 45
         $services = new ServiceManager();
46 46
         $this->assertTrue(
47 47
              $this->target->canCreate(
48
-                $services,'Any.string/Value/Events'
48
+                $services, 'Any.string/Value/Events'
49 49
              ),
50 50
              'Checking correct name failed.'
51 51
         );
52 52
         $this->assertFalse(
53 53
              $this->target->canCreate(
54
-                $services,'Any.string.not.ending/in/Events.but has it in the middle!'
54
+                $services, 'Any.string.not.ending/in/Events.but has it in the middle!'
55 55
              ),
56 56
              'Checking invalid name failed.'
57 57
         );
@@ -62,17 +62,17 @@  discard block
 block discarded – undo
62 62
         $config1 = [];
63 63
 
64 64
         $config2 = [
65
-            'event_manager' => [ 'Test2/Events' => [
65
+            'event_manager' => ['Test2/Events' => [
66 66
                 'service' => 'TestService',
67 67
                 'configure' => false,
68
-                'identifiers' => [ 'TestEvents', 'AnotherId' ],
68
+                'identifiers' => ['TestEvents', 'AnotherId'],
69 69
                 'event' => 'SomeEventClass',
70
-                'listeners' => [ 'listener' => 'event' ]
70
+                'listeners' => ['listener' => 'event']
71 71
             ]]
72 72
         ];
73 73
         return [
74
-            [ $config1, 'Test1/Events' ],
75
-            [ $config2, 'Test2/Events' ],
74
+            [$config1, 'Test1/Events'],
75
+            [$config2, 'Test2/Events'],
76 76
         ];
77 77
     }
78 78
 
@@ -87,14 +87,14 @@  discard block
 block discarded – undo
87 87
         $defaults = [
88 88
             'service' => 'EventManager',
89 89
             'configure' => true,
90
-            'identifiers' => [ $reqName ],
90
+            'identifiers' => [$reqName],
91 91
             'event' => '\Zend\EventManager\Event',
92 92
             'listeners' => [],
93 93
         ];
94 94
 
95 95
         /* @var EventManagerAbstractFactory|\PHPUnit_Framework_MockObject_MockObject $target */
96 96
         $target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
97
-                       ->setMethods([ 'createEventManager', 'attachListeners' ])
97
+                       ->setMethods(['createEventManager', 'attachListeners'])
98 98
                        ->getMock();
99 99
 
100 100
         $services = new ServiceManager();
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 
109 109
         $target->expects($this->once())->method('createEventManager')->with($services, $expected);
110 110
 
111
-        $target($services,$reqName);
111
+        $target($services, $reqName);
112 112
     }
113 113
 
114 114
     public function testCanCreateServiceWithName()
Please login to merge, or discard this patch.
Factory/EventManager/EventManagerAbstractFactory/CreateEventManagerTest.php 2 patches
Indentation   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
     public function setUp()
40 40
     {
41 41
         $this->target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
42
-                             ->setMethods([ 'attachListeners', 'getConfig' ])
43
-                             ->getMock();
42
+                                ->setMethods([ 'attachListeners', 'getConfig' ])
43
+                                ->getMock();
44 44
 
45 45
     }
46 46
 
@@ -59,17 +59,17 @@  discard block
 block discarded – undo
59 59
             $config['event'] = '\Zend\EventManager\Event';
60 60
         }
61 61
         $this->target
62
-	        ->expects($this->once())
63
-	        ->method('getConfig')
64
-	        ->willReturn($config)
62
+            ->expects($this->once())
63
+            ->method('getConfig')
64
+            ->willReturn($config)
65 65
         ;
66 66
     }
67 67
 
68 68
     protected function getServiceManagerMock($events, $args = [])
69 69
     {
70 70
         $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')
71
-                         ->disableOriginalConstructor()
72
-                         ->getMock();
71
+                            ->disableOriginalConstructor()
72
+                            ->getMock();
73 73
 
74 74
 
75 75
         if (is_Array($events)) {
@@ -96,11 +96,11 @@  discard block
 block discarded – undo
96 96
                  ->method('has')->will($this->returnValueMap($hasMap));
97 97
         */
98 98
         $services->expects($this->any())
99
-	        ->method('has')
100
-	        ->will($this->returnValueMap($hasMap))
99
+            ->method('has')
100
+            ->will($this->returnValueMap($hasMap))
101 101
         ;
102 102
         $services->expects($this->exactly(count($getMap)))
103
-                 ->method('get')->will($this->returnValueMap($getMap));
103
+                    ->method('get')->will($this->returnValueMap($getMap));
104 104
 
105 105
         return $services;
106 106
     }
@@ -130,8 +130,8 @@  discard block
 block discarded – undo
130 130
 
131 131
     public function testThrowsExceptionIfNoEventManagerCanBeCreated()
132 132
     {
133
-    	$this->expectException(\UnexpectedValueException::class);
134
-    	$this->expectExceptionMessage('Cannot create');
133
+        $this->expectException(\UnexpectedValueException::class);
134
+        $this->expectExceptionMessage('Cannot create');
135 135
 
136 136
         $this->setTargetConfig(['service' => 'NonExistantClass' ]);
137 137
 
@@ -165,9 +165,9 @@  discard block
 block discarded – undo
165 165
         $events = $this->getMockBuilder('\Core\EventManager\EventManager')->disableOriginalConstructor()
166 166
                         ->setMethods(['setIdentifiers', 'setEventPrototype'])->getMock();
167 167
         $events
168
-	        ->expects($this->once())
169
-	        ->method('setEventPrototype')
170
-	        ->with($event)
168
+            ->expects($this->once())
169
+            ->method('setEventPrototype')
170
+            ->with($event)
171 171
         ;
172 172
 
173 173
         $services = $this->getServiceManagerMock(['EventManager' => $events], [ 'Event' => $event ]);
@@ -179,14 +179,14 @@  discard block
 block discarded – undo
179 179
     {
180 180
         $event = new \Zend\EventManager\Event();
181 181
         $events = $this->getMockBuilder('\Zend\EventManager\EventManager')
182
-                       ->disableOriginalConstructor()
183
-                       ->setMethods(['setIdentifiers', 'setEventPrototype'])
184
-                       ->getMock()
182
+                        ->disableOriginalConstructor()
183
+                        ->setMethods(['setIdentifiers', 'setEventPrototype'])
184
+                        ->getMock()
185 185
         ;
186 186
         $events
187
-	        ->expects($this->once())
188
-	        ->method('setEventPrototype')
189
-	        ->with($this->isInstanceOf(Event::class))
187
+            ->expects($this->once())
188
+            ->method('setEventPrototype')
189
+            ->with($this->isInstanceOf(Event::class))
190 190
         ;
191 191
 
192 192
         $services = $this->getServiceManagerMock(['EventManager' => $events]);
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function setUp()
40 40
     {
41 41
         $this->target = $this->getMockBuilder('\Core\Factory\EventManager\EventManagerAbstractFactory')
42
-                             ->setMethods([ 'attachListeners', 'getConfig' ])
42
+                             ->setMethods(['attachListeners', 'getConfig'])
43 43
                              ->getMock();
44 44
 
45 45
     }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $config['listeners'] = [];
54 54
         }
55 55
         if (!isset($config['identifiers'])) {
56
-            $config['identifiers'] = [ 'Test/Events/Manager' ];
56
+            $config['identifiers'] = ['Test/Events/Manager'];
57 57
         }
58 58
         if (!isset($config['event'])) {
59 59
             $config['event'] = '\Zend\EventManager\Event';
@@ -80,15 +80,15 @@  discard block
 block discarded – undo
80 80
             $eventsService = 'Test/Events/Manager';
81 81
         }
82 82
 
83
-        $hasMap = [ [ $eventsService, true ] ];
84
-        $getMap = [ [ $eventsService, $events ] ];
83
+        $hasMap = [[$eventsService, true]];
84
+        $getMap = [[$eventsService, $events]];
85 85
 
86 86
         foreach ($args as $serviceName => $serviceValue) {
87 87
             if (false === $serviceValue) {
88
-                $hasMap[] = [ $serviceName, true ];
88
+                $hasMap[] = [$serviceName, true];
89 89
             } else {
90
-                $hasMap[] = [ $serviceName, true];
91
-                $getMap[] = [ $serviceName, $serviceValue ];
90
+                $hasMap[] = [$serviceName, true];
91
+                $getMap[] = [$serviceName, $serviceValue];
92 92
             }
93 93
         }
94 94
 
@@ -112,7 +112,7 @@  discard block
 block discarded – undo
112 112
 
113 113
         $services->setService('Test/Events/Manager', $events);
114 114
 
115
-        $this->setTargetConfig([ 'service' => 'Test/Events/Manager', 'configure' => false, 'listeners' => []]);
115
+        $this->setTargetConfig(['service' => 'Test/Events/Manager', 'configure' => false, 'listeners' => []]);
116 116
 
117 117
         $this->target->expects($this->once())->method('attachListeners')->with($services, $events, []);
118 118
         $this->target->createServiceWithName($services, 'irrelevant', 'Test/Events');
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 
121 121
     public function testInstatiatesEventManagerFromClassName()
122 122
     {
123
-        $this->setTargetConfig([ 'service' => '\Zend\EventManager\EventManager', 'configure' => false, 'listeners' => []]);
123
+        $this->setTargetConfig(['service' => '\Zend\EventManager\EventManager', 'configure' => false, 'listeners' => []]);
124 124
 
125 125
         $services = new ServiceManager();
126 126
         $events = $this->target->createServiceWithName($services, 'irrelevant', 'irrelevant');
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     	$this->expectException(\UnexpectedValueException::class);
134 134
     	$this->expectExceptionMessage('Cannot create');
135 135
 
136
-        $this->setTargetConfig(['service' => 'NonExistantClass' ]);
136
+        $this->setTargetConfig(['service' => 'NonExistantClass']);
137 137
 
138 138
         $this->target->createServiceWithName(new ServiceManager(), 'irrelevant', 'irrelevant');
139 139
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 
150 150
     public function testSetsIdentifiersOnEventManagerInstance()
151 151
     {
152
-        $ids = [ 'testID', 'TestId2' ];
152
+        $ids = ['testID', 'TestId2'];
153 153
         $events = new EventManager();
154 154
         $services = $this->getServiceManagerMock(['EventManager' => $events]);
155 155
         $this->setTargetConfig(['configure' => true, 'identifiers' => $ids, 'service' => 'EventManager']);
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 	        ->with($event)
171 171
         ;
172 172
 
173
-        $services = $this->getServiceManagerMock(['EventManager' => $events], [ 'Event' => $event ]);
173
+        $services = $this->getServiceManagerMock(['EventManager' => $events], ['Event' => $event]);
174 174
         $this->setTargetConfig(['configure' => true, 'service' => 'EventManager', 'event' => 'Event']);
175 175
         $this->target->createServiceWithName($services, 'irrelevant', 'Test/Events');
176 176
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/AdminControllerEventTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 
29 29
     protected $target = '\Core\Controller\AdminControllerEvent';
30 30
 
31
-    protected $inheritance = [ '\Zend\EventManager\Event' ];
31
+    protected $inheritance = ['\Zend\EventManager\Event'];
32 32
 
33 33
     public function testCreatesModelPriorityListUponCreation()
34 34
     {
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
     public function provideAddViewTemplateTestData()
63 63
     {
64 64
         return [
65
-            [ [ 'test', 'template' ], ['test', 'template', [], 0] ],
66
-            [ [ 'test', 'template', [ 'var' => 'iable']], [ 'test', 'template', [ 'var' => 'iable'], 0] ],
67
-            [ [ 'test', 'template', 10] , ['test', 'template', [], 10] ],
68
-            [ [ 'test', 'template', [ 'var' => 'iable'], 10 ], [ 'test', 'template', [ 'var' => 'iable'], 10 ]],
65
+            [['test', 'template'], ['test', 'template', [], 0]],
66
+            [['test', 'template', ['var' => 'iable']], ['test', 'template', ['var' => 'iable'], 0]],
67
+            [['test', 'template', 10], ['test', 'template', [], 10]],
68
+            [['test', 'template', ['var' => 'iable'], 10], ['test', 'template', ['var' => 'iable'], 10]],
69 69
         ];
70 70
     }
71 71
 
@@ -91,12 +91,12 @@  discard block
 block discarded – undo
91 91
     public function provideAddViewVariablesTestData()
92 92
     {
93 93
         return [
94
-            [ [ 'test' ] , ['test', ['name' => 'test'], 0] ],
95
-            [ [ 'test', [ 'var' => 'iable'] ], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 0 ] ],
96
-            [ [ 'test', [ 'var' => 'iable'], 10], [ 'test', [ 'name' => 'test', 'var' => 'iable'], 10 ]],
97
-            [ [ [ 'name' => 'other', 'var' => 'test' ], 10], ['other', ['name' => 'other', 'var' => 'test' ], 10] ],
98
-            [ [ 'test', ['name' => 'other'] ], [ 'test', [ 'name' => 'other' ], 0] ],
99
-            [ [ 'test', 10 ], ['test', ['name' => 'test'], 10]],
94
+            [['test'], ['test', ['name' => 'test'], 0]],
95
+            [['test', ['var' => 'iable']], ['test', ['name' => 'test', 'var' => 'iable'], 0]],
96
+            [['test', ['var' => 'iable'], 10], ['test', ['name' => 'test', 'var' => 'iable'], 10]],
97
+            [[['name' => 'other', 'var' => 'test'], 10], ['other', ['name' => 'other', 'var' => 'test'], 10]],
98
+            [['test', ['name' => 'other']], ['test', ['name' => 'other'], 0]],
99
+            [['test', 10], ['test', ['name' => 'test'], 10]],
100 100
         ];
101 101
     }
102 102
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/FileControllerTest.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -80,17 +80,17 @@  discard block
 block discarded – undo
80 80
         $plugins->expects($this->any())
81 81
             ->method('get')
82 82
             ->willReturnMap([
83
-                ['acl',null,$this->aclPlugin],
84
-                ['params',null,$this->paramsPlugin]
83
+                ['acl', null, $this->aclPlugin],
84
+                ['params', null, $this->paramsPlugin]
85 85
             ])
86 86
         ;
87 87
 
88 88
         $this->paramsPlugin->expects($this->any())
89 89
             ->method('__invoke')
90 90
             ->willReturnMap([
91
-                [null,null,$this->paramsPlugin],
92
-                ['filestore',null,'store.entity'],
93
-                ['fileId',0,'dir/file.ext']
91
+                [null, null, $this->paramsPlugin],
92
+                ['filestore', null, 'store.entity'],
93
+                ['fileId', 0, 'dir/file.ext']
94 94
             ])
95 95
         ;
96 96
         $this->paramsPlugin->expects($this->any())
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
         ;
121 121
 
122 122
         $response = $this->controller->dispatch($request);
123
-        $this->assertInstanceOf(Response::class,$response);
123
+        $this->assertInstanceOf(Response::class, $response);
124 124
         $this->assertResponseStatusCode(Response::STATUS_CODE_404);
125 125
     }
126 126
 
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         ;
138 138
 
139 139
         $response = $this->controller->dispatch($request);
140
-        $this->assertInstanceOf(Response::class,$response);
140
+        $this->assertInstanceOf(Response::class, $response);
141 141
         $this->assertResponseStatusCode(Response::STATUS_CODE_404);
142 142
         $this->assertEquals(
143 143
             $this->event->getParam('exception'),
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
         ;
175 175
 
176 176
 
177
-        $resource = fopen(__FILE__,'r');
177
+        $resource = fopen(__FILE__, 'r');
178 178
         $file->expects($this->once())
179 179
             ->method('getResource')
180 180
             ->willReturn($resource)
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         ob_end_clean();
187 187
 
188 188
         $this->assertResponseStatusCode(Response::STATUS_CODE_200);
189
-        $this->assertStringEqualsFile(__FILE__,$output);
189
+        $this->assertStringEqualsFile(__FILE__, $output);
190 190
         $this->assertEquals(
191 191
             'type',
192 192
             $this->getResponseHeader('Content-Type')->getFieldValue()
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
         $request->setMethod(Request::METHOD_GET);
204 204
         $headers = $request->getHeaders();
205 205
         $headers
206
-            ->addHeaderLine('X_REQUESTED_WITH','XMLHttpRequest')
206
+            ->addHeaderLine('X_REQUESTED_WITH', 'XMLHttpRequest')
207 207
         ;
208 208
 
209 209
         $repo = $this->createMock(ObjectRepository::class);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
         ;
222 222
 
223 223
         $output = $this->controller->dispatch($request);
224
-        $this->assertInstanceOf(JsonModel::class,$output);
224
+        $this->assertInstanceOf(JsonModel::class, $output);
225 225
         $this->assertEquals(
226 226
             '{"result":false,"message":"File not found."}',
227 227
             $output->serialize()
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $request = new Request();
234 234
         $headers = $request->getHeaders();
235 235
         $headers
236
-            ->addHeaderLine('X_REQUESTED_WITH','XMLHttpRequest')
236
+            ->addHeaderLine('X_REQUESTED_WITH', 'XMLHttpRequest')
237 237
         ;
238 238
 
239 239
         $repo = $this->createMock(ObjectRepository::class);
@@ -273,8 +273,8 @@  discard block
 block discarded – undo
273 273
 
274 274
         /* @var \Zend\View\Model\JsonModel $output */
275 275
         $output = $this->controller->dispatch($request);
276
-        $this->assertInstanceOf(JsonModel::class,$output);
277
-        $this->assertEquals('{"result":true}',$output->serialize());
276
+        $this->assertInstanceOf(JsonModel::class, $output);
277
+        $this->assertEquals('{"result":true}', $output->serialize());
278 278
     }
279 279
 
280 280
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/ContentControllerTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
         $request = $this->createMock(Request::class);
46 46
 
47 47
         $target = $this->getMockBuilder(ContentController::class)
48
-            ->setMethods(['getRequest','getPluginManager'])
48
+            ->setMethods(['getRequest', 'getPluginManager'])
49 49
             ->getMock()
50 50
         ;
51 51
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
         $request->expects($this->exactly(2))
67 67
             ->method('isXmlHttpRequest')
68
-            ->willReturnOnConsecutiveCalls(false,true)
68
+            ->willReturnOnConsecutiveCalls(false, true)
69 69
         ;
70 70
 
71 71
         $params->expects($this->exactly(2))
@@ -77,13 +77,13 @@  discard block
 block discarded – undo
77 77
 
78 78
         $viewModel = $target->indexAction();
79 79
         $this->assertEquals(
80
-            'content/some_view',$viewModel->getTemplate()
80
+            'content/some_view', $viewModel->getTemplate()
81 81
         );
82 82
         $this->assertFalse($viewModel->terminate());
83 83
 
84 84
         $viewModel = $target->indexAction();
85 85
         $this->assertEquals(
86
-            'content/some_view',$viewModel->getTemplate()
86
+            'content/some_view', $viewModel->getTemplate()
87 87
         );
88 88
         $this->assertTrue($viewModel->terminate());
89 89
     }
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         $request = $this->createMock(Request::class);
96 96
 
97 97
         $target = $this->getMockBuilder(ContentController::class)
98
-            ->setMethods(['getRequest','getPluginManager'])
98
+            ->setMethods(['getRequest', 'getPluginManager'])
99 99
             ->getMock()
100 100
         ;
101 101
 
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         $request->expects($this->exactly(2))
117 117
             ->method('isXmlHttpRequest')
118
-            ->willReturnOnConsecutiveCalls(false,true)
118
+            ->willReturnOnConsecutiveCalls(false, true)
119 119
         ;
120 120
 
121 121
         $params->expects($this->exactly(2))
@@ -127,13 +127,13 @@  discard block
 block discarded – undo
127 127
 
128 128
         $viewModel = $target->modalAction();
129 129
         $this->assertEquals(
130
-            'some_view',$viewModel->getTemplate()
130
+            'some_view', $viewModel->getTemplate()
131 131
         );
132 132
         $this->assertFalse($viewModel->terminate());
133 133
 
134 134
         $viewModel = $target->modalAction();
135 135
         $this->assertEquals(
136
-            'some_view',$viewModel->getTemplate()
136
+            'some_view', $viewModel->getTemplate()
137 137
         );
138 138
         $this->assertTrue($viewModel->terminate());
139 139
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/Plugin/MailerTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
         $mail = new Message();
102 102
 
103 103
         // test return to Mailer when $mail is null
104
-        $this->assertSame($target,$target());
104
+        $this->assertSame($target, $target());
105 105
 
106 106
         // test invokation send directly
107 107
         // if $mail instance of Message class
@@ -110,21 +110,21 @@  discard block
 block discarded – undo
110 110
             ->with($mail)
111 111
             ->willReturn('returned value')
112 112
         ;
113
-        $this->assertEquals('returned value',$target($mail));
113
+        $this->assertEquals('returned value', $target($mail));
114 114
 
115 115
         // convert plugin into message
116 116
         $mailService->expects($this->exactly(2))
117 117
             ->method('get')
118
-            ->with('some plugin',array())
118
+            ->with('some plugin', array())
119 119
             ->willReturn($mail)
120 120
         ;
121 121
         $this->assertEquals(
122 122
             $mail,
123
-            $target('some plugin',array())
123
+            $target('some plugin', array())
124 124
         );
125 125
         $this->assertEquals(
126 126
             'returned value',
127
-            $target('some plugin',true,true)
127
+            $target('some plugin', true, true)
128 128
         );
129 129
 
130 130
     }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/Plugin/NotificationTest.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
         $mock->expects($this->once())
77 77
             ->method('addMessage')
78
-            ->with('some message',Notification::NAMESPACE_SUCCESS)
78
+            ->with('some message', Notification::NAMESPACE_SUCCESS)
79 79
             ->willReturn($mock)
80 80
         ;
81 81
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
         );
88 88
         $this->assertSame(
89 89
             $mock,
90
-            $mock('some message',Notification::NAMESPACE_SUCCESS)
90
+            $mock('some message', Notification::NAMESPACE_SUCCESS)
91 91
         );
92 92
     }
93 93
 
@@ -100,12 +100,12 @@  discard block
 block discarded – undo
100 100
         $translator->expects($this->once())
101 101
             ->method('translate')
102 102
             ->willReturnMap([
103
-                ['some message','default','translated some message'],
103
+                ['some message', 'default', 'translated some message'],
104 104
             ])
105 105
         ;
106 106
         $listener->expects($this->exactly(2))
107 107
             ->method('trigger')
108
-            ->with(NotificationEvent::EVENT_NOTIFICATION_ADD,$this->isInstanceOf(NotificationEvent::class))
108
+            ->with(NotificationEvent::EVENT_NOTIFICATION_ADD, $this->isInstanceOf(NotificationEvent::class))
109 109
         ;
110 110
 
111 111
         $target->setTranslator($translator);
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      * @param string $message
123 123
      * @dataProvider getTestCreateNamespacedMessages
124 124
      */
125
-    public function testCreateNamespacedMessages($method,$message)
125
+    public function testCreateNamespacedMessages($method, $message)
126 126
     {
127 127
         $mock = $this->getMockBuilder(Notification::class)
128 128
             ->disableOriginalConstructor()
@@ -136,21 +136,21 @@  discard block
 block discarded – undo
136 136
             ->willReturn($mock)
137 137
         ;
138 138
 
139
-        $callback = array($mock,$method);
139
+        $callback = array($mock, $method);
140 140
         $this->assertSame(
141 141
             $mock,
142
-            call_user_func($callback,$message)
142
+            call_user_func($callback, $message)
143 143
         );
144 144
     }
145 145
 
146 146
     public function getTestCreateNamespacedMessages()
147 147
     {
148 148
         return [
149
-            ['info','info message'],
150
-            ['warning','warning message'],
151
-            ['success','success message'],
152
-            ['danger','danger message'],
153
-            ['error','error message']
149
+            ['info', 'info message'],
150
+            ['warning', 'warning message'],
151
+            ['success', 'success message'],
152
+            ['danger', 'danger message'],
153
+            ['error', 'error message']
154 154
         ];
155 155
     }
156 156
 
@@ -173,8 +173,8 @@  discard block
 block discarded – undo
173 173
         $events->expects($this->exactly(2))
174 174
             ->method('getNotifications')
175 175
             ->willReturnOnConsecutiveCalls(
176
-                [],// setup for empty array test
177
-                [$entity1,$entity2] // setup for non empty array tests
176
+                [], // setup for empty array test
177
+                [$entity1, $entity2] // setup for non empty array tests
178 178
             )
179 179
         ;
180 180
 
@@ -191,8 +191,8 @@  discard block
 block discarded – undo
191 191
         $mock->expects($this->exactly(2))
192 192
             ->method('renderMessage')
193 193
             ->withConsecutive(
194
-                ['some notification',Notification::NAMESPACE_INFO],
195
-                ['some notification',Notification::NAMESPACE_DANGER]
194
+                ['some notification', Notification::NAMESPACE_INFO],
195
+                ['some notification', Notification::NAMESPACE_DANGER]
196 196
             )
197 197
         ;
198 198
         $mock->createOutput($events);
@@ -222,6 +222,6 @@  discard block
 block discarded – undo
222 222
             ->willReturn($flash)
223 223
         ;
224 224
 
225
-        $target->renderMessage('some message',Notification::NAMESPACE_INFO);
225
+        $target->renderMessage('some message', Notification::NAMESPACE_INFO);
226 226
     }
227 227
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/Plugin/CreatePaginatorTest.php 3 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -92,13 +92,13 @@
 block discarded – undo
92 92
             ->disableOriginalConstructor()
93 93
             ->getMock()
94 94
         ;
95
-	    $container = $this->getMockBuilder(ContainerInterface::class)
96
-	                      ->getMock();
97
-	    $container->expects($this->once())
98
-		    ->method('get')
99
-		    ->with('ServiceManager')
100
-		    ->willReturn($sm)
101
-		;
95
+        $container = $this->getMockBuilder(ContainerInterface::class)
96
+                            ->getMock();
97
+        $container->expects($this->once())
98
+            ->method('get')
99
+            ->with('ServiceManager')
100
+            ->willReturn($sm)
101
+        ;
102 102
 		    
103 103
         $em = $this->getMockBuilder(EventManager::class)
104 104
             ->disableOriginalConstructor()
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -49,10 +49,10 @@  discard block
 block discarded – undo
49 49
     public function providePaginatorCreationData()
50 50
     {
51 51
         return [
52
-            [ 'Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5] ],
53
-            [ 'Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5] ],
54
-            [ 'Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2] ],
55
-            [ 'Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]],
52
+            ['Test/Paginator', ['test' => 'value'], ['merged' => 'yes'], false, ['page' => 1, 'count' => 10, 'range' => 5]],
53
+            ['Test2/YetAnotherPager', ['page' => 2], [], true, ['page' => 2, 'count' => 10, 'range' => 5]],
54
+            ['Yet/Another', ['page' => 3, 'count' => 90, 'range' => 2], false, false, ['page' => 3, 'count' => 90, 'range' => 2]],
55
+            ['Even/Another', ['test' => 'value'], [], new \ArrayObject(['test' => 'value']), ['page' => 1, 'count' => 10, 'range' => 5]],
56 56
         ];
57 57
     }
58 58
 
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     public function testPaginatorCreation($paginatorName, $params, $defaultParams, $usePostParams, $expect)
71 71
     {
72 72
         if ($defaultParams) { $options = array_merge($params, $defaultParams); }
73
-        else                { $options = $params; }
73
+        else { $options = $params; }
74 74
         $request = new Request();
75 75
         if ($usePostParams) {
76 76
             $request->setPost(new Parameters($params));
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 		    
103 103
         $em = $this->getMockBuilder(EventManager::class)
104 104
             ->disableOriginalConstructor()
105
-            ->setMethods(['getEvent','triggerEvent'])
105
+            ->setMethods(['getEvent', 'triggerEvent'])
106 106
             ->getMock()
107 107
         ;
108 108
 	    
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -69,8 +69,7 @@
 block discarded – undo
69 69
      */
70 70
     public function testPaginatorCreation($paginatorName, $params, $defaultParams, $usePostParams, $expect)
71 71
     {
72
-        if ($defaultParams) { $options = array_merge($params, $defaultParams); }
73
-        else                { $options = $params; }
72
+        if ($defaultParams) { $options = array_merge($params, $defaultParams); } else                { $options = $params; }
74 73
         $request = new Request();
75 74
         if ($usePostParams) {
76 75
             $request->setPost(new Parameters($params));
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/Plugin/FileSenderTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
             ->willReturn($repositories)
38 38
         ;
39 39
         $ob = FileSender::factory($container);
40
-        $this->assertInstanceOf(FileSender::class,$ob);
40
+        $this->assertInstanceOf(FileSender::class, $ob);
41 41
     }
42 42
 
43 43
     public function testSendFile()
@@ -61,34 +61,34 @@  discard block
 block discarded – undo
61 61
         ;
62 62
         $repo->expects($this->any())
63 63
             ->method('find')
64
-            ->willReturn(null,$file)
64
+            ->willReturn(null, $file)
65 65
         ;
66 66
 
67 67
         $sender = new FileSender($repositories);
68 68
         $sender->setController($controller);
69 69
 
70 70
         // fist test: response will be 404 if file is not found
71
-        $sender('someRepository',$fileId);
72
-        $this->assertEquals(404,$response->getStatusCode());
71
+        $sender('someRepository', $fileId);
72
+        $this->assertEquals(404, $response->getStatusCode());
73 73
 
74 74
         // second test: will handle send file properly
75 75
         $file->expects($this->any())
76 76
             ->method('__get')
77 77
             ->willReturnMap([
78
-                ['type','type'],
79
-                ['size','size']
78
+                ['type', 'type'],
79
+                ['size', 'size']
80 80
             ])
81 81
         ;
82
-        $resource = fopen(__FILE__,'r');
82
+        $resource = fopen(__FILE__, 'r');
83 83
         $file->expects($this->once())
84 84
             ->method('getResource')
85 85
             ->willReturn($resource)
86 86
         ;
87 87
         ob_start();
88
-        $sender('someRepository',$fileId);
88
+        $sender('someRepository', $fileId);
89 89
         $output = ob_get_contents();
90 90
         ob_end_clean();
91 91
 
92
-        $this->assertStringEqualsFile(__FILE__,$output);
92
+        $this->assertStringEqualsFile(__FILE__, $output);
93 93
     }
94 94
 }
Please login to merge, or discard this patch.