@@ -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 | |
@@ -27,11 +27,11 @@ discard block |
||
| 27 | 27 | { |
| 28 | 28 | $this->stream = $stream; |
| 29 | 29 | $this->context = hash_init($hash, $options, $key); |
| 30 | - $this->stream->on('data', function ($data) { |
|
| 30 | + $this->stream->on('data', function($data) { |
|
| 31 | 31 | hash_update($this->context, $data); |
| 32 | 32 | $this->emit('data', [$data]); |
| 33 | 33 | }); |
| 34 | - $this->stream->once('close', function () { |
|
| 34 | + $this->stream->once('close', function() { |
|
| 35 | 35 | $this->emit('close'); |
| 36 | 36 | $this->emit('hash', [ |
| 37 | 37 | hash_final($this->context), |
@@ -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 | |
@@ -25,7 +25,7 @@ discard block |
||
| 25 | 25 | { |
| 26 | 26 | $this->stream = $stream; |
| 27 | 27 | $this->context = hash_init($hash, $options, $key); |
| 28 | - $this->stream->once('close', function () { |
|
| 28 | + $this->stream->once('close', function() { |
|
| 29 | 29 | $this->emit('hash', [ |
| 30 | 30 | hash_final($this->context), |
| 31 | 31 | ]); |