Completed
Pull Request — master (#141)
by Bhanu
37:51 queued 34s
created
swiftmailer/tests/unit/Swift/Plugins/BandwidthMonitorPluginTest.php 2 patches
Doc Comments   +9 added lines patch added patch discarded remove patch
@@ -79,6 +79,9 @@  discard block
 block discarded – undo
79 79
         return $evt;
80 80
     }
81 81
 
82
+    /**
83
+     * @param string $command
84
+     */
82 85
     private function _createCommandEvent($command)
83 86
     {
84 87
         $evt = $this->getMockBuilder('Swift_Events_CommandEvent')
@@ -91,6 +94,9 @@  discard block
 block discarded – undo
91 94
         return $evt;
92 95
     }
93 96
 
97
+    /**
98
+     * @param string $response
99
+     */
94 100
     private function _createResponseEvent($response)
95 101
     {
96 102
         $evt = $this->getMockBuilder('Swift_Events_ResponseEvent')
@@ -103,6 +109,9 @@  discard block
 block discarded – undo
103 109
         return $evt;
104 110
     }
105 111
 
112
+    /**
113
+     * @param integer $bytes
114
+     */
106 115
     private function _createMessageWithByteCount($bytes)
107 116
     {
108 117
         $this->_bytes = $bytes;
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
         $msg->expects($this->any())
111 111
             ->method('toByteStream')
112 112
             ->will($this->returnCallback(array($this, '_write')));
113
-      /*  $this->_checking(Expectations::create()
113
+        /*  $this->_checking(Expectations::create()
114 114
             -> ignoring($msg)->toByteStream(any()) -> calls(array($this, '_write'))
115 115
         ); */
116 116
 
Please login to merge, or discard this patch.
swiftmailer/swiftmailer/tests/unit/Swift/Plugins/LoggerPluginTest.php 2 patches
Doc Comments   +16 added lines patch added patch discarded remove patch
@@ -135,6 +135,11 @@  discard block
 block discarded – undo
135 135
         return new Swift_Plugins_LoggerPlugin($logger);
136 136
     }
137 137
 
138
+    /**
139
+     * @param string $command
140
+     *
141
+     * @return Swift_Events_CommandEvent
142
+     */
138 143
     private function _createCommandEvent($command)
139 144
     {
140 145
         $evt = $this->getMockBuilder('Swift_Events_CommandEvent')
@@ -147,6 +152,11 @@  discard block
 block discarded – undo
147 152
         return $evt;
148 153
     }
149 154
 
155
+    /**
156
+     * @param string $response
157
+     *
158
+     * @return Swift_Events_ResponseEvent
159
+     */
150 160
     private function _createResponseEvent($response)
151 161
     {
152 162
         $evt = $this->getMockBuilder('Swift_Events_ResponseEvent')
@@ -164,6 +174,9 @@  discard block
 block discarded – undo
164 174
         return $this->getMock('Swift_Transport');
165 175
     }
166 176
 
177
+    /**
178
+     * @return Swift_Events_TransportChangeEvent
179
+     */
167 180
     private function _createTransportChangeEvent()
168 181
     {
169 182
         $evt = $this->getMockBuilder('Swift_Events_TransportChangeEvent')
@@ -176,6 +189,9 @@  discard block
 block discarded – undo
176 189
         return $evt;
177 190
     }
178 191
 
192
+    /**
193
+     * @return Swift_Events_TransportExceptionEvent
194
+     */
179 195
     public function _createTransportExceptionEvent()
