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: 'nativeTypeExpr')]
15: final class NativeTypeExpr extends Expr implements VirtualNode
16: {
17:
18: /** @api */
19: public function __construct(private Type $phpdocType, private Type $nativeType)
20: {
21: parent::__construct();
22: }
23:
24: public function getPhpDocType(): Type
25: {
26: return $this->phpdocType;
27: }
28:
29: public function getNativeType(): Type
30: {
31: return $this->nativeType;
32: }
33:
34: #[Override]
35: public function getType(): string
36: {
37: return 'PHPStan_Node_NativeTypeExpr';
38: }
39:
40: /**
41: * @return string[]
42: */
43: #[Override]
44: public function getSubNodeNames(): array
45: {
46: return [];
47: }
48:
49: }
50: