fix(value-objects): simplify Uuid usage in OrderReference
Refactor the OrderReference class to use the Uuid alias directly for better readability.
This commit is contained in:
parent
1cf15950c6
commit
dd05d9166c
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Domain\Models\ValueObjects;
|
||||
|
||||
use Ramsey\Uuid\Uuid;
|
||||
use Ramsey\Uuid\UuidInterface;
|
||||
use Shared\Exceptions\InvalidUuidException;
|
||||
use Shared\Helpers\UuidHelper;
|
||||
|
|
@ -21,7 +22,7 @@ final readonly class OrderReference implements \Stringable
|
|||
public static function fromString(string $value): self
|
||||
{
|
||||
if (UuidHelper::isValid($value)) {
|
||||
return new self(\Ramsey\Uuid\Uuid::fromString($value));
|
||||
return new self(Uuid::fromString($value));
|
||||
}
|
||||
|
||||
return self::fromBase58($value);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue