Skip to content

Instantly share code, notes, and snippets.

@datashaman
Last active April 28, 2019 12:25
Show Gist options
  • Save datashaman/1e39730280c5dc9e3868eb496dddf12d to your computer and use it in GitHub Desktop.
Save datashaman/1e39730280c5dc9e3868eb496dddf12d to your computer and use it in GitHub Desktop.
Datashaman\PHPCheck\booleans Example
<?php
<<<CONFIG
packages:
- "datashaman/phpcheck: dev-wip"
CONFIG;
#
# This is a Melody script. http://melody.sensiolabs.org/
#
use function Datashaman\PHPCheck\booleans;
use function Datashaman\PHPCheck\generate;
// Generate a boolean value with 50% chance true.
var_dump(generate(booleans()));
// Generate a boolean value with 75% chance true.
var_dump(generate(booleans(75)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment