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