180 196
     {
181 197
         $evt = $this->getMockBuilder('Swift_Events_TransportExceptionEvent')
Please login to merge, or discard this patch.
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@  discard block
 block discarded – undo
6 6
     {
7 7
         $logger = $this->_createLogger();
8 8
         $logger->expects($this->once())
9
-               ->method('add')
10
-               ->with('foo');
9
+                ->method('add')
10
+                ->with('foo');
11 11
 
12 12
         $plugin = $this->_createPlugin($logger);
13 13
         $plugin->add('foo');
@@ -17,8 +17,8 @@  discard block
 block discarded – undo
17 17
     {
18 18
         $logger = $this->_createLogger();
19 19
         $logger->expects($this->once())
20
-               ->method('dump')
21
-               ->will($this->returnValue('foobar'));
20
+                ->method('dump')
21
+                ->will($this->returnValue('foobar'));
22 22
 
23 23
         $plugin = $this->_createPlugin($logger);
24 24
         $this->assertEquals('foobar', $plugin->dump());
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
     {
29 29
         $logger = $this->_createLogger();
30 30
         $logger->expects($this->once())
31
-               ->method('clear');
31
+                ->method('clear');
32 32
 
33 33
         $plugin = $this->_createPlugin($logger);
34 34
         $plugin->clear();
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
         $evt = $this->_createCommandEvent("foo\r\n");
40 40
         $logger = $this->_createLogger();
41 41
         $logger->expects($this->once())
42
-               ->method('add')
43
-               ->with($this->regExp('~foo\r\n~'));
42
+                ->method('add')
43
+                ->with($this->regExp('~foo\r\n~'));
44 44
 
45 45
         $plugin = $this->_createPlugin($logger);
46 46
         $plugin->commandSent($evt);
@@ -51,8 +51,8 @@  discard block
 block discarded – undo
51 51
         $evt = $this->_createResponseEvent("354 Go ahead\r\n");
52 52
         $logger = $this->_createLogger();
53 53
         $logger->expects($this->once())
54
-               ->method('add')
55
-               ->with($this->regExp('~354 Go ahead\r\n~'));
54
+                ->method('add')
55
+                ->with($this->regExp('~354 Go ahead\r\n~'));
56 56
 
57 57
         $plugin = $this->_createPlugin($logger);
58 58
         $plugin->responseReceived($evt);
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
         $evt = $this->_createTransportChangeEvent();
64 64
         $logger = $this->_createLogger();
65 65
         $logger->expects($this->once())
66
-               ->method('add')
67
-               ->with($this->anything());
66
+                ->method('add')
67
+                ->with($this->anything());
68 68
 
69 69
         $plugin = $this->_createPlugin($logger);
70 70
         $plugin->beforeTransportStarted($evt);
@@ -75,8 +75,8 @@  discard block
 block discarded – undo
75 75
         $evt = $this->_createTransportChangeEvent();
76 76
         $logger = $this->_createLogger();
77 77
         $logger->expects($this->once())
78
-               ->method('add')
79
-               ->with($this->anything());
78
+                ->method('add')
79
+                ->with($this->anything());
80 80
 
81 81
         $plugin = $this->_createPlugin($logger);
82 82
         $plugin->transportStarted($evt);
@@ -87,8 +87,8 @@  discard block
 block discarded – undo
87 87
         $evt = $this->_createTransportChangeEvent();
88 88
         $logger = $this->_createLogger();
89 89
         $logger->expects($this->once())
90
-               ->method('add')
91
-               ->with($this->anything());
90
+                ->method('add')
91
+                ->with($this->anything());
92 92
 
93 93
         $plugin = $this->_createPlugin($logger);
94 94
         $plugin->transportStopped($evt);
@@ -99,8 +99,8 @@  discard block
 block discarded – undo
99 99
         $evt = $this->_createTransportChangeEvent();
100 100
         $logger = $this->_createLogger();
101 101
         $logger->expects($this->once())
102
-               ->method('add')
103
-               ->with($this->anything());
102
+                ->method('add')
103
+                ->with($this->anything());
104 104
 
105 105
         $plugin = $this->_createPlugin($logger);
106 106
         $plugin->beforeTransportStopped($evt);
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
         $evt = $this->_createTransportExceptionEvent();
113 113
         $logger = $this->_createLogger();
114 114
         $logger->expects($this->once())
115
-               ->method('add')
116
-               ->with($this->anything());
115
+                ->method('add')
116
+                ->with($this->anything());
117 117
 
118 118
         $plugin = $this->_createPlugin($logger);
119 119
         try {
Please login to merge, or discard this patch.
swiftmailer/swiftmailer/tests/unit/Swift/Plugins/RedirectingPluginTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -171,6 +171,9 @@
 block discarded – undo
171 171
 
172 172
     // -- Creation Methods
173 173
 
174
+    /**
175
+     * @return Swift_Events_SendEvent
176
+     */
174 177
     private function _createSendEvent(Swift_Mime_Message $message)
175 178
     {
176 179
         $evt = $this->getMockBuilder('Swift_Events_SendEvent')
Please login to merge, or discard this patch.
vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/DKIMSignerTest.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -163,7 +163,7 @@
 block discarded – undo
163 163
     }
164 164
 
165 165
     /**
166
-     * @return Swift_Mime_Headers
166
+     * @return Swift_Mime_HeaderSet
167 167
      */
168 168
     private function _createHeaders()
169 169
     {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
         if (version_compare(phpversion(), '5.4', '<') && !defined('OPENSSL_ALGO_SHA256')) {
8 8
             $this->markTestSkipped(
9 9
                 'skipping because of https://bugs.php.net/bug.php?id=61421'
10
-             );
10
+                );
11 11
         }
12 12
     }
13 13
 
Please login to merge, or discard this patch.
vendor/swiftmailer/swiftmailer/tests/unit/Swift/Signers/SMimeSignerTest.php 2 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -490,8 +490,7 @@
 block discarded – undo
490 490
     /**
491 491
      * Strips of the sender headers and Mime-Version.
492 492
      *
493
-     * @param Swift_ByteStream_TemporaryFileByteStream $messageStream
494
-     * @param Swift_ByteStream_TemporaryFileByteStream $inputStream
493
+     * @param string $content
495 494
      */
496 495
     protected function cleanMessage($content)
497 496
     {
Please login to merge, or discard this patch.
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -20,9 +20,9 @@  discard block
 block discarded – undo
20 20
     public function testUnSingedMessage()
21 21
     {
22 22
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
23
-          ->setFrom(array('[email protected]' => 'John Doe'))
24
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
25
-          ->setBody('Here is the message itself');
23
+            ->setFrom(array('[email protected]' => 'John Doe'))
24
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
25
+            ->setBody('Here is the message itself');
26 26
 
27 27
         $this->assertEquals('Here is the message itself', $message->getBody());
28 28
     }
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
30 30
     public function testSingedMessage()
31 31
     {
32 32
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
33
-          ->setFrom(array('[email protected]' => 'John Doe'))
34
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
35
-          ->setBody('Here is the message itself');
33
+            ->setFrom(array('[email protected]' => 'John Doe'))
34
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
35
+            ->setBody('Here is the message itself');
36 36
 
37 37
         $signer = new Swift_Signers_SMimeSigner();
38 38
         $signer->setSignCertificate($this->samplesDir.'smime/sign.crt', $this->samplesDir.'smime/sign.key');
@@ -73,9 +73,9 @@  discard block
 block discarded – undo
73 73
     public function testSingedMessageExtraCerts()
74 74
     {
75 75
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
76
-          ->setFrom(array('[email protected]' => 'John Doe'))
77
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
78
-          ->setBody('Here is the message itself');
76
+            ->setFrom(array('[email protected]' => 'John Doe'))
77
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
78
+            ->setBody('Here is the message itself');
79 79
 
80 80
         $signer = new Swift_Signers_SMimeSigner();
81 81
         $signer->setSignCertificate($this->samplesDir.'smime/sign2.crt', $this->samplesDir.'smime/sign2.key', PKCS7_DETACHED, $this->samplesDir.'smime/intermediate.crt');
@@ -116,9 +116,9 @@  discard block
 block discarded – undo
116 116
     public function testSingedMessageBinary()
117 117
     {
118 118
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
119
-          ->setFrom(array('[email protected]' => 'John Doe'))
120
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
121
-          ->setBody('Here is the message itself');
119
+            ->setFrom(array('[email protected]' => 'John Doe'))
120
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
121
+            ->setBody('Here is the message itself');
122 122
 
123 123
         $signer = new Swift_Signers_SMimeSigner();
124 124
         $signer->setSignCertificate($this->samplesDir.'smime/sign.crt', $this->samplesDir.'smime/sign.key', PKCS7_BINARY);
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
     public function testSingedMessageWithAttachments()
152 152
     {
153 153
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
154
-          ->setFrom(array('[email protected]' => 'John Doe'))
155
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
156
-          ->setBody('Here is the message itself');
154
+            ->setFrom(array('[email protected]' => 'John Doe'))
155
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
156
+            ->setBody('Here is the message itself');
157 157
 
158 158
         $message->attach(Swift_Attachment::fromPath($this->samplesDir.'/files/textfile.zip'));
159 159
 
@@ -215,9 +215,9 @@  discard block
 block discarded – undo
215 215
     public function testEncryptedMessage()
216 216
     {
217 217
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
218
-          ->setFrom(array('[email protected]' => 'John Doe'))
219
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
220
-          ->setBody('Here is the message itself');
218
+            ->setFrom(array('[email protected]' => 'John Doe'))
219
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
220
+            ->setBody('Here is the message itself');
221 221
 
222 222
         $originalMessage = $this->cleanMessage($message->toString());
223 223
 
@@ -253,9 +253,9 @@  discard block
 block discarded – undo
253 253
     public function testEncryptedMessageWithMultipleCerts()
254 254
     {
255 255
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
256
-          ->setFrom(array('[email protected]' => 'John Doe'))
257
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
258
-          ->setBody('Here is the message itself');
256
+            ->setFrom(array('[email protected]' => 'John Doe'))
257
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
258
+            ->setBody('Here is the message itself');
259 259
 
260 260
         $originalMessage = $this->cleanMessage($message->toString());
261 261
 
@@ -300,9 +300,9 @@  discard block
 block discarded – undo
300 300
     public function testSignThenEncryptedMessage()
301 301
     {
302 302
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
303
-          ->setFrom(array('[email protected]' => 'John Doe'))
304
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
305
-          ->setBody('Here is the message itself');
303
+            ->setFrom(array('[email protected]' => 'John Doe'))
304
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
305
+            ->setBody('Here is the message itself');
306 306
 
307 307
         $signer = new Swift_Signers_SMimeSigner();
308 308
         $signer->setSignCertificate($this->samplesDir.'smime/sign.crt', $this->samplesDir.'smime/sign.key');
@@ -365,9 +365,9 @@  discard block
 block discarded – undo
365 365
     public function testEncryptThenSignMessage()
366 366
     {
367 367
         $message = Swift_SignedMessage::newInstance('Wonderful Subject')
368
-          ->setFrom(array('[email protected]' => 'John Doe'))
369
-          ->setTo(array('[email protected]', '[email protected]' => 'A name'))
370
-          ->setBody('Here is the message itself');
368
+            ->setFrom(array('[email protected]' => 'John Doe'))
369
+            ->setTo(array('[email protected]', '[email protected]' => 'A name'))
370
+            ->setBody('Here is the message itself');
371 371
 
372 372
         $originalMessage = $this->cleanMessage($message->toString());
373 373
 
Please login to merge, or discard this patch.
swiftmailer/swiftmailer/tests/unit/Swift/Transport/AbstractSmtpTest.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -1179,6 +1179,9 @@
 block discarded – undo
1179 1179
         return $this->getMockery('Swift_Transport_IoBuffer')->shouldIgnoreMissing();
1180 1180
     }
1181 1181
 
1182
+    /**
1183
+     * @return Swift_Mime_Message
1184
+     */
1182 1185
     protected function _createMessage()
1183 1186
     {
1184 1187
         return $this->getMockery('Swift_Mime_Message')->shouldIgnoreMissing();
Please login to merge, or discard this patch.
swiftmailer/tests/unit/Swift/Transport/FailoverTransportTest.php 3 patches
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -513,6 +513,9 @@
 block discarded – undo
513 513
         return $transport;
514 514
     }
515 515
 
516
+    /**
517
+     * @return Swift_Events_EventListener
518
+     */
516 519
     private function _createPlugin()
517 520
     {
518 521
         return $this->getMockery('Swift_Events_EventListener');
Please login to merge, or discard this patch.
Indentation   +265 added lines, -265 removed lines patch added patch discarded remove patch
@@ -11,25 +11,25 @@  discard block
 block discarded – undo
11 11
         $connectionState = false;
12 12
 
13 13
         $t1->shouldReceive('isStarted')
14
-           ->zeroOrMoreTimes()
15
-           ->andReturnUsing(function () use (&$connectionState) {
16
-               return $connectionState;
17
-           });
14
+            ->zeroOrMoreTimes()
15
+            ->andReturnUsing(function () use (&$connectionState) {
16
+                return $connectionState;
17
+            });
18 18
         $t1->shouldReceive('start')
19
-           ->once()
20
-           ->andReturnUsing(function () use (&$connectionState) {
21
-               if (!$connectionState) {
22
-                   $connectionState = true;
23
-               }
24
-           });
19
+            ->once()
20
+            ->andReturnUsing(function () use (&$connectionState) {
21
+                if (!$connectionState) {
22
+                    $connectionState = true;
23
+                }
24
+            });
25 25
         $t1->shouldReceive('send')
26
-           ->twice()
27
-           ->with(\Mockery::anyOf($message1, $message2), \Mockery::any())
28
-           ->andReturnUsing(function () use (&$connectionState) {
29
-               if ($connectionState) {
30
-                   return 1;
31
-               }
32
-           });
26
+            ->twice()
27
+            ->with(\Mockery::anyOf($message1, $message2), \Mockery::any())
28
+            ->andReturnUsing(function () use (&$connectionState) {
29
+                if ($connectionState) {
30
+                    return 1;
31
+                }
32
+            });
33 33
         $t2->shouldReceive('start')->never();
34 34
         $t2->shouldReceive('send')->never();
35 35
 
@@ -50,46 +50,46 @@  discard block
 block discarded – undo
50 50
         $connectionState2 = false;
51 51
 
52 52
         $t1->shouldReceive('isStarted')
53
-           ->zeroOrMoreTimes()
54
-           ->andReturnUsing(function () use (&$connectionState1) {
55
-               return $connectionState1;
56
-           });
53
+            ->zeroOrMoreTimes()
54
+            ->andReturnUsing(function () use (&$connectionState1) {
55
+                return $connectionState1;
56
+            });
57 57
         $t1->shouldReceive('start')
58
-           ->once()
59
-           ->andReturnUsing(function () use (&$connectionState1) {
60
-               if (!$connectionState1) {
61
-                   $connectionState1 = true;
62
-               }
63
-           });
58
+            ->once()
59
+            ->andReturnUsing(function () use (&$connectionState1) {
60
+                if (!$connectionState1) {
61
+                    $connectionState1 = true;
62
+                }
63
+            });
64 64
         $t1->shouldReceive('send')
65
-           ->once()
66
-           ->with($message, \Mockery::any())
67
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
68
-               if ($connectionState1) {
69
-                   throw $e;
70
-               }
71
-           });
65
+            ->once()
66
+            ->with($message, \Mockery::any())
67
+            ->andReturnUsing(function () use (&$connectionState1, $e) {
68
+                if ($connectionState1) {
69
+                    throw $e;
70
+                }
71
+            });
72 72
 
73 73
         $t2->shouldReceive('isStarted')
74
-           ->zeroOrMoreTimes()
75
-           ->andReturnUsing(function () use (&$connectionState2) {
76
-               return $connectionState2;
77
-           });
74
+            ->zeroOrMoreTimes()
75
+            ->andReturnUsing(function () use (&$connectionState2) {
76
+                return $connectionState2;
77
+            });
78 78
         $t2->shouldReceive('start')
79
-           ->once()
80
-           ->andReturnUsing(function () use (&$connectionState2) {
81
-               if (!$connectionState2) {
82
-                   $connectionState2 = true;
83
-               }
84
-           });
79
+            ->once()
80
+            ->andReturnUsing(function () use (&$connectionState2) {
81
+                if (!$connectionState2) {
82
+                    $connectionState2 = true;
83
+                }
84
+            });
85 85
         $t2->shouldReceive('send')
86
-           ->once()
87
-           ->with($message, \Mockery::any())
88
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
89
-               if ($connectionState2) {
90
-                   return 1;
91
-               }
92
-           });
86
+            ->once()
87
+            ->with($message, \Mockery::any())
88
+            ->andReturnUsing(function () use (&$connectionState2, $e) {
89
+                if ($connectionState2) {
90
+                    return 1;
91
+                }
92
+            });
93 93
 
94 94
         $transport = $this->_getTransport(array($t1, $t2));
95 95
         $transport->start();
@@ -103,28 +103,28 @@  discard block
 block discarded – undo
103 103
 
104 104
         $connectionState = false;
105 105
         $t1->shouldReceive('isStarted')
106
-           ->zeroOrMoreTimes()
107
-           ->andReturnUsing(function () use (&$connectionState) {
108
-               return $connectionState;
109
-           });
106
+            ->zeroOrMoreTimes()
107
+            ->andReturnUsing(function () use (&$connectionState) {
108
+                return $connectionState;
109
+            });
110 110
         $t1->shouldReceive('start')
111
-           ->once()
112
-           ->andReturnUsing(function () use (&$connectionState) {
113
-               if (!$connectionState) {
114
-                   $connectionState = true;
115
-               }
116
-           });
111
+            ->once()
112
+            ->andReturnUsing(function () use (&$connectionState) {
113
+                if (!$connectionState) {
114
+                    $connectionState = true;
115
+                }
116
+            });
117 117
         $testCase = $this;
118 118
         $t1->shouldReceive('send')
119
-           ->once()
120
-           ->with($message, \Mockery::any())
121
-           ->andReturnUsing(function () use (&$connectionState, $testCase) {
122
-               if (!$connectionState) {
123
-                   $testCase->fail();
124
-               }
119
+            ->once()
120
+            ->with($message, \Mockery::any())
121
+            ->andReturnUsing(function () use (&$connectionState, $testCase) {
122
+                if (!$connectionState) {
123
+                    $testCase->fail();
124
+                }
125 125
 
126
-               return 0;
127
-           });
126
+                return 0;
127
+            });
128 128
 
129 129
         $transport = $this->_getTransport(array($t1));
130 130
         $transport->start();
@@ -145,55 +145,55 @@  discard block
 block discarded – undo
145 145
         $connectionState2 = false;
146 146
 
147 147
         $t1->shouldReceive('isStarted')
148
-           ->zeroOrMoreTimes()
149
-           ->andReturnUsing(function () use (&$connectionState1) {
150
-               return $connectionState1;
151
-           });
148
+            ->zeroOrMoreTimes()
149
+            ->andReturnUsing(function () use (&$connectionState1) {
150
+                return $connectionState1;
151
+            });
152 152
         $t1->shouldReceive('start')
153
-           ->once()
154
-           ->andReturnUsing(function () use (&$connectionState1) {
155
-               if (!$connectionState1) {
156
-                   $connectionState1 = true;
157
-               }
158
-           });
153
+            ->once()
154
+            ->andReturnUsing(function () use (&$connectionState1) {
155
+                if (!$connectionState1) {
156
+                    $connectionState1 = true;
157
+                }
158
+            });
159 159
         $t1->shouldReceive('send')
160
-           ->once()
161
-           ->with($message1, \Mockery::any())
162
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
163
-               if ($connectionState1) {
164
-                   throw $e;
165
-               }
166
-           });
160
+            ->once()
161
+            ->with($message1, \Mockery::any())
162
+            ->andReturnUsing(function () use (&$connectionState1, $e) {
163
+                if ($connectionState1) {
164
+                    throw $e;
165
+                }
166
+            });
167 167
         $t1->shouldReceive('send')
168
-           ->never()
169
-           ->with($message2, \Mockery::any());
168
+            ->never()
169
+            ->with($message2, \Mockery::any());
170 170
         $t1->shouldReceive('send')
171
-           ->never()
172
-           ->with($message3, \Mockery::any());
171
+            ->never()
172
+            ->with($message3, \Mockery::any());
173 173
         $t1->shouldReceive('send')
174
-           ->never()
175
-           ->with($message4, \Mockery::any());
174
+            ->never()
175
+            ->with($message4, \Mockery::any());
176 176
 
177 177
         $t2->shouldReceive('isStarted')
178
-           ->zeroOrMoreTimes()
179
-           ->andReturnUsing(function () use (&$connectionState2) {
180
-               return $connectionState2;
181
-           });
178
+            ->zeroOrMoreTimes()
179
+            ->andReturnUsing(function () use (&$connectionState2) {
180
+                return $connectionState2;
181
+            });
182 182
         $t2->shouldReceive('start')
183
-           ->once()
184
-           ->andReturnUsing(function () use (&$connectionState2) {
185
-               if (!$connectionState2) {
186
-                   $connectionState2 = true;
187
-               }
188
-           });
183
+            ->once()
184
+            ->andReturnUsing(function () use (&$connectionState2) {
185
+                if (!$connectionState2) {
186
+                    $connectionState2 = true;
187
+                }
188
+            });
189 189
         $t2->shouldReceive('send')
190
-           ->times(4)
191
-           ->with(\Mockery::anyOf($message1, $message2, $message3, $message4), \Mockery::any())
192
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
193
-               if ($connectionState2) {
194
-                   return 1;
195
-               }
196
-           });
190
+            ->times(4)
191
+            ->with(\Mockery::anyOf($message1, $message2, $message3, $message4), \Mockery::any())
192
+            ->andReturnUsing(function () use (&$connectionState2, $e) {
193
+                if ($connectionState2) {
194
+                    return 1;
195
+                }
196
+            });
197 197
 
198 198
         $transport = $this->_getTransport(array($t1, $t2));
199 199
         $transport->start();
@@ -214,46 +214,46 @@  discard block
 block discarded – undo
214 214
         $connectionState2 = false;
215 215
 
216 216
         $t1->shouldReceive('isStarted')
217
-           ->zeroOrMoreTimes()
218
-           ->andReturnUsing(function () use (&$connectionState1) {
219
-               return $connectionState1;
220
-           });
217
+            ->zeroOrMoreTimes()
218
+            ->andReturnUsing(function () use (&$connectionState1) {
219
+                return $connectionState1;
220
+            });
221 221
         $t1->shouldReceive('start')
222
-           ->once()
223
-           ->andReturnUsing(function () use (&$connectionState1) {
224
-               if (!$connectionState1) {
225
-                   $connectionState1 = true;
226
-               }
227
-           });
222
+            ->once()
223
+            ->andReturnUsing(function () use (&$connectionState1) {
224
+                if (!$connectionState1) {
225
+                    $connectionState1 = true;
226
+                }
227
+            });
228 228
         $t1->shouldReceive('send')
229
-           ->once()
230
-           ->with($message, \Mockery::any())
231
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
232
-               if ($connectionState1) {
233
-                   throw $e;
234
-               }
235
-           });
229
+            ->once()
230
+            ->with($message, \Mockery::any())
231
+            ->andReturnUsing(function () use (&$connectionState1, $e) {
232
+                if ($connectionState1) {
233
+                    throw $e;
234
+                }
235
+            });
236 236
 
237 237
         $t2->shouldReceive('isStarted')
238
-           ->zeroOrMoreTimes()
239
-           ->andReturnUsing(function () use (&$connectionState2) {
240
-               return $connectionState2;
241
-           });
238
+            ->zeroOrMoreTimes()
239
+            ->andReturnUsing(function () use (&$connectionState2) {
240
+                return $connectionState2;
241
+            });
242 242
         $t2->shouldReceive('start')
243
-           ->once()
244
-           ->andReturnUsing(function () use (&$connectionState2) {
245
-               if (!$connectionState2) {
246
-                   $connectionState2 = true;
247
-               }
248
-           });
243
+            ->once()
244
+            ->andReturnUsing(function () use (&$connectionState2) {
245
+                if (!$connectionState2) {
246
+                    $connectionState2 = true;
247
+                }
248
+            });
249 249
         $t2->shouldReceive('send')
250
-           ->once()
251
-           ->with($message, \Mockery::any())
252
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
253
-               if ($connectionState2) {
254
-                   throw $e;
255
-               }
256
-           });
250
+            ->once()
251
+            ->with($message, \Mockery::any())
252
+            ->andReturnUsing(function () use (&$connectionState2, $e) {
253
+                if ($connectionState2) {
254
+                    throw $e;
255
+                }
256
+            });
257 257
 
258 258
         $transport = $this->_getTransport(array($t1, $t2));
259 259
         $transport->start();
@@ -273,30 +273,30 @@  discard block
 block discarded – undo
273 273
         $connectionState2 = true;
274 274
 
275 275
         $t1->shouldReceive('isStarted')
276
-           ->zeroOrMoreTimes()
277
-           ->andReturnUsing(function () use (&$connectionState1) {
278
-               return $connectionState1;
279
-           });
276
+            ->zeroOrMoreTimes()
277
+            ->andReturnUsing(function () use (&$connectionState1) {
278
+                return $connectionState1;
279
+            });
280 280
         $t1->shouldReceive('stop')
281
-           ->once()
282
-           ->andReturnUsing(function () use (&$connectionState1) {
283
-               if ($connectionState1) {
284
-                   $connectionState1 = false;
285
-               }
286
-           });
281
+            ->once()
282
+            ->andReturnUsing(function () use (&$connectionState1) {
283
+                if ($connectionState1) {
284
+                    $connectionState1 = false;
285
+                }
286
+            });
287 287
 
288 288
         $t2->shouldReceive('isStarted')
289
-           ->zeroOrMoreTimes()
290
-           ->andReturnUsing(function () use (&$connectionState2) {
291
-               return $connectionState2;
292
-           });
289
+            ->zeroOrMoreTimes()
290
+            ->andReturnUsing(function () use (&$connectionState2) {
291
+                return $connectionState2;
292
+            });
293 293
         $t2->shouldReceive('stop')
294
-           ->once()
295
-           ->andReturnUsing(function () use (&$connectionState2) {
296
-               if ($connectionState2) {
297
-                   $connectionState2 = false;
298
-               }
299
-           });
294
+            ->once()
295
+            ->andReturnUsing(function () use (&$connectionState2) {
296
+                if ($connectionState2) {
297
+                    $connectionState2 = false;
298
+                }
299
+            });
300 300
 
301 301
         $transport = $this->_getTransport(array($t1, $t2));
302 302
         $transport->start();
@@ -315,48 +315,48 @@  discard block
 block discarded – undo
315 315
         $connectionState2 = false;
316 316
 
317 317
         $t1->shouldReceive('isStarted')
318
-           ->zeroOrMoreTimes()
319
-           ->andReturnUsing(function () use (&$connectionState1) {
320
-               return $connectionState1;
321
-           });
318
+            ->zeroOrMoreTimes()
319
+            ->andReturnUsing(function () use (&$connectionState1) {
320
+                return $connectionState1;
321
+            });
322 322
         $t1->shouldReceive('start')
323
-           ->once()
324
-           ->andReturnUsing(function () use (&$connectionState1) {
325
-               if (!$connectionState1) {
326
-                   $connectionState1 = true;
327
-               }
328
-           });
323
+            ->once()
324
+            ->andReturnUsing(function () use (&$connectionState1) {
325
+                if (!$connectionState1) {
326
+                    $connectionState1 = true;
327
+                }
328
+            });
329 329
         $t1->shouldReceive('send')
330
-           ->once()
331
-           ->with($message, \Mockery::any())
332
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
333
-               if ($connectionState1) {
334
-                   $connectionState1 = false;
335
-                   throw $e;
336
-               }
337
-           });
330
+            ->once()
331
+            ->with($message, \Mockery::any())
332
+            ->andReturnUsing(function () use (&$connectionState1, $e) {
333
+                if ($connectionState1) {
334
+                    $connectionState1 = false;
335
+                    throw $e;
336
+                }
337
+            });
338 338
 
