Conditions | 1 |
Paths | 1 |
Total Lines | 11 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
45 | public static function fromAmazonRequest(array $amazonRequest): self |
||
46 | { |
||
47 | $event = new self(); |
||
48 | |||
49 | $event->gadgetId = $amazonRequest['gadgetId']; |
||
50 | $event->timestamp = new \DateTime($amazonRequest['timestamp']); |
||
51 | $event->action = $amazonRequest['action']; |
||
52 | $event->color = $amazonRequest['color']; |
||
53 | $event->feature = $amazonRequest['feature']; |
||
54 | |||
55 | return $event; |
||
56 | } |
||
58 |