Lines
66.66%
2 / 3
Functions and Methods
66.66%
2 / 3
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| GetComponentVersion | 66.66% | 2 / 3 | 66.66% | 2 / 3 | 3.33 | 0.00% | 0 / 1 | |||
| type | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| describe | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| toMessage | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Client\Connection\Command\Component; | |
| 6 | ||
| 7 | use Stewart\Client\Connection\Command\HaCommand; | |
| 8 | ||
| 9 | final readonly class GetComponentVersion implements HaCommand | |
| 10 | { | |
| 11 | public function type(): string | |
| 12 | { | |
| 13 | return 'stewart/version'; | |
| 14 | } | |
| 15 | ||
| 16 | public function describe(): string | |
| 17 | { | |
| 18 | return $this->type(); | |
| 19 | } | |
| 20 | ||
| 21 | public function toMessage(): array | |
| 22 | { | |
| 23 | return ['type' => $this->type()]; | |
| 24 | } | |
| 25 | } |