Test Setup Failed
Pull Request — master (#3)
by Sebastien
03:11
created
src/Request.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
     public function withAddedRecipients(array $recipients) 
28 28
     {
29 29
         $new = clone $this;
30
-        foreach($recipients as $email => $name) {
30
+        foreach ($recipients as $email => $name) {
31 31
             $this->validateEmail($email);
32 32
             $new->recipients[$email] = $name;
33 33
         }
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
     public function withRecipients(array $recipients) {
47 47
         $new = clone $this;
48 48
         $new->recipients = [];
49
-        foreach($recipients as $email => $name) {
49
+        foreach ($recipients as $email => $name) {
50 50
             $this->validateEmail($email);
51 51
             $new->recipients[$email] = $name;
52 52
         }
Please login to merge, or discard this patch.
src/Connection.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
 use React\Socket\ConnectionInterface;
9 9
 use React\Stream\WritableStream;
10 10
 
11
-class Connection extends \React\Socket\Connection{
11
+class Connection extends \React\Socket\Connection {
12 12
     const STATUS_NEW = 0;
13 13
     const STATUS_INIT = 1;
14 14
     const STATUS_FROM = 2;
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $this->reset(self::STATUS_NEW);
100 100
         $this->on('line', [$this, 'handleCommand']);
101 101
         if ($this->bannerDelay > 0) {
102
-            $loop->addTimer($this->bannerDelay, function () use ($disconnect) {
102
+            $loop->addTimer($this->bannerDelay, function() use ($disconnect) {
103 103
                 $this->sendReply(220, $this->banner);
104 104
                 $this->removeListener('data', $disconnect);
105 105
             });
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         // Socket is raw, not using fread as it's interceptable by filters
119 119
         // See issues #192, #209, and #240
120
-        $data = stream_socket_recvfrom($stream, $this->bufferSize);;
120
+        $data = stream_socket_recvfrom($stream, $this->bufferSize); ;
121 121
 
122 122
         $limit = $this->state == self::STATUS_DATA ? 1000 : 512;
123 123
         if ('' !== $data && false !== $data) {
@@ -128,7 +128,7 @@  discard block
 block discarded – undo
128 128
             }
129 129
 
130 130
             $delimiter = "\r\n";
131
-            while(false !== $pos = strpos($this->lineBuffer, $delimiter)) {
131
+            while (false !== $pos = strpos($this->lineBuffer, $delimiter)) {
132 132
                 $line = substr($this->lineBuffer, 0, $pos);
133 133
                 $this->lineBuffer = substr($this->lineBuffer, $pos + strlen($delimiter));
134 134
                 $this->emit('line', [$line, $this]);
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
     protected function handleCommand($line)
160 160
     {
161
-        if ($line !=='') {
161
+        if ($line !== '') {
162 162
             $command = $this->parseCommand($line);
163 163
             if ($command == null) {
164 164
                 $this->sendReply(500, "Unexpected or unknown command.");
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
         $out = '';
178 178
         if (is_array($message)) {
179 179
             $last = array_pop($message);
180
-            foreach($message as $line) {
180
+            foreach ($message as $line) {
181 181
                 $out .= "$code-$line\r\n";
182 182
             }
183 183
             $this->write($out);
Please login to merge, or discard this patch.
src/MessageTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     {
28 28
         $result = [];
29 29
         $header = strtolower($header);
30
-        foreach($this->headers as list($name, $value)) {
30
+        foreach ($this->headers as list($name, $value)) {
31 31
             if ($header == strtolower($name)) {
32 32
                 $result[] = [$name, $value];
33 33
             }
Please login to merge, or discard this patch.