Lines
50.00%
2 / 4
Methods
50.00%
2 / 4
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| type | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| describe | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| toMessage | 100.00% | 1 / 1 | 100.00% | 1 / 1 | 1 | ||
| 9 | final readonly class GetEntityRegistryEntry implements HaCommand | |
| 10 | { | |
| 11 | public function __construct(public EntityId $entityId) {} | |
| 12 | ||
| 13 | public function type(): string | |
| 14 | { | |
| 15 | return 'config/entity_registry/get'; | |
| 16 | } | |
| 17 | ||
| 18 | public function describe(): string | |
| 19 | { | |
| 20 | return \sprintf('%s %s', $this->type(), $this->entityId->value); | |
| 21 | } | |
| 22 | ||
| 23 | public function toMessage(): array | |
| 24 | { | |
| 25 | return ['type' => $this->type(), 'entity_id' => $this->entityId->value]; | |
| 26 | } | |
| 27 | } |