Skip to content
This repository was archived by the owner on Dec 11, 2020. It is now read-only.

Commit 74f8b2e

Browse files
authored
randomElement accepts an array (#1993)
1 parent 29e7df1 commit 74f8b2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ print_r($values); // [0, 4, 8, 4, 2, 6, 0, 8, 8, 6]
387387
// just like unique(), valid() throws an overflow exception when it can't generate a valid value
388388
$values = array();
389389
try {
390-
$faker->valid($evenValidator)->randomElement(1, 3, 5, 7, 9);
390+
$faker->valid($evenValidator)->randomElement([1, 3, 5, 7, 9]);
391391
} catch (\OverflowException $e) {
392392
echo "Can't pick an even number in that set!";
393393
}

0 commit comments

Comments
 (0)