Total Complexity | 5 |
Total Lines | 34 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
14 | final class UnsignedLongInteger implements Value |
||
15 | { |
||
16 | private static $definitionSet; |
||
17 | |||
18 | private $value; |
||
19 | private $original; |
||
20 | |||
21 | 130 | public function __construct(Integer $value) |
|
22 | { |
||
23 | 130 | $this->original = $value; |
|
24 | 130 | } |
|
25 | |||
26 | 76 | public static function fromStream(Readable $stream): Value |
|
27 | { |
||
28 | 76 | [, $value] = unpack('N', (string) $stream->read(4)); |
|
29 | |||
30 | 76 | return new self(new Integer($value)); |
|
31 | } |
||
32 | |||
33 | 68 | public function original(): Integer |
|
34 | { |
||
35 | 68 | return $this->original; |
|
36 | } |
||
37 | |||
38 | 129 | public function __toString(): string |
|
41 | } |
||
42 | |||
43 | 1 | public static function definitionSet(): Set |
|
48 | ); |
||
49 | } |
||
50 | } |
||
51 |