339 339
         $t2->shouldReceive('isStarted')
340
-           ->zeroOrMoreTimes()
341
-           ->andReturnUsing(function () use (&$connectionState2) {
342
-               return $connectionState2;
343
-           });
340
+            ->zeroOrMoreTimes()
341
+            ->andReturnUsing(function () use (&$connectionState2) {
342
+                return $connectionState2;
343
+            });
344 344
         $t2->shouldReceive('start')
345
-           ->once()
346
-           ->andReturnUsing(function () use (&$connectionState2) {
347
-               if (!$connectionState2) {
348
-                   $connectionState2 = true;
349
-               }
350
-           });
345
+            ->once()
346
+            ->andReturnUsing(function () use (&$connectionState2) {
347
+                if (!$connectionState2) {
348
+                    $connectionState2 = true;
349
+                }
350
+            });
351 351
         $t2->shouldReceive('send')
352
-           ->once()
353
-           ->with($message, \Mockery::any())
354
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
355
-               if ($connectionState2) {
356
-                   $connectionState2 = false;
357
-                   throw $e;
358
-               }
359
-           });
352
+            ->once()
353
+            ->with($message, \Mockery::any())
354
+            ->andReturnUsing(function () use (&$connectionState2, $e) {
355
+                if ($connectionState2) {
356
+                    $connectionState2 = false;
357
+                    throw $e;
358
+                }
359
+            });
360 360
 
