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