Total Complexity | 4 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
10 | class DummyAggregateRootId implements AggregateRootId |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $identifier; |
||
16 | |||
17 | 13 | private function __construct(string $identifier) |
|
18 | { |
||
19 | 13 | $this->identifier = $identifier; |
|
20 | 13 | } |
|
21 | |||
22 | /** |
||
23 | * @return string |
||
24 | */ |
||
25 | 6 | public function toString(): string |
|
26 | { |
||
27 | 6 | return $this->identifier; |
|
28 | } |
||
29 | |||
30 | /** |
||
31 | * @param string $aggregateRootId |
||
32 | * |
||
33 | * @return static |
||
34 | */ |
||
35 | 8 | public static function fromString(string $aggregateRootId): AggregateRootId |
|
38 | } |
||
39 | |||
40 | 10 | public static function generate(): AggregateRootId |
|
45 |