361 361
         $transport = $this->_getTransport(array($t1, $t2));
362 362
         $transport->start();
@@ -382,59 +382,59 @@  discard block
 block discarded – undo
382 382
         $connectionState2 = false;
383 383
 
384 384
         $t1->shouldReceive('isStarted')
385
-           ->zeroOrMoreTimes()
386
-           ->andReturnUsing(function () use (&$connectionState1) {
387
-               return $connectionState1;
388
-           });
385
+            ->zeroOrMoreTimes()
386
+            ->andReturnUsing(function () use (&$connectionState1) {
387
+                return $connectionState1;
388
+            });
389 389
         $t1->shouldReceive('start')
390
-           ->twice()
391
-           ->andReturnUsing(function () use (&$connectionState1) {
392
-               if (!$connectionState1) {
393
-                   $connectionState1 = true;
394
-               }
395
-           });
390
+            ->twice()
391
+            ->andReturnUsing(function () use (&$connectionState1) {
392
+                if (!$connectionState1) {
393
+                    $connectionState1 = true;
394
+                }
395
+            });
396 396
         $t1->shouldReceive('send')
397
-           ->once()
398
-           ->with($message1, \Mockery::any())
399
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
400
-               if ($connectionState1) {
401
-                   $connectionState1 = false;
402
-                   throw $e;
403
-               }
404
-           });
397
+            ->once()
398
+            ->with($message1, \Mockery::any())
399
+            ->andReturnUsing(function () use (&$connectionState1, $e) {
400
+                if ($connectionState1) {
401
+                    $connectionState1 = false;
402
+                    throw $e;
403
+                }
404
+            });
405 405
         $t1->shouldReceive('send')
