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