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


Check if the parameter is non - negative . @param int $number Factorial calculation parameter
private function guardNonNegative($number)
    {
        if ($number < 0) {
            throw new \InvalidArgumentException('Given number cannot be negative.');
        }
    }
private function guardNonNegative ( $ number ) { if ( $ number < 0 ) { throw new \ InvalidArgumentException ( 'Given number cannot be negative.' ) ; } }
Check if the parameter is non-negative.
Check if the parameter is non - negative .