Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
Core/test/CoreTest/Listener/LanguageRouteListener/HelperMethodsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@
 block discarded – undo
183 183
 {
184 184
     public function __construct(LocaleService $localeService, ModuleOptions $moduleOptions = null)
185 185
     {
186
-        if(is_null($moduleOptions)){
186
+        if (is_null($moduleOptions)) {
187 187
             $moduleOptions = new ModuleOptions();
188 188
         }
189 189
         parent::__construct($localeService, $moduleOptions);
Please login to merge, or discard this patch.
Core/test/CoreTest/Listener/LanguageRouteListener/OnRouteCallbackTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
36 36
 
37 37
     private $target = [
38 38
         LanguageRouteListener::class,
39
-        'mock' => [ 'detectLanguage' => ['return' => 'xx'], 'setLocale' ],
39
+        'mock' => ['detectLanguage' => ['return' => 'xx'], 'setLocale'],
40 40
         'args' => 'getConstructorArgs'
41 41
     ];
42 42
     
Please login to merge, or discard this patch.
CoreTest/Listener/LanguageRouteListener/OnDispatchErrorCallbackTest.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
     private $moduleOptions;
47 47
 
48 48
     public function testHandleConsoleRequests()
49
-   {
50
-       $event = $this
51
-           ->getMockBuilder(MvcEvent::class)
52
-           ->disableOriginalConstructor()
53
-           ->setMethods(['getRequest', 'getError'])
54
-           ->getMock()
55
-       ;
49
+    {
50
+        $event = $this
51
+            ->getMockBuilder(MvcEvent::class)
52
+            ->disableOriginalConstructor()
53
+            ->setMethods(['getRequest', 'getError'])
54
+            ->getMock()
55
+        ;
56 56
 
57
-       $request = new \Zend\Console\Request();
57
+        $request = new \Zend\Console\Request();
58 58
 
59
-       $event->expects($this->once())->method('getRequest')->willReturn($request);
60
-       $event->expects($this->never())->method('getError');
59
+        $event->expects($this->once())->method('getRequest')->willReturn($request);
60
+        $event->expects($this->never())->method('getError');
61 61
 
62
-       $this->assertNull($this->target->onDispatchError($event));
63
-   }
62
+        $this->assertNull($this->target->onDispatchError($event));
63
+    }
64 64
 
65 65
     public function testHandleNonRouteMatchErrors()
66 66
     {
@@ -134,8 +134,8 @@  discard block
 block discarded – undo
134 134
         $event = $this->getEventMock('/base/uri', '/see/no/lang');
135 135
 
136 136
         $event->expects($this->once())
137
-              ->method('stopPropagation')
138
-              ->with(true)
137
+                ->method('stopPropagation')
138
+                ->with(true)
139 139
         ;
140 140
         $response = new Response();
141 141
         $event->setResponse($response);
@@ -148,18 +148,18 @@  discard block
 block discarded – undo
148 148
                     \PHPUnit_Framework_Assert::assertEquals('/base/uri/xx/see/no/lang', (string) $v->getUri());
149 149
                     return true;
150 150
                 }
151
-              ))
151
+                ))
152 152
             ->willReturn($routeMatch)
153 153
         ;
154 154
 
155 155
         $this->target
156
-	        ->expects($this->once())
157
-	        ->method('redirect')
158
-	        ->with($response, '/base/uri/xx/see/no/lang')
156
+            ->expects($this->once())
157
+            ->method('redirect')
158
+            ->with($response, '/base/uri/xx/see/no/lang')
159 159
         ;
160 160
         $this->target
161
-	        ->expects($this->never())
162
-	        ->method('setLocale')
161
+            ->expects($this->never())
162
+            ->method('setLocale')
163 163
         ;
164 164
 
