Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
100.00% |
4 / 4 |
|
100.00% |
3 / 3 |
CRAP | |
100.00% |
1 / 1 |
GeneratedCodeTimestamp | |
100.00% |
4 / 4 |
|
100.00% |
3 / 3 |
3 | |
100.00% |
1 / 1 |
__construct | |
100.00% |
2 / 2 |
|
100.00% |
1 / 1 |
1 | |||
noIndexing | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 | |||
getId | |
100.00% |
1 / 1 |
|
100.00% |
1 / 1 |
1 |
1 | <?php |
2 | namespace Apie\StorageMetadataBuilder\Resources; |
3 | |
4 | use Apie\Core\Attributes\ProvideIndex; |
5 | use Apie\Core\Entities\EntityInterface; |
6 | use Apie\Core\Lists\StringHashmap; |
7 | use Apie\StorageMetadataBuilder\Identifiers\GeneratedCodeTimestampId; |
8 | use Apie\StorageMetadataBuilder\Lists\GeneratedCodeHashmap; |
9 | |
10 | #[ProvideIndex('noIndexing')] |
11 | class GeneratedCodeTimestamp implements EntityInterface |
12 | { |
13 | private GeneratedCodeTimestampId $id; |
14 | private StringHashmap $codeMap; |
15 | public function __construct(GeneratedCodeHashmap $generatedCodeHashmap) |
16 | { |
17 | $this->codeMap = $generatedCodeHashmap->toStringHashmap(); |
18 | $this->id = GeneratedCodeTimestampId::createFromMap($this->codeMap); |
19 | } |
20 | |
21 | public static function noIndexing(): array |
22 | { |
23 | return []; |
24 | } |
25 | |
26 | public function getId(): GeneratedCodeTimestampId |
27 | { |
28 | return $this->id; |
29 | } |
30 | } |