Lines
0.00%
0 / 3
Methods
0.00%
0 / 3
Classes
0.00%
0 / 1
| Name | Lines | Methods | CRAP | ||||
|---|---|---|---|---|---|---|---|
| __construct | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| isLast | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| fromReply | 0.00% | 0 / 1 | 0.00% | 0 / 1 | 2 | ||
| 7 | final readonly class ScanPage | |
| 8 | { | |
| 9 | /** @param list<string> $keys */ | |
| 10 | public function __construct( | |
| 11 | public string $cursor, | |
| 12 | public array $keys, | |
| 13 | ) {} | |
| 14 | ||
| 15 | public function isLast(): bool | |
| 16 | { | |
| 17 | return $this->cursor === '0'; | |
| 18 | } | |
| 19 | ||
| 20 | public static function fromReply(mixed $reply): self | |
| 21 | { | |
| 22 | /** @var array{string, list<string>} $reply */ | |
| 23 | return new self($reply[0], $reply[1]); | |
| 24 | } | |
| 25 | } |