@@ -46,7 +46,7 @@ |
||
| 46 | 46 | { |
| 47 | 47 | $this->buffer .= $data; |
| 48 | 48 | $this->stream->end( |
| 49 | - $this->processBuffer() . base64_decode($this->buffer, true) |
|
| 49 | + $this->processBuffer().base64_decode($this->buffer, true) |
|
| 50 | 50 | ); |
| 51 | 51 | $this->buffer = ''; |
| 52 | 52 | } |
@@ -25,11 +25,11 @@ |
||
| 25 | 25 | public function __construct(ReadableStreamInterface $stream) |
| 26 | 26 | { |
| 27 | 27 | $this->stream = $stream; |
| 28 | - $this->stream->on('data', function ($data) { |
|
| 28 | + $this->stream->on('data', function($data) { |
|
| 29 | 29 | $this->buffer .= $data; |
| 30 | 30 | $this->emit('data', [$this->processBuffer()]); |
| 31 | 31 | }); |
| 32 | - $this->stream->once('close', function () { |
|
| 32 | + $this->stream->once('close', function() { |
|
| 33 | 33 | $this->emit('data', [base64_encode($this->buffer)]); |
| 34 | 34 | $this->emit('close'); |
| 35 | 35 | }); |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | { |
| 47 | 47 | $this->buffer .= $data; |
| 48 | 48 | $this->stream->end( |
| 49 | - $this->processBuffer() . base64_encode($this->buffer) |
|
| 49 | + $this->processBuffer().base64_encode($this->buffer) |
|
| 50 | 50 | ); |
| 51 | 51 | $this->buffer = ''; |
| 52 | 52 | } |
@@ -25,11 +25,11 @@ |
||
| 25 | 25 | public function __construct(ReadableStreamInterface $stream) |
| 26 | 26 | { |
| 27 | 27 | $this->stream = $stream; |
| 28 | - $this->stream->on('data', function ($data) { |
|
| 28 | + $this->stream->on('data', function($data) { |
|
| 29 | 29 | $this->buffer .= $data; |
| 30 | 30 | $this->emit('data', [$this->processBuffer()]); |
| 31 | 31 | }); |
| 32 | - $this->stream->once('close', function () { |
|
| 32 | + $this->stream->once('close', function() { |
|
| 33 | 33 | $this->emit('data', [base64_decode($this->buffer, true)]); |
| 34 | 34 | $this->emit('close'); |
| 35 | 35 | }); |