Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/AbstractValuedQueryResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function offsetExists($offset): bool
* @param mixed $offset
* @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\QueryMeta|mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (0 === $offset) {
Expand Down
1 change: 1 addition & 0 deletions src/AbstractValuedResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public function offsetExists($offset): bool
* @param mixed $offset
* @return \DCarbone\PHPConsulAPI\Error|mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (0 === $offset) {
Expand Down
1 change: 1 addition & 0 deletions src/AbstractValuedWriteResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public function offsetExists($offset): bool
* @param mixed $offset
* @return \DCarbone\PHPConsulAPI\Error|\DCarbone\PHPConsulAPI\WriteMeta|mixed|null
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if (0 === $offset) {
Expand Down
7 changes: 4 additions & 3 deletions src/FakeSlice.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public function append($value): void
/**
* @return \DCarbone\PHPConsulAPI\AbstractModel|false
*/
#[\ReturnTypeWillChange]
public function current()
{
return current($this->_list);
Expand All @@ -86,7 +87,7 @@ public function next(): void
/**
* @return int|null
*/
public function key()
public function key(): ?int
{
return key($this->_list);
}
Expand All @@ -108,7 +109,7 @@ public function rewind(): void
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return \is_int($offset) && isset($this->_list[$offset]);
}
Expand All @@ -117,7 +118,7 @@ public function offsetExists($offset)
* @param mixed $offset
* @return \DCarbone\PHPConsulAPI\AbstractModel|null
*/
public function offsetGet($offset)
public function offsetGet($offset): ?AbstractModel
{
$this->_validateOffset($offset);
if (isset($this->_list[$offset])) {
Expand Down
10 changes: 5 additions & 5 deletions src/Values.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public function toPsr7Array(): array
}

/**
* @return array|string
* @return array
*/
public function current()
public function current(): array
{
return current($this->values);
}
Expand Down Expand Up @@ -136,7 +136,7 @@ public function rewind(): void
* @param mixed $offset
* @return bool
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return isset($this->values[$offset]);
}
Expand All @@ -145,7 +145,7 @@ public function offsetExists($offset)
* @param string $offset
* @return string
*/
public function offsetGet($offset)
public function offsetGet($offset): string
{
return $this->get($offset);
}
Expand All @@ -170,7 +170,7 @@ public function offsetUnset($offset): void
/**
* @return array
*/
public function jsonSerialize()
public function jsonSerialize(): array
{
return $this->values;
}
Expand Down