Lines
0.00%
0 / 3
Functions and Methods
0.00%
0 / 3
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| TextCommand | 0.00% | 0 / 3 | 0.00% | 0 / 3 | 12 | 0.00% | 0 / 1 | |||
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| getContext | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| getRequestedState | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Contracts\Exposure\Command; | |
| 6 | ||
| 7 | use Stewart\Contracts\Exposure\ExposedState; | |
| 8 | use Stewart\Contracts\State\EventContext; | |
| 9 | ||
| 10 | final readonly class TextCommand implements ExposedCommand | |
| 11 | { | |
| 12 | public function __construct( | |
| 13 | public string $value, | |
| 14 | public EventContext $context, | |
| 15 | ) {} | |
| 16 | ||
| 17 | public function getContext(): EventContext | |
| 18 | { | |
| 19 | return $this->context; | |
| 20 | } | |
| 21 | ||
| 22 | public function getRequestedState(): ExposedState | |
| 23 | { | |
| 24 | return new ExposedState($this->value); | |
| 25 | } | |
| 26 | } |