New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

lcherone/php-petname

Library for generating human-readable, random names for objects.
14,303 7
Install
composer require lcherone/php-petname
Latest Version:v1.0.8
PHP:~5.6|~7.0
License:MIT
Last Updated:Jul 6, 2023
Links: GitHub  ·  Packagist
Maintainer: lcherone

PHP Petname

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.

Related Packages

carsdotcom/laravel-json-model

Laravel models backed by JSON data

34,181 1
leochien/laravel-spgateway

spgateway library for laravel

12,152 34
simon80119/laravel-spgateway

spgateway library for laravel

6,367 0
brandon14/fossabot-commander

Library to easily create Fossabot commands invokable via the Fossabot customapi...

4,863 2
drh/mpesa

Mpesa Payments Library

3,679 3

Version History

Version Released PHP License
v1.0.8 ~5.6|~7.0 MIT
v1.0.7 >=5.4 MIT
v1.0.6 >=5.4 MIT
v1.0.5 >=5.4 MIT
v1.0.4 >=5.4 MIT