PHPStan\Analyser\Scope::enterFunction PHP Method

enterFunction() public method

public enterFunction ( PHPStan\Reflection\ParametersAcceptor $functionReflection ) : self
$functionReflection PHPStan\Reflection\ParametersAcceptor
return self
    public function enterFunction(ParametersAcceptor $functionReflection) : self
    {
        $variableTypes = $this->getVariableTypes();
        foreach ($functionReflection->getParameters() as $parameter) {
            $variableTypes[$parameter->getName()] = $parameter->getType();
        }
        return new self($this->broker, $this->printer, $this->getFile(), $this->isDeclareStrictTypes(), $this->getClass(), $functionReflection, $this->getNamespace(), $variableTypes);
    }