@@ -599,7 +599,7 @@ private function processStmtNode(
599
599
$ throwPoints = [];
600
600
$ impurePoints = [];
601
601
$ this ->processAttributeGroups ($ stmt , $ stmt ->attrGroups , $ scope , $ nodeCallback );
602
- [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes ] = $ this ->getPhpDocs ($ scope , $ stmt );
602
+ [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , , $ phpDocComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes, $ pureUnlessCallableIsImpureParameters ] = $ this ->getPhpDocs ($ scope , $ stmt );
603
603
604
604
foreach ($ stmt ->params as $ param ) {
605
605
$ this ->processParamNode ($ stmt , $ param , $ scope , $ nodeCallback );
@@ -6000,7 +6000,7 @@ private function processNodesForCalledMethod($node, string $fileName, MethodRefl
6000
6000
}
6001
6001
6002
6002
/**
6003
- * @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}
6003
+ * @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> }
6004
6004
*/
6005
6005
public function getPhpDocs (Scope $ scope , Node \FunctionLike |Node \Stmt \Property $ node ): array
6006
6006
{
@@ -6030,6 +6030,7 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6030
6030
$ resolvedPhpDoc = null ;
6031
6031
$ functionName = null ;
6032
6032
$ phpDocParameterOutTypes = [];
6033
+ $ phpDocPureUnlessCallableIsImpureParameters = [];
6033
6034
6034
6035
if ($ node instanceof Node \Stmt \ClassMethod) {
6035
6036
if (!$ scope ->isInClass ()) {
@@ -6152,9 +6153,10 @@ public function getPhpDocs(Scope $scope, Node\FunctionLike|Node\Stmt\Property $n
6152
6153
$ asserts = Assertions::createFromResolvedPhpDocBlock ($ resolvedPhpDoc );
6153
6154
$ selfOutType = $ resolvedPhpDoc ->getSelfOutTag () !== null ? $ resolvedPhpDoc ->getSelfOutTag ()->getType () : null ;
6154
6155
$ varTags = $ resolvedPhpDoc ->getVarTags ();
6156
+ $ phpDocPureUnlessCallableIsImpureParameters = $ resolvedPhpDoc ->getParamsPureUnlessCallableIsImpure ();
6155
6157
}
6156
6158
6157
- return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation ];
6159
+ return [$ templateTypeMap , $ phpDocParameterTypes , $ phpDocImmediatelyInvokedCallableParameters , $ phpDocClosureThisTypeParameters , $ phpDocReturnType , $ phpDocThrowType , $ deprecatedDescription , $ isDeprecated , $ isInternal , $ isFinal , $ isPure , $ acceptsNamedArguments , $ isReadOnly , $ docComment , $ asserts , $ selfOutType , $ phpDocParameterOutTypes , $ varTags , $ isAllowedPrivateMutation, $ phpDocPureUnlessCallableIsImpureParameters ];
6158
6160
}
6159
6161
6160
6162
private function transformStaticType (ClassReflection $ declaringClass , Type $ type ): Type
0 commit comments