Skip to content

Commit 66987fa

Browse files
docs: document $chanceOfGettingTrue for boolean (#92)
* docs: document $chanceOfGettingTrue for boolean * Update miscellaneous.md --------- Co-authored-by: Bram <[email protected]>
1 parent 20ee202 commit 66987fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

docs/formatters/miscellaneous.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
Generate a random `bool`.
66

7+
Optionally, a float (between 0.0 and 1.0) or an integer (between 0 and 100) can be passed, which changes the chance of getting `true`.
8+
79
```php
8-
echo $faker->boolean();
10+
// 50% chance of true
11+
echo $faker->boolean(0.5);
912

1013
// true, true, false
1114
```

0 commit comments

Comments
 (0)