@@ -65,6 +65,8 @@ class CallableType implements CompoundType, CallableParametersAcceptor
6565
6666 private TrinaryLogic $ isPure ;
6767
68+ private TrinaryLogic $ isDeprecated ;
69+
6870 /**
6971 * @api
7072 * @param list<ParameterReflection>|null $parameters
@@ -78,6 +80,7 @@ public function __construct(
7880 ?TemplateTypeMap $ resolvedTemplateTypeMap = null ,
7981 private array $ templateTags = [],
8082 ?TrinaryLogic $ isPure = null ,
83+ ?TrinaryLogic $ isDeprecated = null ,
8184 )
8285 {
8386 $ this ->parameters = $ parameters ?? [];
@@ -86,6 +89,7 @@ public function __construct(
8689 $ this ->templateTypeMap = $ templateTypeMap ?? TemplateTypeMap::createEmpty ();
8790 $ this ->resolvedTemplateTypeMap = $ resolvedTemplateTypeMap ?? TemplateTypeMap::createEmpty ();
8891 $ this ->isPure = $ isPure ?? TrinaryLogic::createMaybe ();
92+ $ this ->isDeprecated = $ isDeprecated ?? TrinaryLogic::createNo ();
8993 }
9094
9195 /**
@@ -101,6 +105,14 @@ public function isPure(): TrinaryLogic
101105 return $ this ->isPure ;
102106 }
103107
108+ public function isDeprecated (): TrinaryLogic
109+ {
110+ return $ this ->isDeprecated ;
111+ }
112+
113+ /**
114+ * @return string[]
115+ */
104116 public function getReferencedClasses (): array
105117 {
106118 $ classes = [];
@@ -231,6 +243,7 @@ function (): string {
231243 $ this ->resolvedTemplateTypeMap ,
232244 $ this ->templateTags ,
233245 $ this ->isPure ,
246+ $ this ->isDeprecated ,
234247 );
235248
236249 return $ printer ->print ($ selfWithoutParameterNames ->toPhpDocNode ());
@@ -445,6 +458,7 @@ public function traverse(callable $cb): Type
445458 $ this ->resolvedTemplateTypeMap ,
446459 $ this ->templateTags ,
447460 $ this ->isPure ,
461+ $ this ->isDeprecated ,
448462 );
449463 }
450464
@@ -495,6 +509,7 @@ public function traverseSimultaneously(Type $right, callable $cb): Type
495509 $ this ->resolvedTemplateTypeMap ,
496510 $ this ->templateTags ,
497511 $ this ->isPure ,
512+ $ this ->isDeprecated ,
498513 );
499514 }
500515
0 commit comments