@@ -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 array<int, 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,11 @@ public function isPure(): TrinaryLogic
101105 return $ this ->isPure ;
102106 }
103107
108+ public function isDeprecated (): TrinaryLogic
109+ {
110+ return $ this ->isDeprecated ;
111+ }
112+
104113 /**
105114 * @return string[]
106115 */
@@ -254,6 +263,7 @@ function (): string {
254263 $ this ->resolvedTemplateTypeMap ,
255264 $ this ->templateTags ,
256265 $ this ->isPure ,
266+ $ this ->isDeprecated ,
257267 );
258268
259269 return $ printer ->print ($ selfWithoutParameterNames ->toPhpDocNode ());
@@ -468,6 +478,7 @@ public function traverse(callable $cb): Type
468478 $ this ->resolvedTemplateTypeMap ,
469479 $ this ->templateTags ,
470480 $ this ->isPure ,
481+ $ this ->isDeprecated ,
471482 );
472483 }
473484
@@ -518,6 +529,7 @@ public function traverseSimultaneously(Type $right, callable $cb): Type
518529 $ this ->resolvedTemplateTypeMap ,
519530 $ this ->templateTags ,
520531 $ this ->isPure ,
532+ $ this ->isDeprecated ,
521533 );
522534 }
523535
@@ -703,6 +715,7 @@ public static function __set_state(array $properties): Type
703715 $ properties ['resolvedTemplateTypeMap ' ],
704716 $ properties ['templateTags ' ],
705717 $ properties ['isPure ' ],
718+ $ properties ['isDeprecated ' ],
706719 );
707720 }
708721
0 commit comments