@@ -651,7 +651,7 @@ private function processStmtNode(
651
651
$ throwPoints = [];
652
652
$ impurePoints = [];
653
653
$ 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 );
655
655
656
656
foreach ($ stmt ->params as $ param ) {
657
657
$ this ->processParamNode ($ stmt , $ param , $ scope , $ nodeCallback );
@@ -6664,7 +6664,7 @@ private function processNodesForCalledMethod($node, string $fileName, MethodRefl
6664
6664
}
6665
6665
6666
6666
/**
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> }
6668
6668
*/
6669
6669
public function getPhpDocs (Scope $ scope , Node \FunctionLike |Node \Stmt \Property $ node ): array
6670
6670
{
@@ -6694,6 +6694,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6694
6694
$ resolvedPhpDoc = null ;
6695
6695
$ functionName = null ;
6696
6696
$ phpDocParameterOutTypes = [];
6697
+ $ phpDocPureUnlessCallableIsImpureParameters = [];
6697
6698
6698
6699
if ($ node instanceof Node \Stmt \ClassMethod) {
6699
6700
if (!$ scope ->isInClass ()) {
@@ -6821,9 +6822,10 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6821
6822
$ asserts = Assertions::createFromResolvedPhpDocBlock ($ resolvedPhpDoc );
6822
6823
$ selfOutType = $ resolvedPhpDoc ->getSelfOutTag () !== null ? $ resolvedPhpDoc ->getSelfOutTag ()->getType () : null ;
6823
6824
$ varTags = $ resolvedPhpDoc ->getVarTags ();
6825
+ $ phpDocPureUnlessCallableIsImpureParameters = $ resolvedPhpDoc ->getParamsPureUnlessCallableIsImpure ();
6824
6826
}
6825
6827
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 ];
6827
6829
}
6828
6830
6829
6831
private function transformStaticType (ClassReflection $ declaringClass , Type $ type ): Type
0 commit comments