ergebnis/faker-provider

This package is abandoned and no longer maintained. No replacement package was suggested.

Provides additional providers for fzaninotto/faker.

0.2.1 2019-12-15 09:36 UTC

This package is auto-updated.

Last update: 2020-08-28 19:04:10 UTC


README

Integrate Prune Release Renew

Code Coverage Type Coverage

Latest Stable Version Total Downloads

Provides additional providers for fzaninotto/faker.

Installation

Run

$ composer require --dev ergebnis/faker-provider

Usage

First obtain an instance of Faker\Generator:

use Faker\Factory;

$faker = Factory::create();

Then add providers like this:

<?php

use Ergebnis\Faker\Provider;
use Faker\Generator;

/** @var Generator $faker */
$faker->addProvider(new Provider\AvatarUrlProvider($faker));

Providers

This package provides the following providers for use with fzaninotto/faker:

AvatarUrlProvider

<?php

use Ergebnis\Faker\Provider;
use Faker\Generator;

/** @var Generator&Provider\AvatarUrlProvider $faker */
$url = $faker->adorableAvatarUrl();

$urlWithFixedIdentifier = $faker->adorableAvatarUrl('localheinz');

$urlWithFixedIdentifierAndSize = $faker->adorableAvatarUrl(
    'localheinz',
    150
);

Example of avatars.adorable.io avatar

Also see avatars.adorable.io.

Changelog

Please have a look at CHANGELOG.md.

Contributing

Please have a look at CONTRIBUTING.md.

Code of Conduct

Please have a look at CODE_OF_CONDUCT.md.

License

This package is licensed using the MIT License.

Please have a look at LICENSE.md.

Curious what I am building?

📬 Subscribe to my list, and I will occasionally send you an email to let you know what I am working on.