Leafo\ScssPhp\Compiler::fncall PHP Method

fncall() private method

Function caller
private fncall ( string $name, array $argValues ) : array | null
$name string
$argValues array
return array | null
    private function fncall($name, $argValues)
    {
        // SCSS @function
        if ($this->callScssFunction($name, $argValues, $returnValue)) {
            return $returnValue;
        }
        // native PHP functions
        if ($this->callNativeFunction($name, $argValues, $returnValue)) {
            return $returnValue;
        }
        // for CSS functions, simply flatten the arguments into a list
        $listArgs = [];
        foreach ((array) $argValues as $arg) {
            if (empty($arg[0])) {
                $listArgs[] = $this->reduce($arg[1]);
            }
        }
        return [Type::T_FUNCTION, $name, [Type::T_LIST, ',', $listArgs]];
    }
Compiler