Passed
Pull Request — master (#631)
by ANTHONIUS
08:16
created
module/Core/test/CoreTest/Factory/Form/Tree/SelectFactoryTest.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
         ],
52 52
     ];
53 53
 
54
-    private $inheritance = [ FactoryInterface::class];
54
+    private $inheritance = [FactoryInterface::class];
55 55
 
56 56
     public function testSetCreationOptions()
57 57
     {
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
         $services = new ServiceManager();
70 70
         $forms    = new FormElementManagerV3Polyfill($services);
71 71
 
72
-        $options = [ 'test' => 'work?' ];
72
+        $options = ['test' => 'work?'];
73 73
         $this->target->setCreationOptions($options);
74 74
 
75 75
         $this->target
@@ -86,11 +86,11 @@  discard block
 block discarded – undo
86 86
     public function provideMissingOptions()
87 87
     {
88 88
         return [
89
-            [ null ],
90
-            [ [] ],
91
-            [ ['tree' => ['value' => 'test']] ],
92
-            [ ['tree' => ['entity' => 'test']] ],
93
-            [ ['tree' => ['name' => 'test']] ],
89
+            [null],
90
+            [[]],
91
+            [['tree' => ['value' => 'test']]],
92
+            [['tree' => ['entity' => 'test']]],
93
+            [['tree' => ['name' => 'test']]],
94 94
         ];
95 95
     }
96 96
 
@@ -122,10 +122,10 @@  discard block
 block discarded – undo
122 122
         $this->expectException(\RuntimeException::class);
123 123
         $this->expectExceptionMessage('Tree root not found');
124 124
 
125
-        $this->target->__invoke($services, '', ['tree' => [ 'entity' => 'testEntityRepository', 'value' => 'test']]);
125
+        $this->target->__invoke($services, '', ['tree' => ['entity' => 'testEntityRepository', 'value' => 'test']]);
126 126
     }
127 127
 
