1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Type\Generic;
4:
5: use PHPStan\Type\IntersectionType;
6:
7: /** @api */
8: final class TemplateIntersectionType extends IntersectionType implements TemplateType
9: {
10:
11: /** @use TemplateTypeTrait<IntersectionType> */
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: IntersectionType $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: