Skip to content

boolxy/random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random

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.