Skip to content

Commit 54e8d82

Browse files
authored
Added internal type assertion
1 parent a7307d7 commit 54e8d82

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Typesystem/EnumType.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ final public static function fromEnum(string $enumClass) : EnumItemSet
4545
}
4646

4747
foreach ($ref->getCases() as $case) {
48+
\assert($case instanceof \ReflectionEnumBackedCase);
49+
4850
$values[] = new EnumItem($case->getBackingValue(), self::getItemDescription($case));
4951
}
5052

0 commit comments

Comments
 (0)