1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Type\Generic;
4:
5: use PHPStan\Type\UnionType;
6:
7: /** @api */
8: final class TemplateUnionType extends UnionType implements TemplateType
9: {
10:
11: /** @use TemplateTypeTrait<UnionType> */
12: use TemplateTypeTrait;
13:
14: /**
15: * @param non-empty-string $name
16: */
17: public function __construct(
18: TemplateTypeScope $scope,
19: TemplateTypeStrategy $templateTypeStrategy,
20: TemplateTypeVariance $templateTypeVariance,
21: string $name,
22: UnionType $bound,
23: )
24: {
25: parent::__construct($bound->getTypes());
26:
27: $this->scope = $scope;
28: $this->strategy = $templateTypeStrategy;
29: $this->variance = $templateTypeVariance;
30: $this->name = $name;
31: $this->bound = $bound;
32: }
33:
34: }
35: