You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- <?php
-
- namespace common\components;
-
- use Faker\Factory;
- use Faker\Generator;
- use Faker\Provider\fr_FR\Address;
- use Faker\Provider\fr_FR\Person;
- use Faker\Provider\fr_FR\PhoneNumber;
-
- class Faker
- {
- protected Generator $faker;
-
- public function __construct()
- {
- $this->faker = Factory::create();
- $this->faker->addProvider(new Person($this->faker));
- $this->faker->addProvider(new PhoneNumber($this->faker));
- $this->faker->addProvider(new Address($this->faker));
- }
-
- public function name(): string
- {
- return $this->faker->name;
- }
-
- public function email(): string
- {
- return $this->faker->email;
- }
-
- public function phoneNumber(): string
- {
- return $this->faker->mobileNumber;
- }
-
- public function address(): string
- {
- return $this->faker->address;
- }
- }
|