Skip to content

Commit

Permalink
Add uuid generator to the generator factory
Browse files Browse the repository at this point in the history
  • Loading branch information
rawilk committed Mar 6, 2024
1 parent d948302 commit 0b1a186
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Support/GeneratorFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
use Rawilk\HumanKeys\Exceptions\InvalidGenerator;
use Rawilk\HumanKeys\Generators\KsuidGenerator;
use Rawilk\HumanKeys\Generators\SnowflakeGenerator;
use Rawilk\HumanKeys\Generators\UuidGenerator;

class GeneratorFactory
{
Expand All @@ -29,6 +30,7 @@ public function generator(): Generator
return match ($this->generator) {
'ksuid' => new KsuidGenerator,
'snowflake' => new SnowflakeGenerator,
'uuid' => new UuidGenerator,
default => throw InvalidGenerator::invalid($this->generator),
};
}
Expand Down

0 comments on commit 0b1a186

Please sign in to comment.