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