Skip to content

Commit 8ea1768

Browse files
committed
Add return type
1 parent d13229f commit 8ea1768

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Redis/Response/CursorResponse.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ public function __construct(int $cursorId, int $totalCount, array $items, int $s
7878
/**
7979
* @return array<AggregateResponseItem>
8080
*/
81-
public function current()
81+
public function current(): mixed
8282
{
8383
if ($this->doNext) {
8484
if (!($this->getClient() instanceof Client)) {
@@ -121,7 +121,7 @@ public function getPageCount(): int
121121
return (int) ceil($this->totalCount / $this->size);
122122
}
123123

124-
public function key()
124+
public function key(): mixed
125125
{
126126
if (0 === $this->size) {
127127
return 0;
@@ -130,7 +130,7 @@ public function key()
130130
return (int) ceil($this->offset / $this->size) + 1;
131131
}
132132

133-
public function valid()
133+
public function valid(): bool
134134
{
135135
return $this->offset + count($this->items) < $this->totalCount && $this->cursorId > 0;
136136
}
@@ -145,7 +145,7 @@ public function getTotalCount(): int
145145
return $this->totalCount;
146146
}
147147

148-
public function count()
148+
public function count(): int
149149
{
150150
return $this->getPageCount();
151151
}

src/Redis/Response/PaginatedResponse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function __construct(PaginatedCommand $command, int $totalCount, array $i
6666
/**
6767
* @return array<ResponseItem>
6868
*/
69-
public function current(): array
69+
public function current(): mixed
7070
{
7171
if ($this->requestedOffset === ($this->lastCommand->getOffset() ?? 0) && ($this->requestedSize === $this->getPageSize())) {
7272
$this->requestedOffset = null;
@@ -101,7 +101,7 @@ public function getPageCount(): int
101101
return (int) ceil($this->totalCount / $this->getPageSize());
102102
}
103103

104-
public function key(): int
104+
public function key(): mixed
105105
{
106106
if (0 === $this->getPageSize()) {
107107
return 0;

0 commit comments

Comments
 (0)