Skip to content
🐙 Provides additional providers for fzaninotto/faker.
PHP Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.dependabot
.github
src
test
.editorconfig
.gitattributes
.gitignore
.php_cs
CHANGELOG.md
LICENSE
Makefile
README.md
composer.json
composer.lock
infection.json
phpstan-baseline.neon
phpstan.neon
psalm-baseline.xml
psalm.xml

README.md

faker-provider

Continuous Deployment Continuous Integration 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:

use Ergebnis\Faker\Provider;

$faker->addProvider(new Provider\AvatarUrlProvider($faker));

Providers

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

AvatarUrlProvider

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.

You can’t perform that action at this time.