@@ -603,7 +603,7 @@ private function processStmtNode(
603
603
$ throwPoints = [];
604
604
$ impurePoints = [];
605
605
$ this ->processAttributeGroups ($ stmt , $ stmt ->attrGroups , $ scope , $ nodeCallback );
606
- [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes ] = $ this ->getPhpDocs ($ scope , $ stmt );
606
+ [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes, $ pureUnlessCallableIsImpureParameters ] = $ this ->getPhpDocs ($ scope , $ stmt );
607
607
608
608
foreach ($ stmt ->params as $ param ) {
609
609
$ this ->processParamNode ($ stmt , $ param , $ scope , $ nodeCallback );
@@ -5978,7 +5978,7 @@ private function processNodesForCalledMethod($node, string $fileName, MethodRefl
5978
5978
}
5979
5979
5980
5980
/**
5981
- * @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}
5981
+ * @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> }
5982
5982
*/
5983
5983
public function getPhpDocs (Scope $ scope , Node \FunctionLike |Node \Stmt \Property $ node ): array
5984
5984
{
@@ -6008,6 +6008,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6008
6008
$ resolvedPhpDoc = null ;
6009
6009
$ functionName = null ;
6010
6010
$ phpDocParameterOutTypes = [];
6011
+ $ phpDocPureUnlessCallableIsImpureParameters = [];
6011
6012
6012
6013
if ($ node instanceof Node \Stmt \ClassMethod) {
6013
6014
if (!$ scope ->isInClass ()) {
@@ -6130,9 +6131,10 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6130
6131
$ asserts = Assertions::createFromResolvedPhpDocBlock ($ resolvedPhpDoc );
6131
6132
$ selfOutType = $ resolvedPhpDoc ->getSelfOutTag () !== null ? $ resolvedPhpDoc ->getSelfOutTag ()->getType () : null ;
6132
6133
$ varTags = $ resolvedPhpDoc ->getVarTags ();
6134
+ $ phpDocPureUnlessCallableIsImpureParameters = $ resolvedPhpDoc ->getParamsPureUnlessCallableIsImpure ();
6133
6135
}
6134
6136
6135
- return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation ];
6137
+ return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation, $ phpDocPureUnlessCallableIsImpureParameters ];
6136
6138
}
6137
6139
6138
6140
private function transformStaticType (ClassReflection $ declaringClass , Type $ type ): Type
0 commit comments