PHPStan\Analyser\NodeScopeResolver::enterClassMethod PHP Method

enterClassMethod() private method

private enterClassMethod ( Scope $scope, ClassMethod $classMethod ) : Scope
$scope Scope
$classMethod PhpParser\Node\Stmt\ClassMethod
return Scope
    private function enterClassMethod(Scope $scope, Node\Stmt\ClassMethod $classMethod) : Scope
    {
        $fileTypeMap = $this->fileTypeMapper->getTypeMap($scope->getFile());
        $phpDocParameterTypes = [];
        $phpDocReturnType = null;
        if ($classMethod->getDocComment() !== null) {
            $docComment = $classMethod->getDocComment()->getText();
            $phpDocParameterTypes = TypehintHelper::getPhpDocParameterTypesFromMethod($fileTypeMap, array_map(function (Param $parameter) : string {
                return $parameter->name;
            }, $classMethod->params), $docComment);
            $phpDocReturnType = TypehintHelper::getPhpDocReturnTypeFromMethod($fileTypeMap, $docComment);
        }
        return $scope->enterClassMethod($classMethod, $phpDocParameterTypes, $phpDocReturnType);
    }