Leafo\ScssPhp\Compiler::libRandom PHP Method

libRandom() protected method

protected libRandom ( $args )
    protected function libRandom($args)
    {
        if (isset($args[0])) {
            $n = $this->assertNumber($args[0]);
            if ($n < 1) {
                $this->throwError("limit must be greater than or equal to 1");
                return;
            }
            return new Node\Number(mt_rand(1, $n), '');
        }
        return new Node\Number(mt_rand(1, mt_getrandmax()), '');
    }
Compiler