Total Complexity | 4 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php declare(strict_types=1); |
||
13 | trait AnnotatesForAggregate |
||
14 | { |
||
15 | use SupportsAnnotations; |
||
16 | |||
17 | 4 | public function getAggregateId(): AggregateIdInterface |
|
18 | { |
||
19 | 4 | return $this->{static::getAnnotatedId()}; |
|
20 | } |
||
21 | |||
22 | 4 | private static function getAnnotatedId(): string |
|
23 | { |
||
24 | 4 | return static::getAnnotation('id'); |
|
25 | } |
||
26 | |||
27 | 4 | private static function getAnnotatedRevision(): string |
|
30 | } |
||
31 | |||
32 | 5 | private static function getAnnotation(string $key): string |
|
36 | } |
||
37 | } |
||
38 |