Total Complexity | 8 |
Total Lines | 71 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | class AssetMeta |
||
21 | { |
||
22 | use HydratorTrait { |
||
23 | fromArray as private fromArrayTrait; |
||
24 | } |
||
25 | |||
26 | /** @var \DateTimeImmutable */ |
||
27 | private $createdAt; |
||
28 | /** @var string */ |
||
29 | private $createdBy = ""; |
||
30 | /** @var \DateTimeImmutable */ |
||
31 | private $updatedAt; |
||
32 | /** @var string */ |
||
33 | private $updatedBy = ""; |
||
34 | |||
35 | |||
36 | /** |
||
37 | * AssetMeta constructor. |
||
38 | * |
||
39 | */ |
||
40 | 7 | final protected function __construct() |
|
42 | 7 | } |
|
43 | |||
44 | /** |
||
45 | * @return \DateTimeImmutable |
||
46 | */ |
||
47 | 1 | public function getCreatedAt(): \DateTimeImmutable |
|
48 | { |
||
49 | 1 | return $this->createdAt; |
|
50 | } |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | 1 | public function getCreatedBy(): string |
|
56 | { |
||
57 | 1 | return $this->createdBy; |
|
58 | } |
||
59 | |||
60 | /** |
||
61 | * @return \DateTimeImmutable |
||
62 | */ |
||
63 | 1 | public function getUpdatedAt(): \DateTimeImmutable |
|
66 | } |
||
67 | |||
68 | /** |
||
69 | * @return string |
||
70 | */ |
||
71 | 1 | public function getUpdatedBy(): string |
|
74 | } |
||
75 | |||
76 | /** |
||
77 | * @param array $data |
||
78 | * @return AssetMeta |
||
79 | * @throws \Exception |
||
80 | */ |
||
81 | 7 | public static function fromArray(array $data) |
|
93 |