@@ -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\Hash; |
4 | 4 | |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | { |
28 | 28 | $this->stream = $stream; |
29 | 29 | $this->context = hash_init($hash, $options, $key); |
30 | - $this->stream->on('close', function () { |
|
30 | + $this->stream->on('close', function() { |
|
31 | 31 | $this->emit('hash', [ |
32 | 32 | hash_final($this->context), |
33 | 33 | ]); |
@@ -23,7 +23,7 @@ |
||
23 | 23 | |
24 | 24 | /** |
25 | 25 | * WritableStreamHash constructor. |
26 | - * @param WritableStreamInterface $stream |
|
26 | + * @param ReadableStreamInterface $stream |
|
27 | 27 | */ |
28 | 28 | public function __construct(ReadableStreamInterface $stream, string $hash, int $options = 0, string $key = '') |
29 | 29 | { |
@@ -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\Hash; |
4 | 4 | |
@@ -29,11 +29,11 @@ discard block |
||
29 | 29 | { |
30 | 30 | $this->stream = $stream; |
31 | 31 | $this->context = hash_init($hash, $options, $key); |
32 | - $this->stream->on('data', function ($data) { |
|
32 | + $this->stream->on('data', function($data) { |
|
33 | 33 | $this->emit('data', [$data]); |
34 | 34 | hash_update($this->context, $data); |
35 | 35 | }); |
36 | - $this->stream->on('close', function () { |
|
36 | + $this->stream->on('close', function() { |
|
37 | 37 | $this->emit('close'); |
38 | 38 | $this->emit('hash', [ |
39 | 39 | hash_final($this->context), |