Phan\Language\Context::withScopeVariable PHP Method

withScopeVariable() public method

public withScopeVariable ( Variable $variable ) : Context
$variable Phan\Language\Element\Variable A variable to add to the scope for the new context
return Context A new context based on this with a variable as defined by the parameters in scope
    public function withScopeVariable(Variable $variable) : Context
    {
        return $this->withScope($this->getScope()->withVariable($variable));
    }