Passed
Push — master ( 97bca0...c3d0da )
by Carsten
19:24 queued 12:32
created
module/Core/test/CoreTest/Controller/IndexControllerTest.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
     /**
45 45
      * @return IndexController
46 46
      */
47
-    public function setupTarget($auth=null,$layout=null,$forward=null,$config=null)
47
+    public function setupTarget($auth = null, $layout = null, $forward = null, $config = null)
48 48
     {
49 49
         $auth->expects($this->any())
50 50
             ->method('__invoke')
@@ -57,10 +57,10 @@  discard block
 block discarded – undo
57 57
         $plugins->expects($this->any())
58 58
             ->method('get')
59 59
             ->willReturnMap([
60
-                ['Auth',null,$auth],
61
-                ['layout',null,$layout],
62
-                ['forward',null,$forward],
63
-                ['config',null,$config]
60
+                ['Auth', null, $auth],
61
+                ['layout', null, $layout],
62
+                ['forward', null, $forward],
63
+                ['config', null, $config]
64 64
             ])
65 65
         ;
66 66
         $this->pluginsMock = $plugins;
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
             ->with('startpage')
101 101
             ->willReturn($viewModel)
102 102
         ;
103
-        $this->setupTarget($auth,$layout);
103
+        $this->setupTarget($auth, $layout);
104 104
         $request = new Request();
105 105
         $this->controller->dispatch($request);
106 106
         $this->assertResponseStatusCode(Response::STATUS_CODE_200);
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
         $config = $this->createMock(Config::class);
138 138
         $config->expects($this->any())
139 139
             ->method('__invoke')
140
-            ->with('dashboard',[0])
140
+            ->with('dashboard', [0])
141 141
             ->willReturn($modules)
142 142
         ;
143 143
 
@@ -150,20 +150,20 @@  discard block
 block discarded – undo
150 150
             ->method('dispatch')
151 151
             ->with(
152 152
                 'Jobs/Index',
153
-                ['action' => 'dashboard','type'=>'recent']
153
+                ['action' => 'dashboard', 'type'=>'recent']
154 154
             )
155
-            ->willReturnOnConsecutiveCalls(null,$viewModel)
155
+            ->willReturnOnConsecutiveCalls(null, $viewModel)
156 156
         ;
157 157
 
158
-        $this->init('Core\Controller\Index','dashboard');
159
-        $this->setupTarget($auth,null,$forward,$config);
158
+        $this->init('Core\Controller\Index', 'dashboard');
159
+        $this->setupTarget($auth, null, $forward, $config);
160 160
         $this->moduleManager->expects($this->any())
161 161
             ->method('getLoadedModules')
162 162
             ->willReturn(['test'])
163 163
         ;
164 164
 
165 165
         $target = $this->getMockBuilder(IndexController::class)
166
-            ->setConstructorArgs([$this->moduleManager,$this->config])
166
+            ->setConstructorArgs([$this->moduleManager, $this->config])
167 167
             ->setMethods(['getResponse'])
168 168
             ->getMock()
169 169
         ;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 
177 177
         $response->expects($this->any())
178 178
             ->method('getStatusCode')
179
-            ->willReturnOnConsecutiveCalls(400,200)
179
+            ->willReturnOnConsecutiveCalls(400, 200)
180 180
         ;
181 181
 
182 182
         // first widget response: inform when error loading widget
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/AdminControllerTest.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 
43 43
     public function setUp()
44 44
     {
45
-	    $events = $this->getMockBuilder(EventManager::class)
46
-	                   ->setMethods(['getEvent', 'trigger'])
47
-	                   ->getMock();
48
-	    $this->target = new AdminController($events);
45
+        $events = $this->getMockBuilder(EventManager::class)
46
+                        ->setMethods(['getEvent', 'trigger'])
47
+                        ->getMock();
48
+        $this->target = new AdminController($events);
49 49
     }
50 50
 
51 51
     public function testIndexAction()
@@ -53,9 +53,9 @@  discard block
 block discarded – undo
53 53
         $events = $this->getMockBuilder(EventManager::class)
54 54
             ->setMethods(['getEvent', 'trigger'])
55 55
             ->getMock();
56
-	    $target = new AdminController($events);
57
-	    $event = new AdminControllerEvent(AdminControllerEvent::EVENT_DASHBOARD, $target);
58
-	    $event->addViewVariables('test', ['testVar' => 'value']);
56
+        $target = new AdminController($events);
57
+        $event = new AdminControllerEvent(AdminControllerEvent::EVENT_DASHBOARD, $target);
58
+        $event->addViewVariables('test', ['testVar' => 'value']);
59 59
         $events->expects($this->once())->method('getEvent')
60 60
             ->with(AdminControllerEvent::EVENT_DASHBOARD, $this->identicalTo($target))
61 61
             ->willReturn($event);
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
         //                                                 'service' => $events,
69 69
         //                                                 'count_get' => 1,
70 70
         //                                             ]
71
-		//
71
+        //
72 72
         //                                          ]);
73 73
 
74 74
         /* @var \Zend\View\Model\ViewModel $child
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
      */
39 39
     protected $target = '\Core\Controller\AdminController';
40 40
 
41
-    protected $inheritance = [ 'Zend\Mvc\Controller\AbstractActionController' ];
41
+    protected $inheritance = ['Zend\Mvc\Controller\AbstractActionController'];
42 42
 
43 43
     public function setUp()
44 44
     {
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Controller/AbstractControllerTestCase.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -187,7 +187,7 @@  discard block
 block discarded – undo
187 187
                 )
188 188
             );
189 189
         }
190
-        $this->assertTrue((bool)preg_match($pattern, $responseHeader->getFieldValue()));
190
+        $this->assertTrue((bool) preg_match($pattern, $responseHeader->getFieldValue()));
191 191
     }
192 192
 
193 193
     /**
@@ -213,6 +213,6 @@  discard block
 block discarded – undo
213 213
                 )
214 214
             );
215 215
         }
216
-        $this->assertFalse((bool)preg_match($pattern, $responseHeader->getFieldValue()));
216
+        $this->assertFalse((bool) preg_match($pattern, $responseHeader->getFieldValue()));
217 217
     }
218 218
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Filter/File/ResizeTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -84,14 +84,14 @@  discard block
 block discarded – undo
84 84
             ['foo'],
85 85
             [['error' => UPLOAD_ERR_NO_FILE]],
86 86
             [
87
-                ['type' => 'pdf','error' => UPLOAD_ERR_OK],
87
+                ['type' => 'pdf', 'error' => UPLOAD_ERR_OK],
88 88
             ]
89 89
         ];
90 90
     }
91 91
 
92 92
     private function setupImagine()
93 93
     {
94
-        $this->imageFile = __DIR__ . '/fixtures/logo.jpg';
94
+        $this->imageFile = __DIR__.'/fixtures/logo.jpg';
95 95
         $image = $this->getMockBuilder(ImageInterface::class)
96 96
             ->getMock()
97 97
         ;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 
128 128
         $this->image->expects($this->once())
129 129
             ->method('resize')
130
-            ->with($this->callback(function ($size) {
130
+            ->with($this->callback(function($size) {
131 131
                 $this->assertInstanceOf(BoxInterface::class, $size);
132 132
                 $this->assertEquals(100, $size->getWidth());
133 133
                 $this->assertEquals(100, $size->getHeight());
@@ -200,9 +200,9 @@  discard block
 block discarded – undo
200 200
     public function getTestMinMaxOptions()
201 201
     {
202 202
         return [
203
-            [ ['max-width'=>50, 'max-height'=> 50 ], 50, 50],
204
-            [ ['max-width'=>80, 'max-height'=> 90 ], 80,90],
205
-            [ ['min-width'=>200, 'min-height' => 120],200,120]
203
+            [['max-width'=>50, 'max-height'=> 50], 50, 50],
204
+            [['max-width'=>80, 'max-height'=> 90], 80, 90],
205
+            [['min-width'=>200, 'min-height' => 120], 200, 120]
206 206
         ];
207 207
     }
208 208
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Repository/DraftableEntityAwareTraitTest.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -26,26 +26,26 @@
 block discarded – undo
26 26
     public function provideFindMethodsTestData()
27 27
     {
28 28
         return [
29
-            [ 'findBy', [], 'findBy', ['isDraft' => false] ],
30
-            [ 'findBy', [ 'isDraft' => null ], 'findBy', [] ],
31
-            [ 'findBy', [ 'isDraft' => true ], 'findBy', [ 'isDraft' => true ] ],
32
-            [ 'findBy', [ 'isDraft' => 'something'], 'findBy', ['isDraft' => 'something'] ],
29
+            ['findBy', [], 'findBy', ['isDraft' => false]],
30
+            ['findBy', ['isDraft' => null], 'findBy', []],
31
+            ['findBy', ['isDraft' => true], 'findBy', ['isDraft' => true]],
32
+            ['findBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => 'something']],
33 33
             
34
-            [ 'findDraftsBy', [], 'findBy', ['isDraft' => true]],
35
-            [ 'findDraftsBy', ['isDraft' => null], 'findBy', ['isDraft' => true]],
36
-            [ 'findDraftsBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => true]],
34
+            ['findDraftsBy', [], 'findBy', ['isDraft' => true]],
35
+            ['findDraftsBy', ['isDraft' => null], 'findBy', ['isDraft' => true]],
36
+            ['findDraftsBy', ['isDraft' => 'something'], 'findBy', ['isDraft' => true]],
37 37
 
38
-            [ 'findOneBy', [], 'findOneBy', ['isDraft' => false] ],
39
-            [ 'findOneBy', [ 'isDraft' => null ], 'findOneBy', [] ],
40
-            [ 'findOneBy', [ 'isDraft' => true ], 'findOneBy', [ 'isDraft' => true ] ],
41
-            [ 'findOneBy', [ 'isDraft' => 'something'], 'findOneBy', ['isDraft' => 'something'] ],
38
+            ['findOneBy', [], 'findOneBy', ['isDraft' => false]],
39
+            ['findOneBy', ['isDraft' => null], 'findOneBy', []],
40
+            ['findOneBy', ['isDraft' => true], 'findOneBy', ['isDraft' => true]],
41
+            ['findOneBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => 'something']],
42 42
 
43
-            [ 'findOneDraftBy', [], 'findOneBy', ['isDraft' => true]],
44
-            [ 'findOneDraftBy', ['isDraft' => null], 'findOneBy', ['isDraft' => true]],
45
-            [ 'findOneDraftBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => true]],
43
+            ['findOneDraftBy', [], 'findOneBy', ['isDraft' => true]],
44
+            ['findOneDraftBy', ['isDraft' => null], 'findOneBy', ['isDraft' => true]],
45
+            ['findOneDraftBy', ['isDraft' => 'something'], 'findOneBy', ['isDraft' => true]],
46 46
 
47
-            [ 'createDraft', [], 'create', ['isDraft' => true]],
48
-            [ 'createDraft', ['isDraft' => false], 'create', ['isDraft' => true]],
47
+            ['createDraft', [], 'create', ['isDraft' => true]],
48
+            ['createDraft', ['isDraft' => false], 'create', ['isDraft' => true]],
49 49
         ];
50 50
     }
51 51
 
Please login to merge, or discard this patch.
DoctrineMongoODM/Event/AbstractUpdateFilesPermissionsSubscriberTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
     ];
53 53
 
54 54
     private /** @noinspection PhpUnusedPrivateFieldInspection */
