Lines n/a 0 / 0
Functions and Methods n/a 0 / 0
Classes and Traits n/a 0 / 0
Name Lines Functions and Methods CRAP Classes and Traits
1<?php
2
3declare(strict_types=1);
4
5namespace Stewart\Contracts\Exposure\Command;
6
7use Stewart\Contracts\Exposure\Action\ActionCall;
8use Stewart\Contracts\Exposure\ExposedPlatform;
9use Stewart\Contracts\Exposure\ExposedState;
10use Stewart\Contracts\State\EventContext;
11use Stewart\Contracts\Wire\WireVariants;
12
13#[WireVariants('platform', [
14    ExposedPlatform::Switch->value => SwitchCommand::class,
15    ExposedPlatform::Button->value => ButtonPress::class,
16    ExposedPlatform::Number->value => NumberCommand::class,
17    ExposedPlatform::Select->value => SelectCommand::class,
18    ExposedPlatform::Text->value => TextCommand::class,
19    ExposedPlatform::Time->value => TimeCommand::class,
20    ExposedPlatform::Date->value => DateCommand::class,
21    ExposedPlatform::DateTime->value => DateTimeCommand::class,
22    ExposedPlatform::Action->value => ActionCall::class,
23])]
24interface ExposedCommand
25{
26    public function getContext(): EventContext;
27
28    public function getRequestedState(): ?ExposedState;
29}