| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2.0116 |
| Changes | 0 | ||
| 1 | <?php |
||
| 25 | 6 | public function __construct(Integer $value, Integer $scale) |
|
| 26 | { |
||
| 27 | 6 | if (!self::definitionSet()->contains($scale)) { |
|
| 28 | throw new OutOfRangeValue($scale, self::definitionSet()); |
||
| 29 | } |
||
| 30 | |||
| 31 | 6 | $this->value = (string) new UnsignedOctet($scale); |
|
| 32 | 6 | $this->value .= (string) new SignedLongInteger($value); |
|
| 33 | 6 | $this->original = $value->divideBy( |
|
| 34 | 6 | (new Integer(10))->power($scale) |
|
| 35 | ); |
||
| 73 |