/Adana

A Japanese nickname generator for fake data for testing

Primary LanguagePHP

ADANA

πŸ‘‰ A Japanese nickname generator for fake data for testing πŸ‘ˆ

By fuwasegu (@fuwasegu)


πŸš€ What's this?

Does the database of the application you are developing have a user table? Does it have a specification that allows users to register their nicknames? ADANA can help you test such a product. It can generate user-specific nicknames that could not be generated by FakerPHP.

🚚 Installation

Install easily via Composer:

⚠️ Warning: This library is not yet registered on Packagist.

composer require lunain84/adana

Note: This library requires PHP 8.0+.

πŸ“ Example

<?php
use lunain84\Adana\Generator;

// ...

// You need `Generator::class` for generating a nickname.
$generator = new Generator();

// Set the full name of the person you want to give a nickname to.
$name = $generator->setFullName(
    firstName: 'δΈ–η΄€',
    firstKana: 'せいき',
    lastName: 'ε €η”°',
    lastKana: 'γ»γ‚ŠγŸ',
    middleName: 'γ‚’γƒ³γƒˆγƒ‹γƒΌ',
    middleKana: 'あんとにー',
);

// Finally, call the nickname generation method.
$nickname = $name->generateRandomAdana();

echo ($nickname);
// あんけゃん