@@ -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 | }); |