👉 A Japanese nickname generator for fake data for testing 👈
By fuwasegu (@fuwasegu)
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.
Install easily via Composer:
composer require lunain84/adana
Note: This library requires PHP 8.0+.
<?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);
// あんちゃん