Skip to content

Commit

Permalink
prevent only generating ints as key
Browse files Browse the repository at this point in the history
  • Loading branch information
Baptouuuu committed Mar 5, 2024
1 parent aa821e3 commit bbdc013
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion proofs/is.php
Expand Up @@ -373,7 +373,14 @@ static function($assert, $array, $other) {
yield proof(
'Is::shape()',
given(
Set\Strings::madeOf(Set\Chars::alphanumerical())->atLeast(1),
Set\Composite::immutable(
static fn($letter, $rest) => $letter.$rest,
Set\Either::any(
Set\Chars::lowercaseLetter(),
Set\Chars::uppercaseLetter(),
),
Set\Strings::madeOf(Set\Chars::alphanumerical()),
),
Set\Type::any(),
Set\Integers::any(),
),
Expand Down

0 comments on commit bbdc013

Please sign in to comment.