| Total Complexity | 4 |
| Total Lines | 30 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class LongString implements Value |
||
| 12 | { |
||
| 13 | private $value; |
||
| 14 | private $original; |
||
| 15 | |||
| 16 | 62 | public function __construct(Str $string) |
|
| 24 | 62 | } |
|
| 25 | |||
| 26 | 56 | public static function fromStream(Readable $stream): Value |
|
| 27 | { |
||
| 28 | 56 | $length = UnsignedLongInteger::fromStream($stream)->original(); |
|
| 29 | |||
| 30 | 56 | return new self($stream->read($length->value())); |
|
|
1 ignored issue
–
show
|
|||
| 31 | } |
||
| 32 | |||
| 33 | 8 | public function original(): Str |
|
| 34 | { |
||
| 35 | 8 | return $this->original; |
|
| 36 | } |
||
| 37 | |||
| 38 | 64 | public function __toString(): string |
|
| 41 | } |
||
| 42 | } |
||
| 43 |