Skip to content

Commit

Permalink
Merge pull request fzaninotto#848 from sustmi/docs-clarify-random-ele…
Browse files Browse the repository at this point in the history
…ments

docs: Clarify that randomElements() does not repeat input elements
  • Loading branch information
fzaninotto committed Mar 10, 2016
2 parents 74accbb + 7978ddc commit 588da2f
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 randomly ordered subsequence of $count elements from a provided array
*
* @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 588da2f

Please sign in to comment.