diff --git a/src/Analyser/NodeScopeResolver.php b/src/Analyser/NodeScopeResolver.php index bdc1d3b181..2c4d7d597c 100644 --- a/src/Analyser/NodeScopeResolver.php +++ b/src/Analyser/NodeScopeResolver.php @@ -716,13 +716,14 @@ private function processStmtNode( $hasYield = false; $throwPoints = []; $impurePoints = []; - $this->processAttributeGroups($stmt, $stmt->attrGroups, $scope, $storage, $nodeCallback); [$templateTypeMap, $phpDocParameterTypes, $phpDocImmediatelyInvokedCallableParameters, $phpDocClosureThisTypeParameters, $phpDocReturnType, $phpDocThrowType, $deprecatedDescription, $isDeprecated, $isInternal, $isFinal, $isPure, $acceptsNamedArguments, $isReadOnly, $phpDocComment, $asserts, $selfOutType, $phpDocParameterOutTypes] = $this->getPhpDocs($scope, $stmt); foreach ($stmt->params as $param) { $this->processParamNode($stmt, $param, $scope, $storage, $nodeCallback); } + $this->processAttributeGroups($stmt, $stmt->attrGroups, $scope, $storage, $nodeCallback); + if ($stmt->returnType !== null) { $this->callNodeCallback($nodeCallback, $stmt->returnType, $scope, $storage); }