406
-           ->once()
407
-           ->with($message2, \Mockery::any())
408
-           ->andReturnUsing(function () use (&$connectionState1) {
409
-               if ($connectionState1) {
410
-                   return 10;
411
-               }
412
-           });
406
+            ->once()
407
+            ->with($message2, \Mockery::any())
408
+            ->andReturnUsing(function () use (&$connectionState1) {
409
+                if ($connectionState1) {
410
+                    return 10;
411
+                }
412
+            });
413 413
 
414 414
         $t2->shouldReceive('isStarted')
415
-           ->zeroOrMoreTimes()
416
-           ->andReturnUsing(function () use (&$connectionState2) {
417
-               return $connectionState2;
418
-           });
415
+            ->zeroOrMoreTimes()
416
+            ->andReturnUsing(function () use (&$connectionState2) {
417
+                return $connectionState2;
418
+            });
419 419
         $t2->shouldReceive('start')
420
-           ->once()
421
-           ->andReturnUsing(function () use (&$connectionState2) {
422
-               if (!$connectionState2) {
423
-                   $connectionState2 = true;
424
-               }
425
-           });
420
+            ->once()
421
+            ->andReturnUsing(function () use (&$connectionState2) {
422
+                if (!$connectionState2) {
423
+                    $connectionState2 = true;
424
+                }
425
+            });
426 426
         $t2->shouldReceive('send')
