public function modulus($modulus)
    {
        if (!is_numeric($modulus)) {
            throw new \InvalidArgumentException('Modulus must be numeric');
        }

        $amount = bcmod($this->amount, strval($modulus));

        return self::valueOf($amount, $this->currency);
    }
public function modulus($modulus)
    {
        if (!is_numeric($modulus)) {
            throw new \InvalidArgumentException('Modulus must be numeric');
        }

        $amount = bcmod($this->amount, strval($modulus));

        return self::valueOf($amount, $this->currency);
    }
public function modulus ( $ modulus ) { if ( ! is_numeric ( $ modulus ) ) { throw new \ InvalidArgumentException ( 'Modulus must be numeric' ) ; } $ amount = bcmod ( $ this -> amount , strval ( $ modulus ) ) ; return self :: valueOf ( $ amount , $ this -> currency ) ; }
Calculates the modulus of this money.

@param mixed $modulus the modulus to apply

@return Money

@throws \InvalidArgumentException if the $modulus is not numeric
Calculates the modulus of this money .