Skip to content

Commit dc463f7

Browse files
committed
Minimal support for object type
1 parent 2b7a144 commit dc463f7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Internal/ContextualTypeParser.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use PHPStan\PhpDocParser\Ast\Type\UnionTypeNode;
2121
use Typhoon\PHPStanTypeParser\CustomTypeParser;
2222
use Typhoon\PHPStanTypeParser\TypeContext;
23+
use Typhoon\Type\ObjectT;
2324
use Typhoon\Type\Type;
2425
use function Typhoon\Type\andT;
2526
use function Typhoon\Type\arrayT;
@@ -124,6 +125,7 @@ private function parseIdentifier(string $name, array $genericNodes = []): Type
124125
'array-key' => arrayKeyT,
125126
'numeric' => numericT,
126127
'scalar' => scalarT,
128+
'object' => new ObjectT([]),
127129
'mixed' => mixedT,
128130
default => null,
129131
};

0 commit comments

Comments
 (0)