128
-    private function getServiceContainer($criteria, $root=null)
128
+    private function getServiceContainer($criteria, $root = null)
129 129
     {
130 130
         if (null === $root) {
131 131
             $root = new Node('Test');
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
         $root3 = $this->createRoot('root', ['child1' => ['gChild11', 'gChild12']]);
189 189
 
190 190
         return [
191
-            [ $root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
192
-            [ $root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
193
-            [ $root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]] ]
191
+            [$root1, [], ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]],
192
+            [$root2, ['use_root_item' => true], ['root' => ['label' => 'root', 'options' => ['child1' => ['label' => 'child1', 'options' => ['child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]]],
193
+            [$root3, ['allow_select_nodes' => true], ['child1-group' => ['label' => 'child1', 'options' => ['child1' => 'child1', 'child1-gchild11' => 'gChild11', 'child1-gchild12' => 'gChild12']]]]
194 194
         ];
195 195
     }
196 196
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Factory/View/Helper/SnippetFactoryTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
         '@testCreateService' => ['mock' => ['__invoke']],
45 45
     ];
46 46
 
47
-    private $inheritance = [ FactoryInterface::class ];
47
+    private $inheritance = [FactoryInterface::class];
48 48
 
49 49
 
50 50
     public function testCreateService()
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/MailService/BaseTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@
 block discarded – undo
66 66
             'stringtemplate' => '\Core\Mail\StringTemplateMessage',
67 67
         );
68 68
         $factories = array(
69
-            'htmltemplate'   => [HTMLTemplateMessage::class,'factory']
69
+            'htmltemplate'   => [HTMLTemplateMessage::class, 'factory']
70 70
         );
71 71
 
72 72
         $this->assertAttributeEquals(false, 'shareByDefault', $target, 'shareByDefault is not set to FALSE');
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/StringTemplateMessageTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -67,11 +67,11 @@  discard block
 block discarded – undo
67 67
         $addressList = new AddressList();
68 68
         $addressValue = ArrayUtils::iteratorToArray($addressList);
69 69
         return [
70
-            ['variables',[
70
+            ['variables', [
71 71
                 'value' => ['some' => 'value'],
72 72
                 'default' => [],
73 73
             ]],
74
-            ['variables',[
74
+            ['variables', [
75 75
                 'value' => $this,
76 76
                 'setter_exception' => [
77 77
                     \InvalidArgumentException::class,
@@ -79,30 +79,30 @@  discard block
 block discarded – undo
79 79
                 ],
80 80
 
81 81
             ]],
82
-            ['variables',[
82
+            ['variables', [
83 83
                 'value' => $addressList,
84 84
                 'expect' => $addressValue
85 85
             ]],
86
-            ['template',[
86
+            ['template', [
87 87
                 'value' => 'some-template',
88 88
                 'default' => null
89 89
             ]],
90
-            ['callbacks',[
90
+            ['callbacks', [
91 91
                 'value' => [
92
-                    'some' => [$this,'someCallback']
92
+                    'some' => [$this, 'someCallback']
93 93
                 ],
94 94
                 'default' => array(),
95 95
             ]],
96
-            ['callbacks',[
96
+            ['callbacks', [
97 97
                 'value' => $this,
98 98
                 'setter_exception' => [
99 99
                     \InvalidArgumentException::class,
100 100
                     'Expect an array or an instance of \Traversable, but received'
101 101
                 ]
102 102
             ]],
103
-            ['callbacks',[
103
+            ['callbacks', [
104 104
                 'value' => [
105
-                    'uncallable' => [$this,'notCallable']
105
+                    'uncallable' => [$this, 'notCallable']
106 106
                 ],
107 107
                 'setter_exception' => [
108 108
                     \InvalidArgumentException::class,
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
     public function testGetBodyText()
116 116
     {
117 117
         $translator = $this->createMock(TranslatorInterface::class);
118
-        $target =  new StringTemplateMessage();
118
+        $target = new StringTemplateMessage();
119 119
         $target->setTranslator($translator);
120 120
 
121 121
         $translator->expects($this->any())
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
             trim($target->getSubject())
156 156
         );
157 157
 
158
-        $target->setCallback('callback', function () {
158
+        $target->setCallback('callback', function() {
159 159
             return 'Hello From Callback!';
160 160
         });
161 161
         $target->setCallback('object', 'getSubject');
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/FileTransportTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $options = $this->createMock(FileOptions::class);
36 36
         $options->expects($this->once())
37 37
             ->method('getCallback')
38
-            ->willReturn([$this,'getFileName'])
38
+            ->willReturn([$this, 'getFileName'])
39 39
         ;
40 40
         $options->expects($this->exactly(2))
41 41
             ->method('getPath')
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/TranslatorAwareMessageTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,11 +38,11 @@
 block discarded – undo
38 38
      */
39 39
     private $target = TranslatorAwareMessage::class;
40 40
 
41
-    private $inheritance = [ Message::class, TranslatorAwareInterface::class ];
41
+    private $inheritance = [Message::class, TranslatorAwareInterface::class];
42 42
 
43 43
     public function propertiesProvider()
44 44
     {
45
-        $setTranslator = function () {
45
+        $setTranslator = function() {
46 46
             $this->target->setTranslator(new Translator());
47 47
         };
48 48
 
Please login to merge, or discard this patch.
CoreTest/Listener/LanguageRouteListener/OnDispatchErrorCallbackTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 
40 40
     private $target = [
41 41
         LanguageRouteListener::class,
42
-        'mock' => [ 'detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
42
+        'mock' => ['detectLanguage' => ['return' => 'xx'], 'setLocale', 'isSupportedLanguage', 'redirect'],
43 43
         'args' => 'getConstructorArgs'
44 44
     ];
45 45
 
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
             ->expects($this->once())
147 147
             ->method('match')
148 148
             ->with($this->callback(
149
-                function ($v) {
149
+                function($v) {
150 150
                     Assert::assertEquals('/base/uri/xx/see/no/lang', (string) $v->getUri());
151 151
                     return true;
152 152
                 }
@@ -178,7 +178,7 @@  discard block
 block discarded – undo
178 178
             ->expects($this->once())
179 179
             ->method('match')
180 180
             ->with($this->callback(
181
-                function ($v) {
181
+                function($v) {
182 182
                     Assert::assertEquals('/base/uri/xx/non/mappable/route', (string) $v->getUri());
183 183
                     return true;
184 184
                 }
@@ -207,7 +207,7 @@  discard block
 block discarded – undo
207 207
             ->expects($this->once())
208 208
             ->method('match')
209 209
             ->with($this->callback(
210
-                function ($v) {
210
+                function($v) {
211 211
                     Assert::assertEquals('/base/uri/default/see/no/lang', (string) $v->getUri());
212 212
                     return true;
213 213
                 }
@@ -231,6 +231,6 @@  discard block
 block discarded – undo
231 231
     public function getConstructorArgs()
232 232
     {
233 233
         $this->moduleOptions = new ModuleOptions();
234
-        return [new LocaleService([]),$this->moduleOptions];
234
+        return [new LocaleService([]), $this->moduleOptions];
235 235
     }
236 236
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/AjaxEventTest.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     private $target = AjaxEvent::class;
34 34
 
35
-    private $inheritance = [ Event::class ];
35
+    private $inheritance = [Event::class];
36 36
 
37 37
     public function propertiesProvider()
38 38
     {
@@ -42,12 +42,12 @@  discard block
 block discarded – undo
42 42
             ['contentType', [
43 43
                 'value' => 'test/type',
44 44
                 'default' => AjaxEvent::TYPE_JSON,
45
-                'post' => function () {
45
+                'post' => function() {
46 46
                     $this->assertEquals('test/type', $this->target->getParam('contentType'));
47 47
                 },
48 48
             ]],
49 49
             ['contentType', [
50
-                'pre' => function () {
50
+                'pre' => function() {
51 51
                     $this->target->setParam('contentType', 'type/test');
52 52
                 },
53 53
                 'value' => 'type/test',
@@ -57,12 +57,12 @@  discard block
 block discarded – undo
57 57
             ['request', [
58 58
                 'value' => $request,
59 59
                 'default' => null,
60
-                'post' => function () use ($request) {
60
+                'post' => function() use ($request) {
61 61
                     $this->assertSame($request, $this->target->getParam('request'));
62 62
                 },
63 63
             ]],
64 64
             ['request', [
65
-                'pre' => function () use ($request) {
65
+                'pre' => function() use ($request) {
66 66
                     $this->target->setParam('request', $request);
67 67
                 },
68 68
                 'value' => $request,
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
             ['response', [
73 73
                 'value' => $response,
74 74
                 'default' => null,
75
-                'post' => function () use ($response) {
75
+                'post' => function() use ($response) {
76 76
                     $this->assertSame($response, $this->target->getParam('response'));
77 77
                 },
78 78
             ]],
79 79
             ['response', [
80
-                'pre' => function () use ($response) {
80
+                'pre' => function() use ($response) {
81 81
                     $this->target->setParam('response', $response);
82 82
                 },
83 83
                 'value' => $response,
@@ -88,12 +88,12 @@  discard block
 block discarded – undo
88 88
             ['result', [
89 89
                 'value' => 'testResult',
90 90
                 'default' => null,
91
-                'post' => function () {
91
+                'post' => function() {
92 92
                     $this->assertEquals('testResult', $this->target->getParam('result'));
93 93
                 },
94 94
             ]],
95 95
             ['result', [
96
-                'pre' => function () {
96
+                'pre' => function() {
97 97
                     $this->target->setParam('result', 'testResult');
98 98
                 },
99 99
                 'value' => 'testResult',
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/Events/CreatePaginatorEventTest.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
  */
27 27
 class CreatePaginatorEventTest extends TestCase
28 28
 {
29
-    use TestSetterGetterTrait,SetupTargetTrait;
29
+    use TestSetterGetterTrait, SetupTargetTrait;
30 30
 
31 31
     protected $target = [
32 32
         'class' => CreatePaginatorEvent::class
@@ -43,16 +43,16 @@  discard block
 block discarded – undo
43 43
             ->getMock()
44 44
         ;
45 45
         return [
46
-            ['paginatorParams',[
46
+            ['paginatorParams', [
47 47
                 'value'     =>['name'=>'value'],
48 48
                 'default'   => array(),
49 49
             ]],
50
-            ['paginatorName',[
50
+            ['paginatorName', [
51 51
                 'value' => 'Some/Paginator',
52 52
                 'default'   => null,
53 53
             ]],
54
-            ['paginators',$paginators],
55
-            ['paginator',$paginator]
54
+            ['paginators', $paginators],
55
+            ['paginator', $paginator]
56 56
         ];
57 57
     }
58 58
 
Please login to merge, or discard this patch.