Completed
Pull Request — develop (#542)
by Mathias
09:01
created
module/Core/test/CoreTest/Options/ImageSetOptionsTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
 
33 33
     private $target = ImageSetOptions::class;
34 34
 
35
-    private $inheritance = [ AbstractOptions::class ];
35
+    private $inheritance = [AbstractOptions::class];
36 36
 
37 37
     private $properties = [
38 38
         ['entityClass', ['default' => Image::class, '@value' => Image::class]],
39 39
         ['formElementName', ['default' => ImageSetInterface::ORIGINAL, 'value' => 'formElementNameValue']],
40
-        ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100,100]], 'value' => ['a' => [1,1]]]],
40
+        ['images', ['default'=>[ImageSetInterface::THUMBNAIL => [100, 100]], 'value' => ['a' => [1, 1]]]],
41 41
         ['entity', ['ignore_setter' => true, 'value@' => Image::class]],
42 42
     ];
43 43
 }
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Mail/MailService/BaseTest.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -84,12 +84,12 @@
 block discarded – undo
84 84
         ));
85 85
 
86 86
         $translator = $this->getMockBuilder('\Zend\I18n\Translator\Translator')
87
-                           ->disableOriginalConstructor()
88
-                           ->getMock();
87
+                            ->disableOriginalConstructor()
88
+                            ->getMock();
89 89
 
90 90
         $services = $this->getMockBuilder('\Zend\ServiceManager\ServiceManager')
91
-                         ->disableOriginalConstructor()
92
-                         ->getMock();
91
+                            ->disableOriginalConstructor()
92
+                            ->getMock();
93 93
         
94 94
 
95 95
         $services
Please login to merge, or discard this 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/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()
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('\Zend\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/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.
module/Core/test/CoreTest/Mail/MailServiceFactoryTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,9 +48,9 @@
 block discarded – undo
48 48
             ->method('get')
49 49
             ->willReturnMap(
50 50
                 [
51
-                    ['Config',[]],
52
-                    ['Auth/Options',$authOptions],
53
-                    ['Core/MailServiceOptions',$mailOptions]
51
+                    ['Config', []],
52
+                    ['Auth/Options', $authOptions],
53
+                    ['Core/MailServiceOptions', $mailOptions]
54 54
             ]
55 55
         );
56 56
 
Please login to merge, or discard this patch.
module/Core/test/CoreTest/Listener/LanguageRouteListener/BaseTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
     private $target;
39 39
 
40
-    private $inheritance = [ ListenerAggregateInterface::class ];
40
+    private $inheritance = [ListenerAggregateInterface::class];
41 41
 
42 42
     protected function setUp()
43 43
     {
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function testDetach()
75 75
     {
76
-        $callableListener = [new CallableListenerMock(),'doSomething'];
76
+        $callableListener = [new CallableListenerMock(), 'doSomething'];
77 77
         
78 78
         $events = $this
79 79
             ->getMockBuilder(EventManager::class)
Please login to merge, or discard this patch.
CoreTest/Listener/LanguageRouteListener/OnDispatchErrorCallbackTest.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     public function testHandleConsoleRequests()
52 52
     {
53 53
         $event = $this
54
-           ->getMockBuilder(MvcEvent::class)
55
-           ->disableOriginalConstructor()
56
-           ->setMethods(['getRequest', 'getError'])
57
-           ->getMock()
58
-       ;
54
+            ->getMockBuilder(MvcEvent::class)
55
+            ->disableOriginalConstructor()
56
+            ->setMethods(['getRequest', 'getError'])
57
+            ->getMock()
58
+        ;
59 59
 
60 60
         $request = new \Zend\Console\Request();
61 61
 
@@ -136,8 +136,8 @@  discard block
 block discarded – undo
136 136
         $event = $this->getEventMock('/base/uri', '/see/no/lang');
137 137
 
138 138
         $event->expects($this->once())
139
-              ->method('stopPropagation')
140
-              ->with(true)
139
+                ->method('stopPropagation')
140
+                ->with(true)
141 141
         ;
142 142
         $response = new Response();
143 143
         $event->setResponse($response);
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
                     Assert::assertEquals('/base/uri/xx/see/no/lang', (string) $v->getUri());
151 151
                     return true;
152 152
                 }
153
-              ))
153
+                ))
154 154
             ->willReturn($routeMatch)
155 155
         ;
156 156
 
Please login to merge, or discard this 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.