1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\Node\Expr;
4:
5: use Override;
6: use PhpParser\Node\Expr;
7: use PHPStan\Node\VirtualNode;
8: use PHPStan\Turbo\ReferencedByTurboExtension;
9: use PHPStan\Type\Type;
10:
11: /**
12: * @api
13: */
14: #[ReferencedByTurboExtension(key: 'typeExpr')]
15: final class TypeExpr extends Expr implements VirtualNode
16: {
17:
18: /** @api */
19: public function __construct(private Type $exprType)
20: {
21: parent::__construct();
22: }
23:
24: public function getExprType(): Type
25: {
26: return $this->exprType;
27: }
28:
29: #[Override]
30: public function getType(): string
31: {
32: return 'PHPStan_Node_TypeExpr';
33: }
34:
35: /**
36: * @return string[]
37: */
38: #[Override]
39: public function getSubNodeNames(): array
40: {
41: return [];
42: }
43:
44: }
45: