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