boolxy/random

Generates random values

1.0.2 2021-01-17 04:10 UTC

This package is auto-updated.

Last update: 2024-11-18 03:28:01 UTC


README

Tests StyleCI Latest Stable Version License

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.