Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
26 | 184 | public function __construct(WritableStreamInterface $stream, string $hash, int $options = 0, string $key = '') |
|
27 | { |
||
28 | 184 | $this->stream = $stream; |
|
29 | 184 | $this->context = hash_init($hash, $options, $key); |
|
30 | 184 | $this->stream->on('close', function () { |
|
31 | 184 | $this->emit('hash', [ |
|
32 | 184 | hash_final($this->context), |
|
33 | ]); |
||
34 | 184 | }); |
|
35 | 184 | } |
|
36 | |||
62 |