| Total Complexity | 4 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class MutableDecimal extends Decimal |
||
| 9 | {
|
||
| 10 | |||
| 11 | public function modulo($mod) |
||
| 16 | } |
||
| 17 | |||
| 18 | public function continuousModulo($mod) |
||
| 19 | {
|
||
| 20 | |||
| 21 | $mod = Numbers::makeOrDont(Numbers::IMMUTABLE, $mod, $this->precision+1); |
||
| 22 | $oldNum = Numbers::make(Numbers::IMMUTABLE, $this->getValue(), $this->precision+1); |
||
| 23 | |||
| 24 | $multiple = $oldNum->divide($mod)->floor(); |
||
| 25 | |||
| 26 | $remainder = $oldNum->subtract($mod->multiply($multiple)); |
||
| 27 | |||
| 28 | return Numbers::make(Numbers::MUTABLE, $remainder->truncate($this->precision)->getValue()); |
||
| 29 | |||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @param string $value |
||
| 34 | * |
||
| 35 | * @return MutableDecimal |
||
| 36 | */ |
||
| 37 | protected function setValue(string $value) |
||
| 42 | } |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @return bool |
||
| 46 | */ |
||
| 47 | public function isComplex(): bool |
||
| 50 | } |
||
| 51 | |||
| 52 | } |
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.