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: public function __construct(
15: TemplateTypeScope $scope,
16: TemplateTypeStrategy $templateTypeStrategy,
17: TemplateTypeVariance $templateTypeVariance,
18: string $name,
19: UnionType $bound,
20: )
21: {
22: parent::__construct($bound->getTypes());
23:
24: $this->scope = $scope;
25: $this->strategy = $templateTypeStrategy;
26: $this->variance = $templateTypeVariance;
27: $this->name = $name;
28: $this->bound = $bound;
29: }
30:
31: }
32: