add email rng

This commit is contained in:
Dennis Eichhorn 2020-11-10 22:08:32 +01:00
parent 9aa9fa9abe
commit 2589f91995

42
Utils/RnG/Email.php Normal file
View File

@ -0,0 +1,42 @@
<?php
/**
* Orange Management
*
* PHP Version 7.4
*
* @package phpOMS\Utils\RnG
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
namespace phpOMS\Utils\RnG;
/**
* Email generator.
*
* @package phpOMS\Utils\RnG
* @license OMS License 1.0
* @link https://orange-management.org
* @since 1.0.0
*/
class Email
{
/**
* Get a random email.
*
* @return string
*
* @since 1.0.0
*/
public static function generateEmail() : string
{
$count = \count(Text::LOREM_IPSUM) - 1;
return Text::LOREM_IPSUM[\mt_rand(0, $count)]
. '@' . Text::LOREM_IPSUM[\mt_rand(0, $count)]
. '.com';
}
}