| Total Complexity | 5 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | final class SignedOctet implements Value |
||
| 18 | { |
||
| 19 | private static $definitionSet; |
||
| 20 | |||
| 21 | private $value; |
||
| 22 | private $original; |
||
| 23 | |||
| 24 | 10 | public function __construct(Integer $octet) |
|
| 25 | { |
||
| 26 | 10 | $this->original = $octet; |
|
| 27 | 10 | } |
|
| 28 | |||
| 29 | 6 | public static function fromStream(Readable $stream): Value |
|
| 30 | { |
||
| 31 | 6 | [, $value] = unpack('c', (string) $stream->read(1)); |
|
| 32 | |||
| 33 | 6 | return new self(new Integer($value)); |
|
| 34 | } |
||
| 35 | |||
| 36 | 7 | public function original(): Integer |
|
| 37 | { |
||
| 38 | 7 | return $this->original; |
|
| 39 | } |
||
| 40 | |||
| 41 | 11 | public function __toString(): string |
|
| 44 | } |
||
| 45 | |||
| 46 | 1 | public static function definitionSet(): Set |
|
| 51 | ); |
||
| 52 | } |
||
| 53 | } |
||
| 54 |