ergebnis / faker-provider
Provides additional providers for fzaninotto/faker.
Fund package maintenance!
localheinz
Requires
- php: ^7.2
- fzaninotto/faker: ^1.9.0
Requires (Dev)
- ergebnis/php-cs-fixer-config: ~1.0.0
- ergebnis/phpstan-rules: ~0.14.0
- ergebnis/test-util: ~0.9.0
- infection/infection: ~0.14.2
- localheinz/composer-normalize: ^1.3.1
- phpstan/extension-installer: ^1.0.3
- phpstan/phpstan: ~0.11.19
- phpstan/phpstan-deprecation-rules: ~0.11.2
- phpstan/phpstan-strict-rules: ~0.11.1
- phpunit/phpunit: ^8.4.3
This package is auto-updated.
Last update: 2020-08-28 19:04:10 UTC
README
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 );
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.