feat(db): add entities

This commit is contained in:
2024-08-02 14:13:25 +02:00
parent 07d7a3025a
commit 857507abe5
17 changed files with 652 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Tests\Common;
use Faker\Factory;
use Faker\Generator;
trait FakerTrait
{
private ?Generator $faker;
protected function bootFaker(): void
{
$this->faker = Factory::create();
}
protected function getFaker(): Generator
{
if ($this->faker === null) {
throw new \LogicException('Faker has not been booted yet.');
}
return $this->faker;
}
}