src/Factorial/Factorial.php
/**
     * Check if the parameter is integer.
     *
     * @param int $number Factorial calculation parameter
     *
     * @throws \InvalidArgumentException
     */
Check if the parameter is integer.
@param int $number Factorial calculation parameter


Check if the parameter is integer . @param int $number Factorial calculation parameter
private function guardInteger($number)
    {
        if (!is_int($number)) {
            throw new \InvalidArgumentException('Given number must be an integer.');
        }
    }
private function guardInteger ( $ number ) { if ( ! is_int ( $ number ) ) { throw new \ InvalidArgumentException ( 'Given number must be an integer.' ) ; } }
Check if the parameter is integer.
Check if the parameter is integer .