Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| UuidV3 | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
| createRandom | |
100.00% |
4 / 4 |
|
100.00% |
1 / 1 |
1 | |||
| 1 | <?php |
| 2 | namespace Apie\Core\Identifiers; |
| 3 | |
| 4 | use Apie\Core\Attributes\FakeMethod; |
| 5 | use Faker\Generator; |
| 6 | use Ramsey\Uuid\Uuid as RamseyUuid; |
| 7 | |
| 8 | #[FakeMethod("createRandom")] |
| 9 | class UuidV3 extends Uuid |
| 10 | { |
| 11 | public static function createRandom(Generator $generator): self |
| 12 | { |
| 13 | return static::fromNative(RamseyUuid::uuid3( |
| 14 | RamseyUuid::NAMESPACE_URL, |
| 15 | $generator->url() |
| 16 | )->toString()); |
| 17 | } |
| 18 | } |