Skip to content

koenhoeijmakers/paper-key-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Paper Key Generator

Packagist Scrutinizer Code Quality license Packagist

A paper key generator for PHP, simply generates a count of words to be used as a paper key.

Installation

Require the package with composer.

composer require koenhoeijmakers/paper-key-generator

Usage

Create a new instance of the class, which can be done with the PaperKeyFactory, or by just instancing one (make sure you inject a valid WordList contract).

$paperKey = new PaperKeyGenerator(new EnglishWordList());
$paperKey = PaperKeyFactory::english();

And then call the ->make() method.

$paperKey->make();

// surface curtain method raw swap bitter zone pink seat rookie marble dog

Optionally you can set a different divider and / or word count.

$paperKey->setDivider('-')->setCount(6)->make();

// doctor-clown-settle-material-smooth-away

Which can also be done on the fly.

$paperKey->make([
    'divider' => '=',
    'count'   => 8,
]);

// include=ecology=list=rail=canal=slush=gaze=marriage

Credits