Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
CRAP
100.00% covered (success)
100.00%
1 / 1
GeneratedCodeTimestampId
100.00% covered (success)
100.00%
2 / 2
100.00% covered (success)
100.00%
2 / 2
2
100.00% covered (success)
100.00%
1 / 1
 getReferenceFor
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
 createFromMap
100.00% covered (success)
100.00%
1 / 1
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\StorageMetadataBuilder\Identifiers;
3
4use Apie\Core\Identifiers\IdentifierInterface;
5use Apie\Core\Lists\StringHashmap;
6use Apie\Core\ValueObjects\Md5Checksum;
7use Apie\StorageMetadataBuilder\Resources\GeneratedCodeTimestamp;
8use ReflectionClass;
9
10/**
11 * @implements IdentifierInterface<GeneratedCodeTimestamp>
12 */
13class GeneratedCodeTimestampId extends Md5Checksum implements IdentifierInterface
14{
15    public static function getReferenceFor(): ReflectionClass
16    {
17        return new ReflectionClass(GeneratedCodeTimestamp::class);
18    }
19
20    public static function createFromMap(StringHashmap $generatedCodeHashmap)
21    {
22        return self::fromNative(md5(json_encode($generatedCodeHashmap)));
23    }
24}