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: * @api
10: * @final
11: */
12: class TemplateTag
13: {
14:
15: /**
16: * @param non-empty-string $name
17: */
18: public function __construct(private string $name, private Type $bound, private TemplateTypeVariance $variance)
19: {
20: }
21:
22: /**
23: * @return non-empty-string
24: */
25: public function getName(): string
26: {
27: return $this->name;
28: }
29:
30: public function getBound(): Type
31: {
32: return $this->bound;
33: }
34:
35: public function getVariance(): TemplateTypeVariance
36: {
37: return $this->variance;
38: }
39:
40: }
41: