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