| Total Complexity | 7 |
| Total Lines | 33 |
| Duplicated Lines | 0 % |
| Coverage | 93.33% |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 15 | trait AggregateAnnotated |
||
| 16 | { |
||
| 17 | use InheritanceReader; |
||
| 18 | |||
| 19 | 4 | public function getAggregateId(): AggregateIdInterface |
|
| 20 | { |
||
| 21 | 4 | return $this->{static::getAnnotatedId()}; |
|
| 22 | } |
||
| 23 | |||
| 24 | 4 | private static function getAnnotatedId(): string |
|
| 25 | { |
||
| 26 | 4 | return static::getAnnotation('id'); |
|
| 27 | } |
||
| 28 | |||
| 29 | 4 | private static function getAnnotatedRevision(): string |
|
| 30 | { |
||
| 31 | 4 | return static::getAnnotation('rev'); |
|
| 32 | } |
||
| 33 | |||
| 34 | 5 | private static function getAnnotation(string $key): string |
|
| 48 | } |
||
| 49 | } |
||
| 50 |