public function divide($number)
    {
        self::mustBeNumeric($number, 'Value to divide');
        
        $number = is_object($number) ? $number->value : $number;
        
        if ($number == 0) {
            throw new \InvalidArgumentException('You cannot divide by zero!');
        }

        return new self($this->value / $number);
    }
public function divide($number)
    {
        self::mustBeNumeric($number, 'Value to divide');
        
        $number = is_object($number) ? $number->value : $number;
        
        if ($number == 0) {
            throw new \InvalidArgumentException('You cannot divide by zero!');
        }

        return new self($this->value / $number);
    }
public function divide ( $ number ) { self :: mustBeNumeric ( $ number , 'Value to divide' ) ; $ number = is_object ( $ number ) ? $ number -> value : $ number ; if ( $ number == 0 ) { throw new \ InvalidArgumentException ( 'You cannot divide by zero!' ) ; } return new self ( $ this -> value / $ number ) ; }
Divide current number with given argument.

@throw \InvalidArgumentException If given argument is zero
@throw \InvalidArgumentException If given argument is not N or numeric value.
@param  mixed $number N or numeric value
@return N
Divide current number with given argument .