Total Complexity | 4 |
Total Lines | 25 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
12 | final class SignedLongLongInteger implements Value |
||
13 | { |
||
14 | private $value; |
||
15 | private $original; |
||
16 | |||
17 | 13 | public function __construct(Integer $value) |
|
18 | { |
||
19 | 13 | $this->original = $value; |
|
20 | 13 | } |
|
21 | |||
22 | 6 | public static function fromStream(Readable $stream): Value |
|
23 | { |
||
24 | 6 | [, $value] = unpack('q', (string) $stream->read(8)); |
|
25 | |||
26 | 6 | return new self(new Integer($value)); |
|
27 | } |
||
28 | |||
29 | 12 | public function original(): Integer |
|
32 | } |
||
33 | |||
34 | 12 | public function __toString(): string |
|
39 |