| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Coverage | 77.78% |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 7 | class InputEvent |
||
| 8 | { |
||
| 9 | public const ACTION_DOWN = 'down'; |
||
| 10 | public const ACTION_UP = 'up'; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @param string $gadgetId Gadget identifier |
||
| 14 | * @param \DateTime $timestamp Event timestamp |
||
| 15 | * @param string $action Action type (down/up) |
||
| 16 | * @param string $color Color of the input |
||
| 17 | * @param string $feature Feature that triggered the event |
||
| 18 | */ |
||
| 19 | public function __construct( |
||
| 20 | public string $gadgetId, |
||
| 21 | public \DateTime $timestamp, |
||
| 22 | public string $action, |
||
| 23 | public string $color, |
||
| 24 | public string $feature, |
||
| 25 | ) { |
||
| 26 | } |
||
| 27 | |||
| 28 | 1 | public static function fromAmazonRequest(array $amazonRequest): self |
|
| 36 | 1 | ); |
|
| 37 | } |
||
| 39 |