1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Type\Generic;
4:
5: use PHPStan\Turbo\ShadowedByTurboExtension;
6: use PHPStan\Type\ObjectWithoutClassType;
7: use PHPStan\Type\Traits\UndecidedComparisonCompoundTypeTrait;
8: use PHPStan\Type\Type;
9:
10: /** @api */
11: #[ShadowedByTurboExtension(implementation: __DIR__ . '/../../../turbo-ext/src/TemplateObjectWithoutClassType.cpp')]
12: class TemplateObjectWithoutClassType extends ObjectWithoutClassType implements TemplateType
13: {
14:
15: use UndecidedComparisonCompoundTypeTrait;
16: /** @use TemplateTypeTrait<ObjectWithoutClassType> */
17: use TemplateTypeTrait;
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: ObjectWithoutClassType $bound,
28: ?Type $default,
29: )
30: {
31: parent::__construct();
32:
33: $this->scope = $scope;
34: $this->strategy = $templateTypeStrategy;
35: $this->variance = $templateTypeVariance;
36: $this->name = $name;
37: $this->bound = $bound;
38: $this->default = $default;
39: }
40:
41: public function getClassStringType(): Type
42: {
43: return new GenericClassStringType($this);
44: }
45:
46: }
47: