1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Reflection;
4:
5: use PHPStan\Type\Generic\TemplateTypeMap;
6: use PHPStan\Type\Generic\TemplateTypeVarianceMap;
7: use PHPStan\Type\Type;
8:
9: /**
10: * @api
11: */
12: class ExtendedFunctionVariant extends FunctionVariant implements ExtendedParametersAcceptor
13: {
14:
15: /**
16: * @param list<ExtendedParameterReflection> $parameters
17: * @api
18: */
19: public function __construct(
20: TemplateTypeMap $templateTypeMap,
21: ?TemplateTypeMap $resolvedTemplateTypeMap,
22: array $parameters,
23: bool $isVariadic,
24: Type $returnType,
25: private Type $phpDocReturnType,
26: private Type $nativeReturnType,
27: ?TemplateTypeVarianceMap $callSiteVarianceMap = null,
28: )
29: {
30: parent::__construct(
31: $templateTypeMap,
32: $resolvedTemplateTypeMap,
33: $parameters,
34: $isVariadic,
35: $returnType,
36: $callSiteVarianceMap,
37: );
38: }
39:
40: /**
41: * @return list<ExtendedParameterReflection>
42: */
43: public function getParameters(): array
44: {
45: /** @var list<ExtendedParameterReflection> $parameters */
46: $parameters = parent::getParameters();
47:
48: return $parameters;
49: }
50:
51: public function getPhpDocReturnType(): Type
52: {
53: return $this->phpDocReturnType;
54: }
55:
56: public function getNativeReturnType(): Type
57: {
58: return $this->nativeReturnType;
59: }
60:
61: }
62: