Style fixes.
parent
1d949b9282
commit
55913eba79
|
@ -57,7 +57,8 @@ class ProtocolStreamWriter implements ProtocolWriter
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
public function writeData() {
|
||||
public function writeData()
|
||||
{
|
||||
$message = $this->messages[0]['message'];
|
||||
$promise = $this->messages[0]['promise'];
|
||||
|
||||
|
@ -72,8 +73,7 @@ class ProtocolStreamWriter implements ProtocolWriter
|
|||
} else {
|
||||
throw new RuntimeException('Could not write message');
|
||||
}
|
||||
}
|
||||
else if ($bytesWritten > 0) {
|
||||
} else if ($bytesWritten > 0) {
|
||||
$message = substr($message, $bytesWritten);
|
||||
}
|
||||
|
||||
|
@ -87,8 +87,7 @@ class ProtocolStreamWriter implements ProtocolWriter
|
|||
}
|
||||
|
||||
$promise->fulfill();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$this->messages[0]['message'] = $message;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,9 +23,9 @@ class ProtocolStreamWriterTest extends TestCase
|
|||
$msgString = (string)$msg;
|
||||
|
||||
$promise = $writer->write($msg);
|
||||
$promise->then(function() {
|
||||
$promise->then(function () {
|
||||
Loop\stop();
|
||||
}, function() {
|
||||
}, function () {
|
||||
Loop\stop();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue