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: | class FunctionVariantWithPhpDocs extends FunctionVariant implements ParametersAcceptorWithPhpDocs |
11: | { |
12: | |
13: | |
14: | |
15: | |
16: | |
17: | public function __construct( |
18: | TemplateTypeMap $templateTypeMap, |
19: | ?TemplateTypeMap $resolvedTemplateTypeMap, |
20: | array $parameters, |
21: | bool $isVariadic, |
22: | Type $returnType, |
23: | private Type $phpDocReturnType, |
24: | private Type $nativeReturnType, |
25: | ?TemplateTypeVarianceMap $callSiteVarianceMap = null, |
26: | ) |
27: | { |
28: | parent::__construct( |
29: | $templateTypeMap, |
30: | $resolvedTemplateTypeMap, |
31: | $parameters, |
32: | $isVariadic, |
33: | $returnType, |
34: | $callSiteVarianceMap, |
35: | ); |
36: | } |
37: | |
38: | |
39: | |
40: | |
41: | public function getParameters(): array |
42: | { |
43: | |
44: | $parameters = parent::getParameters(); |
45: | |
46: | return $parameters; |
47: | } |
48: | |
49: | public function getPhpDocReturnType(): Type |
50: | { |
51: | return $this->phpDocReturnType; |
52: | } |
53: | |
54: | public function getNativeReturnType(): Type |
55: | { |
56: | return $this->nativeReturnType; |
57: | } |
58: | |
59: | } |
60: | |