Skip to content

Commit 3bac790

Browse files
committed
TASK: Reform GlobalScope to use explicit type names
1 parent 68f4fa2 commit 3bac790

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/TypeSystem/Scope/GlobalScope/GlobalScope.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ public static function get(): self
4747

4848
public function getType(TypeName $typeName): AtomicTypeInterface
4949
{
50-
return match ($typeName->value) {
51-
'string' => StringType::get(),
52-
'number' => IntegerType::get(),
53-
'boolean' => BooleanType::get(),
54-
'slot' => SlotType::get(),
50+
return match ($typeName) {
51+
StringType::get()->getName() => StringType::get(),
52+
IntegerType::get()->getName() => IntegerType::get(),
53+
BooleanType::get()->getName() => BooleanType::get(),
54+
SlotType::get()->getName() => SlotType::get(),
5555
default => throw new \Exception('@TODO: Unknown Type ' . $typeName->value)
5656
};
5757
}

0 commit comments

Comments
 (0)