@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace WyriHaximus\React\Stream\Base64; |
| 4 | 4 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $this->buffer .= $data; |
| 46 | 46 | $this->stream->end( |
| 47 | - $this->processBuffer() . base64_encode($this->buffer) |
|
| 47 | + $this->processBuffer().base64_encode($this->buffer) |
|
| 48 | 48 | ); |
| 49 | 49 | $this->buffer = ''; |
| 50 | 50 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace WyriHaximus\React\Stream\Base64; |
| 4 | 4 | |
@@ -25,11 +25,11 @@ discard block |
||
| 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 | }); |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace WyriHaximus\React\Stream\Base64; |
| 4 | 4 | |
@@ -25,11 +25,11 @@ discard block |
||
| 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 | }); |
@@ -1,4 +1,4 @@ discard block |
||
| 1 | -<?php declare(strict_types=1); |
|
| 1 | +<?php declare(strict_types = 1); |
|
| 2 | 2 | |
| 3 | 3 | namespace WyriHaximus\React\Stream\Base64; |
| 4 | 4 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | { |
| 45 | 45 | $this->buffer .= $data; |
| 46 | 46 | $this->stream->end( |
| 47 | - $this->processBuffer() . base64_decode($this->buffer, true) |
|
| 47 | + $this->processBuffer().base64_decode($this->buffer, true) |
|
| 48 | 48 | ); |
| 49 | 49 | $this->buffer = ''; |
| 50 | 50 | } |