55
-        $inheritance = [ EventSubscriber::class ];
55
+        $inheritance = [EventSubscriber::class];
56 56
 
57 57
 
58 58
     private function getTarget()
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 
65 65
     public function testSubscribesToOnFlushEvent()
66 66
     {
67
-        $this->assertEquals([ Events::onFlush ], $this->target->getSubscribedEvents());
67
+        $this->assertEquals([Events::onFlush], $this->target->getSubscribedEvents());
68 68
     }
69 69
 
70 70
     public function testUpdatesFilesPermissionsOnFlush()
@@ -97,8 +97,8 @@  discard block
 block discarded – undo
97 97
         $document->singleFile = $file;
98 98
         $document->fileCollection = $collection;
99 99
 
100
-        $inserts = [ $document ];
101
-        $updates = [ $document ];
100
+        $inserts = [$document];
101
+        $updates = [$document];
102 102
 
103 103
         $filePermissions->expects($this->exactly(4))->method('clear')->will($this->returnSelf());
104 104
         $filePermissions->expects($this->exactly(4))->method('inherit')->with($permissions)->will($this->returnSelf());
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 
156 156
 class ConcreteUpdateFilesPermissionsSubScriber extends AbstractUpdateFilesPermissionsSubscriber
157 157
 {
158
-    protected $filesProperties = [ 'singleFile', 'fileCollection' ];
158
+    protected $filesProperties = ['singleFile', 'fileCollection'];
159 159
     protected $targetDocument  = Ufps_TargetDocument::class;
160 160
 }
