@@ -65,6 +65,8 @@ class CallableType implements CompoundType, CallableParametersAcceptor
65
65
66
66
private TrinaryLogic $ isPure ;
67
67
68
+ private TrinaryLogic $ isDeprecated ;
69
+
68
70
/**
69
71
* @api
70
72
* @param list<ParameterReflection>|null $parameters
@@ -78,6 +80,7 @@ public function __construct(
78
80
?TemplateTypeMap $ resolvedTemplateTypeMap = null ,
79
81
private array $ templateTags = [],
80
82
?TrinaryLogic $ isPure = null ,
83
+ ?TrinaryLogic $ isDeprecated = null ,
81
84
)
82
85
{
83
86
$ this ->parameters = $ parameters ?? [];
@@ -86,6 +89,7 @@ public function __construct(
86
89
$ this ->templateTypeMap = $ templateTypeMap ?? TemplateTypeMap::createEmpty ();
87
90
$ this ->resolvedTemplateTypeMap = $ resolvedTemplateTypeMap ?? TemplateTypeMap::createEmpty ();
88
91
$ this ->isPure = $ isPure ?? TrinaryLogic::createMaybe ();
92
+ $ this ->isDeprecated = $ isDeprecated ?? TrinaryLogic::createNo ();
89
93
}
90
94
91
95
/**
@@ -101,6 +105,14 @@ public function isPure(): TrinaryLogic
101
105
return $ this ->isPure ;
102
106
}
103
107
108
+ public function isDeprecated (): TrinaryLogic
109
+ {
110
+ return $ this ->isDeprecated ;
111
+ }
112
+
113
+ /**
114
+ * @return string[]
115
+ */
104
116
public function getReferencedClasses (): array
105
117
{
106
118
$ classes = [];
@@ -231,6 +243,7 @@ function (): string {
231
243
$ this ->resolvedTemplateTypeMap ,
232
244
$ this ->templateTags ,
233
245
$ this ->isPure ,
246
+ $ this ->isDeprecated ,
234
247
);
235
248
236
249
return $ printer ->print ($ selfWithoutParameterNames ->toPhpDocNode ());
@@ -445,6 +458,7 @@ public function traverse(callable $cb): Type
445
458
$ this ->resolvedTemplateTypeMap ,
446
459
$ this ->templateTags ,
447
460
$ this ->isPure ,
461
+ $ this ->isDeprecated ,
448
462
);
449
463
}
450
464
@@ -495,6 +509,7 @@ public function traverseSimultaneously(Type $right, callable $cb): Type
495
509
$ this ->resolvedTemplateTypeMap ,
496
510
$ this ->templateTags ,
497
511
$ this ->isPure ,
512
+ $ this ->isDeprecated ,
498
513
);
499
514
}
500
515
0 commit comments