Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 02ebd50

Browse files
committed
fix: show correct type options on invalid
1 parent 5442cc1 commit 02ebd50

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rule/Type.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function assert(mixed $value, ?string $name = null): void
9393
}
9494

9595
if (!isset(self::TYPE_FUNCTIONS[$constraint]) && !\class_exists($constraint) && !\interface_exists($constraint)) {
96-
throw new UnexpectedOptionException('constraint type', self::TYPE_FUNCTIONS, $constraint);
96+
throw new UnexpectedOptionException('constraint type', \array_keys(self::TYPE_FUNCTIONS), $constraint);
9797
}
9898
}
9999

0 commit comments

Comments
 (0)