161 161
 
Please login to merge, or discard this patch.
Repository/DoctrineMongoODM/Event/RepositoryEventsSubscriberTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
             ->willReturn($documentName);
93 93
         $repository->expects($this->once())
94 94
             ->method('setEntityPrototype')
95
-            ->with($this->callback(function ($entity) use ($documentName) {
95
+            ->with($this->callback(function($entity) use ($documentName) {
96 96
                 return $entity instanceof $documentName;
97 97
             }));
98 98
         $repository->expects($this->once())
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
             ->getMock();
121 121
         $attachableEntity->expects($this->once())
122 122
             ->method('setAttachableEntityManager')
123
-            ->with($this->callback(function ($manager) {
123
+            ->with($this->callback(function($manager) {
124 124
                 return $manager instanceof AttachableEntityManager;
125 125
             }));
126 126
         
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
             ->getMock();
146 146
         $attachableEntity->expects($this->once())
147 147
             ->method('setAttachableEntityManager')
148
-            ->with($this->callback(function ($manager) {
148
+            ->with($this->callback(function($manager) {
149 149
                 return $manager instanceof AttachableEntityManager;
150 150
             }));
151 151
         
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Repository/SnapshotRepositoryTest.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -71,21 +71,21 @@  discard block
 block discarded – undo
71 71
 
72 72
         return [
73 73
             [
74
-                'Hydrator',[
74
+                'Hydrator', [
75 75
                     '@default'=>EntityHydrator::class,
76 76
                     'value'=>$hydrator,
77
-                    'expect_property' => ['hydrator',$hydrator]
77
+                    'expect_property' => ['hydrator', $hydrator]
78 78
                 ],
79 79
             ],
80 80
             [
81
-                'SourceHydrator',[
81
+                'SourceHydrator', [
82 82
                     '@default' => EntityHydrator::class,
83 83
                     'value' => $hydrator,
84
-                    'expect_property' => ['sourceHydrator',$hydrator]
84
+                    'expect_property' => ['sourceHydrator', $hydrator]
85 85
                 ]
86 86
             ],
87 87
             [
88
-                'SnapshotAttributes',[
88
+                'SnapshotAttributes', [
89 89
                     'default' => [],
90 90
                     'value' => ['some'=>'attributes']
91 91
                 ]
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
             ->willReturn($em)
105 105
         ;
106 106
 
107
-        $cb = function (EventArgs $args) {
107
+        $cb = function(EventArgs $args) {
108 108
             $this->assertInstanceOf(Job::class, $args->get('entity'));
109 109
             return true;
110 110
         };
Please login to merge, or discard this patch.
module/Core/test/CoreTest/ApplicationTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@
 block discarded – undo
86 86
     {
87 87
         $tempDir    = sys_get_temp_dir().'/yawik/application-tests';
88 88
         $tempFile   = $tempDir.'/.env';
89
-        $tempFileDist   = $tempDir.'/.env.dist';
89
+        $tempFileDist = $tempDir.'/.env.dist';
90 90
 
91 91
         if (!is_dir($tempDir)) {
92 92
             mkdir($tempDir, 0777, true);
Please login to merge, or discard this patch.