@@ -875,7 +875,7 @@ public function processStmtNode(
875875 $ throwPoints = [];
876876 $ impurePoints = [];
877877 $ this ->processAttributeGroups ($ stmt , $ stmt ->attrGroups , $ scope , $ storage , $ nodeCallback );
878- [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , , , , $ pureUnlessCallableIsImpureParameters ] = $ this ->getPhpDocs ($ scope , $ stmt );
878+ [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , , , , $ pureUnlessCallableIsImpureParameters, $ pureUnlessParameterPassedParameters ] = $ this ->getPhpDocs ($ scope , $ stmt );
879879
880880 foreach ($ stmt ->params as $ param ) {
881881 $ this ->processParamNode ($ stmt , $ param , $ scope , $ storage , $ nodeCallback );
@@ -913,6 +913,7 @@ public function processStmtNode(
913913 $ isConstructor ,
914914 null ,
915915 $ pureUnlessCallableIsImpureParameters ,
916+ $ pureUnlessParameterPassedParameters ,
916917 );
917918
918919 if (!$ scope ->isInClass ()) {
@@ -4943,7 +4944,7 @@ private function processNodesForCalledMethod($node, ExpressionResultStorage $sto
49434944 }
49444945
49454946 /**
4946- * @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, ?ResolvedPhpDocBlock, array<string, bool>}
4947+ * @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, ?ResolvedPhpDocBlock, array<string, bool>, array<string, bool> }
49474948 */
49484949 public function getPhpDocs (Scope $ scope , Node \FunctionLike |Node \Stmt \Property $ node ): array
49494950 {
@@ -4974,6 +4975,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
49744975 $ functionName = null ;
49754976 $ phpDocParameterOutTypes = [];
49764977 $ phpDocPureUnlessCallableIsImpureParameters = [];
4978+ $ phpDocPureUnlessParameterPassedParameters = [];
49774979
49784980 if ($ node instanceof Node \Stmt \ClassMethod) {
49794981 if (!$ scope ->isInClass ()) {
@@ -5108,6 +5110,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
51085110 $ selfOutType = $ resolvedPhpDoc ->getSelfOutTag () !== null ? $ resolvedPhpDoc ->getSelfOutTag ()->getType () : null ;
51095111 $ varTags = $ resolvedPhpDoc ->getVarTags ();
51105112 $ phpDocPureUnlessCallableIsImpureParameters = $ resolvedPhpDoc ->getParamsPureUnlessCallableIsImpure ();
5113+ $ phpDocPureUnlessParameterPassedParameters = $ resolvedPhpDoc ->getParamsPureUnlessParameterPassed ();
51115114 }
51125115
51135116 if ($ acceptsNamedArguments && $ scope ->isInClass ()) {
@@ -5131,7 +5134,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
51315134 }
51325135 }
51335136
5134- return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation , $ resolvedPhpDoc , $ phpDocPureUnlessCallableIsImpureParameters ];
5137+ return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation , $ resolvedPhpDoc , $ phpDocPureUnlessCallableIsImpureParameters, $ phpDocPureUnlessParameterPassedParameters ];
51355138 }
51365139
51375140 private function transformStaticType (ClassReflection $ declaringClass , Type $ type ): Type
0 commit comments