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

Commit

Permalink
docs: Clarify that randomElements() does not repeat input elements
Browse files Browse the repository at this point in the history
  • Loading branch information
sustmi committed Mar 3, 2016
1 parent 6da7882 commit 4c6f71b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ Each of the generator properties (like `name`, `address`, and `lorem`) are calle
randomFloat($nbMaxDecimals = NULL, $min = 0, $max = NULL) // 48.8932
numberBetween($min = 1000, $max = 9000) // 8567
randomLetter // 'b'
// returns randomly ordered subsequence of a provided array
randomElements($array = array ('a','b','c'), $count = 1) // array('c')
randomElement($array = array ('a','b','c')) // 'b'
shuffle('hello, world') // 'rlo,h eoldlw'
Expand Down
2 changes: 1 addition & 1 deletion src/Faker/Provider/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public static function randomAscii()
}

/**
* Returns random elements from a provided array
* Returns random elements from a provided array (not repeating input indices)
*
* @param array $array Array to take elements from. Defaults to a-f
* @param integer $count Number of elements to take.
Expand Down

0 comments on commit 4c6f71b

Please sign in to comment.