Skip to content

Latest commit

 

History

History
57 lines (43 loc) · 1.45 KB

File metadata and controls

57 lines (43 loc) · 1.45 KB

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);
// あんちゃん