427
-           ->once()
428
-           ->with($message1, \Mockery::any())
429
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
430
-               if ($connectionState2) {
431
-                   $connectionState2 = false;
432
-                   throw $e;
433
-               }
434
-           });
427
+            ->once()
428
+            ->with($message1, \Mockery::any())
429
+            ->andReturnUsing(function () use (&$connectionState2, $e) {
430
+                if ($connectionState2) {
431
+                    $connectionState2 = false;
432
+                    throw $e;
433
+                }
434
+            });
435 435
         $t2->shouldReceive('send')
436
-           ->never()
437
-           ->with($message2, \Mockery::any());
436
+            ->never()
437
+            ->with($message2, \Mockery::any());
438 438
 
439 439
         $transport = $this->_getTransport(array($t1, $t2));
440 440
         $transport->start();
@@ -461,25 +461,25 @@  discard block
 block discarded – undo
461 461
         $connectionState = false;
462 462
 
463 463
         $t1->shouldReceive('isStarted')
464
-           ->zeroOrMoreTimes()
465
-           ->andReturnUsing(function () use ($connectionState) {
466
-               return $connectionState;
467
-           });
464
+            ->zeroOrMoreTimes()
465
+            ->andReturnUsing(function () use ($connectionState) {
466
+                return $connectionState;
467
+            });
468 468
         $t1->shouldReceive('start')
469
-           ->once()
470
-           ->andReturnUsing(function () use ($connectionState) {
471
-               if (!$connectionState) {
472
-                   $connectionState = true;
473
-               }
474
-           });
469
+            ->once()
470
+            ->andReturnUsing(function () use ($connectionState) {
471
+                if (!$connectionState) {
472
+                    $connectionState = true;
473
+                }
474
+            });
475 475
         $t1->shouldReceive('send')
476
-           ->once()
477
-           ->with($message, $failures)
478
-           ->andReturnUsing(function () use ($connectionState) {
479
-               if ($connectionState) {
480
-                   return 1;
481
-               }
482
-           });
476
+            ->once()
477
+            ->with($message, $failures)
478
+            ->andReturnUsing(function () use ($connectionState) {
479
+                if ($connectionState) {
480
+                    return 1;
481
+                }
482
+            });
483 483
 
484 484
         $transport = $this->_getTransport(array($t1));
485 485
         $transport->start();
@@ -493,11 +493,11 @@  discard block
 block discarded – undo
493 493
         $t1 = $this->getMockery('Swift_Transport');
494 494
         $t2 = $this->getMockery('Swift_Transport');
495 495
         $t1->shouldReceive('registerPlugin')
496
-           ->once()
497
-           ->with($plugin);
496
+            ->once()
497
+            ->with($plugin);
498 498
         $t2->shouldReceive('registerPlugin')
499
-           ->once()
500
-           ->with($plugin);
499
+            ->once()
500
+            ->with($plugin);
501 501
 
502 502
         $transport = $this->_getTransport(array($t1, $t2));
503 503
         $transport->registerPlugin($plugin);
Please login to merge, or discard this patch.
Spacing   +44 added lines, -44 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@  discard block
 block discarded – undo
12 12
 
13 13
         $t1->shouldReceive('isStarted')
14 14
            ->zeroOrMoreTimes()
