@@ -651,7 +651,7 @@ private function processStmtNode(
651651 $ throwPoints = [];
652652 $ impurePoints = [];
653653 $ this ->processAttributeGroups ($ stmt , $ stmt ->attrGroups , $ scope , $ nodeCallback );
654- [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes ] = $ this ->getPhpDocs ($ scope , $ stmt );
654+ [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes, $ pureUnlessCallableIsImpureParameters ] = $ this ->getPhpDocs ($ scope , $ stmt );
655655
656656 foreach ($ stmt ->params as $ param ) {
657657 $ this ->processParamNode ($ stmt , $ param , $ scope , $ nodeCallback );
@@ -6664,7 +6664,7 @@ private function processNodesForCalledMethod($node, string $fileName, MethodRefl
66646664 }
66656665
66666666 /**
6667- * @return array{TemplateTypeMap, array<string, Type>, array<string, bool>, array<string, Type>, ?Type, ?Type, ?string, bool, bool, bool, bool|null, bool, bool, string|null, Assertions, ?Type, array<string, Type>, array<(string|int), VarTag>, bool}
6667+ * @return array{TemplateTypeMap, array<string, Type>, array<string, bool>, array<string, Type>, ?Type, ?Type, ?string, bool, bool, bool, bool|null, bool, bool, string|null, Assertions, ?Type, array<string, Type>, array<(string|int), VarTag>, bool, array<string, bool> }
66686668 */
66696669 public function getPhpDocs (Scope $ scope , Node \FunctionLike |Node \Stmt \Property $ node ): array
66706670 {
@@ -6694,6 +6694,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
66946694 $ resolvedPhpDoc = null ;
66956695 $ functionName = null ;
66966696 $ phpDocParameterOutTypes = [];
6697+ $ phpDocPureUnlessCallableIsImpureParameters = [];
66976698
66986699 if ($ node instanceof Node \Stmt \ClassMethod) {
66996700 if (!$ scope ->isInClass ()) {
@@ -6821,9 +6822,10 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
68216822 $ asserts = Assertions::createFromResolvedPhpDocBlock ($ resolvedPhpDoc );
68226823 $ selfOutType = $ resolvedPhpDoc ->getSelfOutTag () !== null ? $ resolvedPhpDoc ->getSelfOutTag ()->getType () : null ;
68236824 $ varTags = $ resolvedPhpDoc ->getVarTags ();
6825+ $ phpDocPureUnlessCallableIsImpureParameters = $ resolvedPhpDoc ->getParamsPureUnlessCallableIsImpure ();
68246826 }
68256827
6826- return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation ];
6828+ return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation, $ phpDocPureUnlessCallableIsImpureParameters ];
68276829 }
68286830
68296831 private function transformStaticType (ClassReflection $ declaringClass , Type $ type ): Type
0 commit comments