| 1: | <?php declare(strict_types = 1); |
| 2: | |
| 3: | namespace PHPStan\PhpDoc\Tag; |
| 4: | |
| 5: | use PHPStan\Turbo\ReferencedByTurboExtension; |
| 6: | use PHPStan\Type\Generic\TemplateTypeVariance; |
| 7: | use PHPStan\Type\Type; |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | #[ReferencedByTurboExtension(key: 'templateTag')] |
| 13: | final class TemplateTag |
| 14: | { |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | public function __construct( |
| 22: | private string $name, |
| 23: | private Type $bound, |
| 24: | private ?Type $default, |
| 25: | private TemplateTypeVariance $variance, |
| 26: | private ?array $circularBoundPath = null, |
| 27: | private ?array $circularDefaultPath = null, |
| 28: | ) |
| 29: | { |
| 30: | } |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | public function getName(): string |
| 36: | { |
| 37: | return $this->name; |
| 38: | } |
| 39: | |
| 40: | public function getBound(): Type |
| 41: | { |
| 42: | return $this->bound; |
| 43: | } |
| 44: | |
| 45: | public function getDefault(): ?Type |
| 46: | { |
| 47: | return $this->default; |
| 48: | } |
| 49: | |
| 50: | public function getVariance(): TemplateTypeVariance |
| 51: | { |
| 52: | return $this->variance; |
| 53: | } |
| 54: | |
| 55: | |
| 56: | |
| 57: | |
| 58: | |
| 59: | |
| 60: | |
| 61: | public function getCircularBoundPath(): ?array |
| 62: | { |
| 63: | return $this->circularBoundPath; |
| 64: | } |
| 65: | |
| 66: | |
| 67: | |
| 68: | |
| 69: | |
| 70: | |
| 71: | public function getCircularDefaultPath(): ?array |
| 72: | { |
| 73: | return $this->circularDefaultPath; |
| 74: | } |
| 75: | |
| 76: | } |
| 77: | |