Lines
0.00%
0 / 2
Functions and Methods
0.00%
0 / 2
Classes and Traits
0.00%
0 / 1
| Name | Lines | Functions and Methods | CRAP | Classes and Traits | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| RecordedStateReader | 0.00% | 0 / 2 | 0.00% | 0 / 2 | 6 | 0.00% | 0 / 1 | |||
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| readCurrentStates | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | |||||
| 1 | <?php | |
| 2 | ||
| 3 | declare(strict_types=1); | |
| 4 | ||
| 5 | namespace Stewart\Testing\HaContext; | |
| 6 | ||
| 7 | use Stewart\Contracts\Entity\EntityId; | |
| 8 | use Stewart\Contracts\Registry\EntityFilter; | |
| 9 | use Stewart\Contracts\Selector\Collection\SelectorCollection; | |
| 10 | use Stewart\Contracts\Selector\Selector; | |
| 11 | use Stewart\Contracts\State\Collection\EntityStateCollection; | |
| 12 | use Stewart\Support\State\CurrentStateReader; | |
| 13 | ||
| 14 | final readonly class RecordedStateReader implements CurrentStateReader | |
| 15 | { | |
| 16 | public function __construct( | |
| 17 | private RecordingHaContext $ha, | |
| 18 | private string|EntityId|Selector|SelectorCollection|EntityFilter $selector, | |
| 19 | ) {} | |
| 20 | ||
| 21 | public function readCurrentStates(): EntityStateCollection | |
| 22 | { | |
| 23 | return $this->ha->listStates($this->selector); | |
| 24 | } | |
| 25 | } |