src/Number/Rational.php
public function multiply($r): Rational
    {
        if (is_int($r)) {
            return $this->multiplyInt($r);
        } elseif ($r instanceof Rational) {
            return $this->multiplyRational($r);
        } else {
            throw new Exception\IncorrectTypeException('Argument must be an integer or RationalNumber');
        }
    }
public function multiply($r): Rational
    {
        if (is_int($r)) {
            return $this->multiplyInt($r);
        } elseif ($r instanceof Rational) {
            return $this->multiplyRational($r);
        } else {
            throw new Exception\IncorrectTypeException('Argument must be an integer or RationalNumber');
        }
    }
public function multiply ( $ r ) : Rational { if ( is_int ( $ r ) ) { return $ this -> multiplyInt ( $ r ) ; } elseif ( $ r instanceof Rational ) { return $ this -> multiplyRational ( $ r ) ; } else { throw new Exception \ IncorrectTypeException ( 'Argument must be an integer or RationalNumber' ) ; } }
Multiply
Return the result of multiplying two rational numbers, or a rational number and an integer.

@param Rational|int $r

@return Rational

@throws Exception\IncorrectTypeException if the argument is not numeric or Rational.
Multiply Return the result of multiplying two rational numbers or a rational number and an integer .