Total Complexity | 7 |
Total Lines | 54 |
Duplicated Lines | 0 % |
Coverage | 80.95% |
Changes | 0 |
1 | <?php |
||
9 | class MutableDecimal extends Decimal |
||
10 | { |
||
11 | |||
12 | 1 | public function continuousModulo($mod): DecimalInterface |
|
13 | { |
||
14 | |||
15 | 1 | $mod = Numbers::makeOrDont(Numbers::IMMUTABLE, $mod, $this->precision+1); |
|
16 | 1 | $oldNum = Numbers::make(Numbers::IMMUTABLE, $this->getValue(), $this->precision+1); |
|
17 | |||
18 | 1 | $multiple = $oldNum->divide($mod)->floor(); |
|
19 | |||
20 | 1 | $remainder = $oldNum->subtract($mod->multiply($multiple)); |
|
21 | |||
22 | 1 | return Numbers::make(Numbers::MUTABLE, $remainder->truncate($this->precision)->getValue()); |
|
23 | |||
24 | } |
||
25 | |||
26 | /** |
||
27 | * @param string $value |
||
28 | * |
||
29 | * @return MutableDecimal |
||
30 | */ |
||
31 | 10 | protected function setValue(string $value, int $precision = null, int $base = 10) |
|
55 | } |
||
56 | |||
57 | /** |
||
58 | * @return bool |
||
59 | */ |
||
60 | 5 | public function isComplex(): bool |
|
65 | } |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.