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