| Total Complexity | 6 |
| Total Lines | 41 |
| Duplicated Lines | 0 % |
| Coverage | 94.44% |
| Changes | 0 | ||
| 1 | <?php |
||
| 18 | final class Decimal implements Value |
||
| 19 | { |
||
| 20 | private static $definitionSet; |
||
| 21 | |||
| 22 | private $value; |
||
| 23 | private $original; |
||
| 24 | |||
| 25 | 6 | public function __construct(Integer $value, Integer $scale) |
|
| 35 | ); |
||
| 36 | 6 | } |
|
| 37 | |||
| 38 | 3 | public static function fromStream(Readable $stream): Value |
|
| 39 | { |
||
| 40 | 3 | $scale = UnsignedOctet::fromStream($stream)->original(); |
|
| 41 | 3 | $value = SignedLongInteger::fromStream($stream)->original(); |
|
| 42 | |||
| 43 | 3 | return new self($value, $scale); |
|
| 44 | } |
||
| 45 | |||
| 46 | 5 | public function original(): Number |
|
| 47 | { |
||
| 48 | 5 | return $this->original; |
|
| 49 | } |
||
| 50 | |||
| 51 | 5 | public function __toString(): string |
|
| 54 | } |
||
| 55 | |||
| 56 | 6 | public static function definitionSet(): Set |
|
| 59 | } |
||
| 60 | } |
||
| 61 |