src/Compiler.php
protected function setExisting($name, $value, Environment $env, $valueUnreduced = null)
    {
        $storeEnv = $env;

        $hasNamespace = $name[0] === '^' || $name[0] === '@' || $name[0] === '%';

        for (;;) {
            if (array_key_exists($name, $env->store)) {
                break;
            }

            if (! $hasNamespace && isset($env->marker)) {
                $env = $storeEnv;
                break;
            }

            if (! isset($env->parent)) {
                $env = $storeEnv;
                break;
            }

            $env = $env->parent;
        }

        $env->store[$name] = $value;

        if ($valueUnreduced) {
            $env->storeUnreduced[$name] = $valueUnreduced;
        }
    }
protected function setExisting($name, $value, Environment $env, $valueUnreduced = null)
    {
        $storeEnv = $env;

        $hasNamespace = $name[0] === '^' || $name[0] === '@' || $name[0] === '%';

        for (;;) {
            if (array_key_exists($name, $env->store)) {
                break;
            }

            if (! $hasNamespace && isset($env->marker)) {
                $env = $storeEnv;
                break;
            }

            if (! isset($env->parent)) {
                $env = $storeEnv;
                break;
            }

            $env = $env->parent;
        }

        $env->store[$name] = $value;

        if ($valueUnreduced) {
            $env->storeUnreduced[$name] = $valueUnreduced;
        }
    }
protected function setExisting ( $ name , $ value , Environment $ env , $ valueUnreduced = null ) { $ storeEnv = $ env ; $ hasNamespace = $ name [ 0 ] === '^' || $ name [ 0 ] === '@' || $ name [ 0 ] === '%' ; for ( ; ; ) { if ( array_key_exists ( $ name , $ env -> store ) ) { break ; } if ( ! $ hasNamespace && isset ( $ env -> marker ) ) { $ env = $ storeEnv ; break ; } if ( ! isset ( $ env -> parent ) ) { $ env = $ storeEnv ; break ; } $ env = $ env -> parent ; } $ env -> store [ $ name ] = $ value ; if ( $ valueUnreduced ) { $ env -> storeUnreduced [ $ name ] = $ valueUnreduced ; } }
Set existing variable

@param string                              $name
@param mixed                               $value
@param \Leafo\ScssPhp\Compiler\Environment $env
@param mixed                               $valueUnreduced
Set existing variable