1: | <?php declare(strict_types = 1); |
2: | |
3: | namespace PHPStan\PhpDoc\Tag; |
4: | |
5: | use PHPStan\Type\Generic\TemplateTypeVariance; |
6: | use PHPStan\Type\Type; |
7: | |
8: | |
9: | |
10: | |
11: | final class TemplateTag |
12: | { |
13: | |
14: | |
15: | |
16: | |
17: | public function __construct(private string $name, private Type $bound, private ?Type $default, private TemplateTypeVariance $variance) |
18: | { |
19: | } |
20: | |
21: | |
22: | |
23: | |
24: | public function getName(): string |
25: | { |
26: | return $this->name; |
27: | } |
28: | |
29: | public function getBound(): Type |
30: | { |
31: | return $this->bound; |
32: | } |
33: | |
34: | public function getDefault(): ?Type |
35: | { |
36: | return $this->default; |
37: | } |
38: | |
39: | public function getVariance(): TemplateTypeVariance |
40: | { |
41: | return $this->variance; |
42: | } |
43: | |
44: | } |
45: | |