28 lines
743 B
PHP
28 lines
743 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Support\Mothers;
|
|
|
|
use Domain\Models\Entities\Brand;
|
|
use Domain\Models\ValueObjects\Brand\ArcadiaId;
|
|
use Domain\Models\ValueObjects\Brand\BrandCode;
|
|
use Domain\Models\ValueObjects\Brand\BrandId;
|
|
use Domain\Models\ValueObjects\Brand\BrandName;
|
|
use Ramsey\Uuid\Uuid;
|
|
|
|
final class BrandMother
|
|
{
|
|
public static function create(
|
|
?string $name = null,
|
|
?string $code = null,
|
|
?string $arcadiaId = null,
|
|
): Brand {
|
|
return Brand::hydrate(
|
|
id: new BrandId(Uuid::uuid7()),
|
|
name: new BrandName($name ?? 'Le Gaulois'),
|
|
code: new BrandCode($code ?? 'LGL01'),
|
|
arcadiaId: new ArcadiaId($arcadiaId ?? '1'),
|
|
);
|
|
}
|
|
}
|