lcherone/php-petname

Library for generating human-readable, random names for objects.

Installs: 11 389

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 1

Open Issues: 1

pkg:composer/lcherone/php-petname

v1.0.8 2018-02-03 14:12 UTC

This package is auto-updated.

Last update: 2025-10-06 17:00:54 UTC


README

Build Status StyleCI Scrutinizer Code Quality Code Coverage Packagist Version Packagist Downloads

A utility to generate "pet names", consisting of a random combination of adverbs, an adjective, and an animal name.

Ported from: https://github.com/dustinkirkland/golang-petname to a static PHP class.

Install

Require this package with composer using the following command:

$ composer require lcherone/php-petname

Example

<?php
require 'vendor/autoload.php';

use LCherone\PHPPetname as Petname;

// werewolf
echo Petname::Generate(1);

// peacefull-werewolf
echo Petname::Generate(2);

// peacefull mighty werewolf
echo Petname::Generate(3, ' ');

// peacefull-mighty-tough-werewolf
echo Petname::Generate(4);

Testing

$ composer test

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.