Generates random values
This package can be installed via Composer:
composer require boolxy/random
use Boolxy\Random\Random;
// Number (Example result: 5793)
// Default length = 4
$result = Random::num($length);
// String (Example result: drkmwmlr)
// Default length = 8
$result = Random::str($length);
// Alphanumeric (Example result: Y20U89C9KEYSqcKw)
// Default length = 16
$result = Random::alpha($length);
With reviewing the tests, you can learn more about the package. Before testing: Copy phpunit.xml.dist as phpunit.xml and update it. After then you can start the testing.
-
Run the tests
composer test
-
Check for PSR-2 standards
composer check
-
Apply PSR-2 standards
composer fix
The MIT License (MIT). Please see License File for more information.