| Conditions | 1 |
| Paths | 1 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 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 | |||
| 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.