lithium\tests\integration\test\FilterTest::_factorial PHP Method

_factorial() protected method

protected _factorial ( $int )
    protected function _factorial($int)
    {
        if (!$int) {
            return 1;
        }
        $f = $int;
        while ($int > 1) {
            $f *= --$int;
        }
        return $f;
    }