165 165
         $this->target->onDispatchError($event);
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     private $target = [
38 38
         LanguageRouteListener::class,
39
-        'mock' => [ 'detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
39
+        'mock' => ['detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
40 40
         'args' => 'getConstructorArgs'
41 41
     ];
42 42
 
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 
222 222
         $target->expects($this->once())
223 223
             ->method('redirect')
224
-            ->with($response,'/base/uri/default/see/no/lang')
224
+            ->with($response, '/base/uri/default/see/no/lang')
225 225
         ;
226 226
 
227 227
         $target->onDispatchError($event);
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
     public function getConstructorArgs()
231 231
     {
232 232
         $this->moduleOptions = new ModuleOptions();
233
-        return [new LocaleService([]),$this->moduleOptions];
233
+        return [new LocaleService([]), $this->moduleOptions];
234 234
     }
235 235
 
236 236
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/LanguageRouteListener/BaseTest.php 2 patches
Indentation   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function testDetach()
73 73
     {
74
-    	$callableListener = [new CallableListenerMock(),'doSomething'];
74
+        $callableListener = [new CallableListenerMock(),'doSomething'];
75 75
     	
76 76
         $events = $this
77 77
             ->getMockBuilder(EventManager::class)
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
             ->getMock();
81 81
 
82 82
         $events
83
-	        ->expects($this->any())
84
-	        ->method('attach')
85
-	        ->will(
86
-	        	$this->onConsecutiveCalls($callableListener, $callableListener)
87
-	        )
83
+            ->expects($this->any())
84
+            ->method('attach')
85
+            ->will(
86
+                $this->onConsecutiveCalls($callableListener, $callableListener)
87
+            )
88 88
         ;
89 89
 
90 90
         $events
@@ -103,5 +103,5 @@  discard block
 block discarded – undo
103 103
 
104 104
 class CallableListenerMock
105 105
 {
106
-	public function doSomething(){}
106
+    public function doSomething(){}
107 107
 }
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -35,11 +35,11 @@  discard block
 block discarded – undo
35 35
 
36 36
     private $target;
37 37
 
38
-    private $inheritance = [ ListenerAggregateInterface::class ];
38
+    private $inheritance = [ListenerAggregateInterface::class];
39 39
 
40 40
     public function setUp()
41 41
     {
42
-        $this->target = new LanguageRouteListener(new LocaleService(['xx' => 'xx_XX']),new ModuleOptions());
42
+        $this->target = new LanguageRouteListener(new LocaleService(['xx' => 'xx_XX']), new ModuleOptions());
43 43
     }
44 44
     
45 45
     public function testAttachsToExpectedEvents()
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function testDetach()
73 73
     {
74
-    	$callableListener = [new CallableListenerMock(),'doSomething'];
74
+    	$callableListener = [new CallableListenerMock(), 'doSomething'];
75 75
     	
76 76
         $events = $this
77 77
             ->getMockBuilder(EventManager::class)
@@ -103,5 +103,5 @@  discard block
 block discarded – undo
103 103
 
104 104
 class CallableListenerMock
105 105
 {
106
-	public function doSomething(){}
106
+	public function doSomething() {}
107 107
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/AjaxEventTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
 
31 31
     private $target = AjaxEvent::class;
32 32
 
33
-    private $inheritance = [ Event::class ];
33
+    private $inheritance = [Event::class];
34 34
 
35 35
     public function propertiesProvider()
36 36
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/CreatePaginatorEventTest.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
  */
25 25
 class CreatePaginatorEventTest extends \PHPUnit_Framework_TestCase
26 26
 {
27
-    use TestSetterGetterTrait,SetupTargetTrait;
27
+    use TestSetterGetterTrait, SetupTargetTrait;
28 28
 
29 29
     protected $target = [
30 30
         'class' => CreatePaginatorEvent::class
@@ -41,16 +41,16 @@  discard block
 block discarded – undo
41 41
             ->getMock()
42 42
         ;
43 43
         return [
44
-            ['paginatorParams',[
44
+            ['paginatorParams', [
45 45
                 'value'     =>['name'=>'value'],
46 46
                 'default'   => array(),
47 47
             ]],
48
-            ['paginatorName',[
48
+            ['paginatorName', [
49 49
                 'value' => 'Some/Paginator',
50 50
                 'default'   => null,
51 51
             ]],
52
-            ['paginators',$paginators],
53
-            ['paginator',$paginator]
52
+            ['paginators', $paginators],
53
+            ['paginator', $paginator]
54 54
         ];
55 55
     }
56 56
 
@@ -72,9 +72,9 @@  discard block
 block discarded – undo
72 72
         $target = $this->target;
73 73
         $target->setParams($params);
74 74
 
75
-        $this->assertEquals($params['paginatorName'],$target->getPaginatorName());
76
-        $this->assertEquals($params['paginatorParams'],$target->getPaginatorParams());
77
-        $this->assertEquals($params['paginators'],$target->getPaginators());
75
+        $this->assertEquals($params['paginatorName'], $target->getPaginatorName());
76
+        $this->assertEquals($params['paginatorParams'], $target->getPaginatorParams());
77
+        $this->assertEquals($params['paginators'], $target->getPaginators());
78 78
         $this->assertEquals(
79 79
             ['foo' => 'bar'],
80 80
             $target->getParams(),
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/FileEventTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
     private $target = FileEvent::class;
31 31
 
32
-    private $inheritance = [ Event::class ];
32
+    private $inheritance = [Event::class];
33 33
 
34 34
     public function propertiesProvider()
35 35
     {
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
             ]],
44 44
             ['file', $file],
45 45
             ['file', [
46
-                'pre' => function() use ($file) { $this->target->setParam('file', $file);},
46
+                'pre' => function() use ($file) { $this->target->setParam('file', $file); },
47 47
                 'ignore_setter' => true,
48 48
                 'value' => $file
49 49
             ]]
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/AjaxRouteListenerTest.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -110,8 +110,8 @@
 block discarded – undo
110 110
         $results->push($result1);
111 111
         $this->ajaxEventManagerMock->expects($this->once())->method('getEvent')->with('test', $this->target)->willReturn(new AjaxEvent());
112 112
         $this->ajaxEventManagerMock->expects($this->once())->method('triggerEventUntil')
113
-                                   ->with($this->isInstanceOf('\Closure'), $this->isInstanceOf(AjaxEvent::class))
114
-                                   ->willReturn($results);
113
+                                    ->with($this->isInstanceOf('\Closure'), $this->isInstanceOf(AjaxEvent::class))
114
+                                    ->willReturn($results);
115 115
 
116 116
         $response = $this->target->onRoute($event);
117 117
 
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -40,13 +40,13 @@  discard block
 block discarded – undo
40 40
         '@testConstruction' => false,
41 41
         '@testInheritance' => '@testUsesTraits',
42 42
         '@testDefaultAttributes' => '@testUsesTraits',
43
-        '@testUsesTraits' => [ 'as_reflection' => true ],
43
+        '@testUsesTraits' => ['as_reflection' => true],
44 44
     ];
45 45
 
46
-    private $traits = [ ListenerAggregateTrait::class ];
46
+    private $traits = [ListenerAggregateTrait::class];
47 47
 
48 48
     private $attributes = [
49
-        'events' => [ [ MvcEvent::EVENT_ROUTE, 'onRoute', 100 ] ],
49
+        'events' => [[MvcEvent::EVENT_ROUTE, 'onRoute', 100]],
50 50
     ];
51 51
 
52 52
     private function getTargetArgs()
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         $this->ajaxEventManagerMock = $this->getMockBuilder(EventManager::class)->disableOriginalConstructor()
55 55
             ->setMethods(['getEvent', 'triggerEventUntil'])->getMock();
56 56
 
57
-        return [ $this->ajaxEventManagerMock ];
57
+        return [$this->ajaxEventManagerMock];
58 58
     }
59 59
 
60 60
     public function testConstruction()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Acl/FileAccessAssertionTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -57,17 +57,17 @@  discard block
 block discarded – undo
57 57
         $failMessage = 'Assert should return false when role is not a user or resource is not file';
58 58
 
59 59
         $this->assertFalse(
60
-            $target->assert($acl,$roleInterface,$resourceInterface),
60
+            $target->assert($acl, $roleInterface, $resourceInterface),
61 61
             $failMessage
62 62
         );
63 63
 
64 64
         $this->assertFalse(
65
-            $target->assert($acl,$userRole,$resourceInterface),
65
+            $target->assert($acl, $userRole, $resourceInterface),
66 66
             $failMessage
67 67
         );
68 68
 
69 69
         $this->assertFalse(
70
-            $this->target->assert($acl,$roleInterface,$file),
70
+            $this->target->assert($acl, $roleInterface, $file),
71 71
             $failMessage
72 72
         );
73 73
     }
@@ -89,11 +89,11 @@  discard block
 block discarded – undo
89 89
 
90 90
         $permissions->expects($this->once())
91 91
             ->method('isGranted')
92
-            ->with($role,PermissionsInterface::PERMISSION_VIEW)
92
+            ->with($role, PermissionsInterface::PERMISSION_VIEW)
93 93
             ->willReturn(true)
94 94
         ;
95 95
         $this->assertTrue(
96
-            $target->assert($acl,$role,$file,PermissionsInterface::PERMISSION_VIEW)
96
+            $target->assert($acl, $role, $file, PermissionsInterface::PERMISSION_VIEW)
97 97
         );
98 98
     }
99 99
 }
Please login to merge, or discard this patch.