boolxy / random
Generates random values
1.0.2
2021-01-17 04:10 UTC
Requires
- php: ^7.4 || ^8
Requires (Dev)
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: ^3.5
README
Generates random values
Installation
This package can be installed via Composer:
composer require boolxy/random
Usage
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);
Composer scripts
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
Credits
License
The MIT License (MIT). Please see License File for more information.