1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc\Tag; |
4: | |
5: | use PHPStan\Type\Type; |
6: | |
7: | /** |
8: | * @api |
9: | * @final |
10: | */ |
11: | class MethodTag |
12: | { |
13: | |
14: | /** |
15: | * @param array<string, MethodTagParameter> $parameters |
16: | * @param array<string, TemplateTag> $templateTags |
17: | */ |
18: | public function __construct( |
19: | private Type $returnType, |
20: | private bool $isStatic, |
21: | private array $parameters, |
22: | private array $templateTags = [], |
23: | ) |
24: | { |
25: | } |
26: | |
27: | public function getReturnType(): Type |
28: | { |
29: | return $this->returnType; |
30: | } |
31: | |
32: | public function isStatic(): bool |
33: | { |
34: | return $this->isStatic; |
35: | } |
36: | |
37: | /** |
38: | * @return array<string, MethodTagParameter> |
39: | */ |
40: | public function getParameters(): array |
41: | { |
42: | return $this->parameters; |
43: | } |
44: | |
45: | /** |
46: | * @return array<string, TemplateTag> |
47: | */ |
48: | public function getTemplateTags(): array |
49: | { |
50: | return $this->templateTags; |
51: | } |
52: | |
53: | } |
54: |