15
-           ->andReturnUsing(function () use (&$connectionState) {
15
+           ->andReturnUsing(function() use (&$connectionState) {
16 16
                return $connectionState;
17 17
            });
18 18
         $t1->shouldReceive('start')
19 19
            ->once()
20
-           ->andReturnUsing(function () use (&$connectionState) {
20
+           ->andReturnUsing(function() use (&$connectionState) {
21 21
                if (!$connectionState) {
22 22
                    $connectionState = true;
23 23
                }
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $t1->shouldReceive('send')
26 26
            ->twice()
27 27
            ->with(\Mockery::anyOf($message1, $message2), \Mockery::any())
28
-           ->andReturnUsing(function () use (&$connectionState) {
28
+           ->andReturnUsing(function() use (&$connectionState) {
29 29
                if ($connectionState) {
30 30
                    return 1;
31 31
                }
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 
52 52
         $t1->shouldReceive('isStarted')
53 53
            ->zeroOrMoreTimes()
54
-           ->andReturnUsing(function () use (&$connectionState1) {
54
+           ->andReturnUsing(function() use (&$connectionState1) {
55 55
                return $connectionState1;
56 56
            });
57 57
         $t1->shouldReceive('start')
58 58
            ->once()
59
-           ->andReturnUsing(function () use (&$connectionState1) {
59
+           ->andReturnUsing(function() use (&$connectionState1) {
60 60
                if (!$connectionState1) {
61 61
                    $connectionState1 = true;
62 62
                }
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $t1->shouldReceive('send')
65 65
            ->once()
66 66
            ->with($message, \Mockery::any())
67
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
67
+           ->andReturnUsing(function() use (&$connectionState1, $e) {
68 68
                if ($connectionState1) {
69 69
                    throw $e;
70 70
                }
@@ -72,12 +72,12 @@  discard block
 block discarded – undo
72 72
 
73 73
         $t2->shouldReceive('isStarted')
74 74
            ->zeroOrMoreTimes()
75
-           ->andReturnUsing(function () use (&$connectionState2) {
75
+           ->andReturnUsing(function() use (&$connectionState2) {
76 76
                return $connectionState2;
77 77
            });
78 78
         $t2->shouldReceive('start')
79 79
            ->once()
80
-           ->andReturnUsing(function () use (&$connectionState2) {
80
+           ->andReturnUsing(function() use (&$connectionState2) {
81 81
                if (!$connectionState2) {
82 82
                    $connectionState2 = true;
83 83
                }
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
         $t2->shouldReceive('send')
86 86
            ->once()
87 87
            ->with($message, \Mockery::any())
88
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
88
+           ->andReturnUsing(function() use (&$connectionState2, $e) {
89 89
                if ($connectionState2) {
90 90
                    return 1;
91 91
                }
@@ -104,12 +104,12 @@  discard block
 block discarded – undo
104 104
         $connectionState = false;
105 105
         $t1->shouldReceive('isStarted')
106 106
            ->zeroOrMoreTimes()
107
-           ->andReturnUsing(function () use (&$connectionState) {
107
+           ->andReturnUsing(function() use (&$connectionState) {
108 108
                return $connectionState;
109 109
            });
110 110
         $t1->shouldReceive('start')
111 111
            ->once()
112
-           ->andReturnUsing(function () use (&$connectionState) {
112
+           ->andReturnUsing(function() use (&$connectionState) {
113 113
                if (!$connectionState) {
114 114
                    $connectionState = true;
115 115
                }
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
         $t1->shouldReceive('send')
119 119
            ->once()
120 120
            ->with($message, \Mockery::any())
121
-           ->andReturnUsing(function () use (&$connectionState, $testCase) {
121
+           ->andReturnUsing(function() use (&$connectionState, $testCase) {
122 122
                if (!$connectionState) {
123 123
                    $testCase->fail();
124 124
                }
@@ -146,12 +146,12 @@  discard block
 block discarded – undo
146 146
 
147 147
         $t1->shouldReceive('isStarted')
148 148
            ->zeroOrMoreTimes()
149
-           ->andReturnUsing(function () use (&$connectionState1) {
149
+           ->andReturnUsing(function() use (&$connectionState1) {
150 150
                return $connectionState1;
151 151
            });
152 152
         $t1->shouldReceive('start')
153 153
            ->once()
154
-           ->andReturnUsing(function () use (&$connectionState1) {
154
+           ->andReturnUsing(function() use (&$connectionState1) {
155 155
                if (!$connectionState1) {
156 156
                    $connectionState1 = true;
157 157
                }
@@ -159,7 +159,7 @@  discard block
 block discarded – undo
159 159
         $t1->shouldReceive('send')
160 160
            ->once()
161 161
            ->with($message1, \Mockery::any())
162
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
162
+           ->andReturnUsing(function() use (&$connectionState1, $e) {
163 163
                if ($connectionState1) {
164 164
                    throw $e;
165 165
                }
@@ -176,12 +176,12 @@  discard block
 block discarded – undo
176 176
 
177 177
         $t2->shouldReceive('isStarted')
178 178
            ->zeroOrMoreTimes()
179
-           ->andReturnUsing(function () use (&$connectionState2) {
179
+           ->andReturnUsing(function() use (&$connectionState2) {
180 180
                return $connectionState2;
181 181
            });
182 182
         $t2->shouldReceive('start')
183 183
            ->once()
184
-           ->andReturnUsing(function () use (&$connectionState2) {
184
+           ->andReturnUsing(function() use (&$connectionState2) {
185 185
                if (!$connectionState2) {
186 186
                    $connectionState2 = true;
187 187
                }
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
         $t2->shouldReceive('send')
190 190
            ->times(4)
191 191
            ->with(\Mockery::anyOf($message1, $message2, $message3, $message4), \Mockery::any())
192
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
192
+           ->andReturnUsing(function() use (&$connectionState2, $e) {
193 193
                if ($connectionState2) {
194 194
                    return 1;
195 195
                }
@@ -215,12 +215,12 @@  discard block
 block discarded – undo
215 215
 
216 216
         $t1->shouldReceive('isStarted')
217 217
            ->zeroOrMoreTimes()
218
-           ->andReturnUsing(function () use (&$connectionState1) {
218
+           ->andReturnUsing(function() use (&$connectionState1) {
219 219
                return $connectionState1;
220 220
            });
221 221
         $t1->shouldReceive('start')
222 222
            ->once()
223
-           ->andReturnUsing(function () use (&$connectionState1) {
223
+           ->andReturnUsing(function() use (&$connectionState1) {
224 224
                if (!$connectionState1) {
225 225
                    $connectionState1 = true;
226 226
                }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
         $t1->shouldReceive('send')
229 229
            ->once()
230 230
            ->with($message, \Mockery::any())
231
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
231
+           ->andReturnUsing(function() use (&$connectionState1, $e) {
232 232
                if ($connectionState1) {
233 233
                    throw $e;
234 234
                }
@@ -236,12 +236,12 @@  discard block
 block discarded – undo
236 236
 
237 237
         $t2->shouldReceive('isStarted')
238 238
            ->zeroOrMoreTimes()
239
-           ->andReturnUsing(function () use (&$connectionState2) {
239
+           ->andReturnUsing(function() use (&$connectionState2) {
240 240
                return $connectionState2;
241 241
            });
242 242
         $t2->shouldReceive('start')
243 243
            ->once()
244
-           ->andReturnUsing(function () use (&$connectionState2) {
244
+           ->andReturnUsing(function() use (&$connectionState2) {
245 245
                if (!$connectionState2) {
246 246
                    $connectionState2 = true;
247 247
                }
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
         $t2->shouldReceive('send')
250 250
            ->once()
251 251
            ->with($message, \Mockery::any())
252
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
252
+           ->andReturnUsing(function() use (&$connectionState2, $e) {
253 253
                if ($connectionState2) {
254 254
                    throw $e;
255 255
                }
@@ -274,12 +274,12 @@  discard block
 block discarded – undo
274 274
 
275 275
         $t1->shouldReceive('isStarted')
276 276
            ->zeroOrMoreTimes()
277
-           ->andReturnUsing(function () use (&$connectionState1) {
277
+           ->andReturnUsing(function() use (&$connectionState1) {
278 278
                return $connectionState1;
279 279
            });
280 280
         $t1->shouldReceive('stop')
281 281
            ->once()
282
-           ->andReturnUsing(function () use (&$connectionState1) {
282
+           ->andReturnUsing(function() use (&$connectionState1) {
283 283
                if ($connectionState1) {
284 284
                    $connectionState1 = false;
285 285
                }
@@ -287,12 +287,12 @@  discard block
 block discarded – undo
287 287
 
288 288
         $t2->shouldReceive('isStarted')
289 289
            ->zeroOrMoreTimes()
290
-           ->andReturnUsing(function () use (&$connectionState2) {
290
+           ->andReturnUsing(function() use (&$connectionState2) {
291 291
                return $connectionState2;
292 292
            });
293 293
         $t2->shouldReceive('stop')
294 294
            ->once()
295
-           ->andReturnUsing(function () use (&$connectionState2) {
295
+           ->andReturnUsing(function() use (&$connectionState2) {
296 296
                if ($connectionState2) {
297 297
                    $connectionState2 = false;
298 298
                }
@@ -316,12 +316,12 @@  discard block
 block discarded – undo
316 316
 
317 317
         $t1->shouldReceive('isStarted')
318 318
            ->zeroOrMoreTimes()
319
-           ->andReturnUsing(function () use (&$connectionState1) {
319
+           ->andReturnUsing(function() use (&$connectionState1) {
320 320
                return $connectionState1;
321 321
            });
322 322
         $t1->shouldReceive('start')
323 323
            ->once()
324
-           ->andReturnUsing(function () use (&$connectionState1) {
324
+           ->andReturnUsing(function() use (&$connectionState1) {
325 325
                if (!$connectionState1) {
326 326
                    $connectionState1 = true;
327 327
                }
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
         $t1->shouldReceive('send')
330 330
            ->once()
331 331
            ->with($message, \Mockery::any())
332
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
332
+           ->andReturnUsing(function() use (&$connectionState1, $e) {
333 333
                if ($connectionState1) {
334 334
                    $connectionState1 = false;
335 335
                    throw $e;
@@ -338,12 +338,12 @@  discard block
 block discarded – undo
338 338
 
339 339
         $t2->shouldReceive('isStarted')
340 340
            ->zeroOrMoreTimes()
341
-           ->andReturnUsing(function () use (&$connectionState2) {
341
+           ->andReturnUsing(function() use (&$connectionState2) {
342 342
                return $connectionState2;
343 343
            });
344 344
         $t2->shouldReceive('start')
345 345
            ->once()
346
-           ->andReturnUsing(function () use (&$connectionState2) {
346
+           ->andReturnUsing(function() use (&$connectionState2) {
347 347
                if (!$connectionState2) {
348 348
                    $connectionState2 = true;
349 349
                }
@@ -351,7 +351,7 @@  discard block
 block discarded – undo
351 351
         $t2->shouldReceive('send')
352 352
            ->once()
353 353
            ->with($message, \Mockery::any())
354
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
354
+           ->andReturnUsing(function() use (&$connectionState2, $e) {
355 355
                if ($connectionState2) {
356 356
                    $connectionState2 = false;
357 357
                    throw $e;
@@ -383,12 +383,12 @@  discard block
 block discarded – undo
383 383
 
384 384
         $t1->shouldReceive('isStarted')
385 385
            ->zeroOrMoreTimes()
386
-           ->andReturnUsing(function () use (&$connectionState1) {
386
+           ->andReturnUsing(function() use (&$connectionState1) {
387 387
                return $connectionState1;
388 388
            });
389 389
         $t1->shouldReceive('start')
390 390
            ->twice()
391
-           ->andReturnUsing(function () use (&$connectionState1) {
391
+           ->andReturnUsing(function() use (&$connectionState1) {
392 392
                if (!$connectionState1) {
393 393
                    $connectionState1 = true;
394 394
                }
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
         $t1->shouldReceive('send')
397 397
            ->once()
398 398
            ->with($message1, \Mockery::any())
399
-           ->andReturnUsing(function () use (&$connectionState1, $e) {
399
+           ->andReturnUsing(function() use (&$connectionState1, $e) {
400 400
                if ($connectionState1) {
401 401
                    $connectionState1 = false;
402 402
                    throw $e;
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
         $t1->shouldReceive('send')
406 406
            ->once()
407 407
            ->with($message2, \Mockery::any())
408
-           ->andReturnUsing(function () use (&$connectionState1) {
408
+           ->andReturnUsing(function() use (&$connectionState1) {
409 409
                if ($connectionState1) {
410 410
                    return 10;
411 411
                }
@@ -413,12 +413,12 @@  discard block
 block discarded – undo
413 413
 
414 414
         $t2->shouldReceive('isStarted')
415 415
            ->zeroOrMoreTimes()
416
-           ->andReturnUsing(function () use (&$connectionState2) {
416
+           ->andReturnUsing(function() use (&$connectionState2) {
417 417
                return $connectionState2;
418 418
            });
419 419
         $t2->shouldReceive('start')
420 420
            ->once()
421
-           ->andReturnUsing(function () use (&$connectionState2) {
421
+           ->andReturnUsing(function() use (&$connectionState2) {
422 422
                if (!$connectionState2) {
423 423
                    $connectionState2 = true;
424 424
                }
@@ -426,7 +426,7 @@  discard block
 block discarded – undo
426 426
         $t2->shouldReceive('send')
427 427
            ->once()
428 428
            ->with($message1, \Mockery::any())
429
-           ->andReturnUsing(function () use (&$connectionState2, $e) {
429
+           ->andReturnUsing(function() use (&$connectionState2, $e) {
430 430
                if ($connectionState2) {
431 431
                    $connectionState2 = false;
432 432
                    throw $e;
@@ -462,12 +462,12 @@  discard block
 block discarded – undo
462 462
 
463 463
         $t1->shouldReceive('isStarted')
464 464
            ->zeroOrMoreTimes()
465
-           ->andReturnUsing(function () use ($connectionState) {
465
+           ->andReturnUsing(function() use ($connectionState) {
466 466
                return $connectionState;
467 467
            });
468 468
         $t1->shouldReceive('start')
469 469
            ->once()
470
-           ->andReturnUsing(function () use ($connectionState) {
470
+           ->andReturnUsing(function() use ($connectionState) {
471 471
                if (!$connectionState) {
472 472
                    $connectionState = true;
473 473
                }
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
         $t1->shouldReceive('send')
476 476
            ->once()
477 477
            ->with($message, $failures)
478
-           ->andReturnUsing(function () use ($connectionState) {
478
+           ->andReturnUsing(function() use ($connectionState) {
479 479
                if ($connectionState) {
480 480
                    return 1;
481 481
                }
Please login to merge, or discard this patch.
vendor/symfony/console/Application.php 2 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -1022,6 +1022,9 @@  discard block
 block discarded – undo
1022 1022
         $this->defaultCommand = $commandName;
1023 1023
     }
1024 1024
 
1025
+    /**
1026
+     * @param string $string
1027
+     */
1025 1028
     private function stringWidth($string)
1026 1029
     {
1027 1030
         if (false === $encoding = mb_detect_encoding($string, null, true)) {
@@ -1031,6 +1034,9 @@  discard block
 block discarded – undo
1031 1034
         return mb_strwidth($string, $encoding);
1032 1035
     }
1033 1036
 
1037
+    /**
1038
+     * @param integer $width
1039
+     */
1034 1040
     private function splitStringByWidth($string, $width)
1035 1041
     {
1036 1042
         // str_split is not suitable for multi-byte characters, we should use preg_split to get char array properly.
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
     public function findNamespace($namespace)
448 448
     {
449 449
         $allNamespaces = $this->getNamespaces();
450
-        $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace);
450
+        $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]).'[^:]*'; }, $namespace);
451 451
         $namespaces = preg_grep('{^'.$expr.'}', $allNamespaces);
452 452
 
453 453
         if (empty($namespaces)) {
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
     public function find($name)
490 490
     {
491 491
         $allCommands = array_keys($this->commands);
492
-        $expr = preg_replace_callback('{([^:]+|)}', function ($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
492
+        $expr = preg_replace_callback('{([^:]+|)}', function($matches) { return preg_quote($matches[1]).'[^:]*'; }, $name);
493 493
         $commands = preg_grep('{^'.$expr.'}', $allCommands);
494 494
 
495 495
         if (empty($commands) || count(preg_grep('{^'.$expr.'$}', $commands)) < 1) {
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         // filter out aliases for commands which are already on the list
516 516
         if (count($commands) > 1) {
517 517
             $commandList = $this->commands;
518
-            $commands = array_filter($commands, function ($nameOrAlias) use ($commandList, $commands) {
518
+            $commands = array_filter($commands, function($nameOrAlias) use ($commandList, $commands) {
519 519
                 $commandName = $commandList[$nameOrAlias]->getName();
520 520
 
521 521
                 return $commandName === $nameOrAlias || !in_array($commandName, $commands);
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
             }
1007 1007
         }
1008 1008
 
1009
-        $alternatives = array_filter($alternatives, function ($lev) use ($threshold) { return $lev < 2 * $threshold; });
1009
+        $alternatives = array_filter($alternatives, function($lev) use ($threshold) { return $lev < 2 * $threshold; });
1010 1010
         asort($alternatives);
1011 1011
 
1012 1012
         return array_keys($alternatives);
Please login to merge, or discard this patch.
vendor/symfony/console/Formatter/OutputFormatter.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -194,7 +194,7 @@
 block discarded – undo
194 194
      *
195 195
      * @param string $string
196 196
      *
197
-     * @return OutputFormatterStyle|bool false if string is not format string
197
+     * @return OutputFormatterStyleInterface|null false if string is not format string
198 198
      */
199 199
     private function createStyleFromString($string)
200 200
     {
Please login to merge, or discard this patch.