Conditions | 3 |
Paths | 1 |
Total Lines | 8 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
25 | 3 | public static function fromAmazonRequest(array $amazonRequest): self |
|
26 | { |
||
27 | 3 | return new self( |
|
28 | 3 | uid: $amazonRequest['uid'] ?? null, |
|
29 | 3 | name: $amazonRequest['name'] ?? null, |
|
30 | 3 | from: isset($amazonRequest['from']) ? MediaState::tryFrom($amazonRequest['from']) : null, |
|
31 | 3 | to: isset($amazonRequest['to']) ? MediaState::tryFrom($amazonRequest['to']) : null, |
|
32 | 3 | utcTime: $amazonRequest['utcTime'] ?? null, |
|
33 | 3 | ); |
|
36 |