src/Factorial/Factorial.php
/**
     * Calculate factorial of the given number.
     *
     * @param int $number Factorial calculation parameter
     *
     * @return mixed Result of calculations or recursive callback
     */
Calculate factorial of the given number.
@param int $number Factorial calculation parameter

@return mixed Result of calculations or recursive callback
Calculate factorial of the given number . @param int $number Factorial calculation parameter @return mixed Result of calculations or recursive callback
public function calculate($number)
    {
        $this->guardInteger($number);
        $this->guardNonNegative($number);
        return $number < 2 ? '1' : bcmul($number, $this->calculate(--$number));
    }
public function calculate ( $ number ) { $ this -> guardInteger ( $ number ) ; $ this -> guardNonNegative ( $ number ) ; return $ number < 2 ? '1' : bcmul ( $ number , $ this -> calculate ( -- $ number ) ) ; }
Calculate factorial of the given number.
Calculate factorial of the given number .