Conditions | 1 |
Paths | 1 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
24 | 2 | public function buildFromJson(string $json): Library |
|
25 | { |
||
26 | 2 | $data = json_decode($json, true); |
|
27 | |||
28 | 2 | return new Library( |
|
29 | 2 | Uuid::fromString($data['fromEventLogUuid']), |
|
30 | 2 | Uuid::fromString($data['untilEventLogUuid']), |
|
31 | 2 | $this->productBuilder->buildFromArray($data['products']), |
|
32 | 2 | $this->discountBuilder->buildFromArray($data['discounts']), |
|
33 | 2 | $this->productBuilder->buildFromArray($data['deletedProducts']), |
|
34 | 2 | $this->discountBuilder->buildFromArray($data['deletedDiscounts']) |
|
35 | ); |
||
36 | } |
||
37 | } |
||
38 |