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