Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Coverage | 0% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
8 | class UuidFactory |
||
9 | { |
||
10 | |||
11 | /** |
||
12 | * @var \Ramsey\Uuid\UuidFactory |
||
13 | */ |
||
14 | private $orderedTimeFactory; |
||
15 | /** |
||
16 | * @var \Ramsey\Uuid\UuidFactory |
||
17 | */ |
||
18 | private $uuidFactory; |
||
19 | |||
20 | public function __construct(\Ramsey\Uuid\UuidFactory $uuidFactory) |
||
25 | } |
||
26 | |||
27 | private function createOrderedTimeFactory(\Ramsey\Uuid\UuidFactory $uuidFactory): \Ramsey\Uuid\UuidFactory |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * This is used to get ordered time UUIDs as used in: |
||
40 | * \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\UuidFieldTrait |
||
41 | * |
||
42 | * @return UuidInterface |
||
43 | * @throws \Exception |
||
44 | */ |
||
45 | public function getOrderedTimeUuid(): UuidInterface |
||
46 | { |
||
47 | return $this->orderedTimeFactory->uuid1(); |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * This is used to generate standard UUIDs, as used in |
||
52 | * \EdmondsCommerce\DoctrineStaticMeta\Entity\Fields\Traits\PrimaryKey\NonBinaryUuidFieldTrait |
||
53 | * |
||
54 | * @return UuidInterface |
||
55 | * @throws \Exception |
||
56 | */ |
||
57 | public function getUuid(): UuidInterface |
||
60 | } |
||
61 | } |
||
62 |