more php 8.1 updates

This commit is contained in:
Brad Dutton
2022-05-13 18:44:19 -07:00
parent 09f97599ec
commit 9e8317d4d2
11 changed files with 54 additions and 49 deletions
+10 -9
View File
@@ -168,7 +168,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* Countable: count
*/
public function count()
public function count(): int
{
return $this->result->count();
}
@@ -176,7 +176,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* Iterator: current
*/
public function current()
public function current(): mixed
{
if ($row = $this->result->current())
{
@@ -192,7 +192,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* Iterator: key
*/
public function key()
public function key(): mixed
{
return $this->result->key();
}
@@ -200,15 +200,15 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* Iterator: next
*/
public function next()
public function next(): void
{
return $this->result->next();
$this->result->next();
}
/**
* Iterator: rewind
*/
public function rewind()
public function rewind(): void
{
$this->result->rewind();
}
@@ -216,7 +216,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* Iterator: valid
*/
public function valid()
public function valid(): bool
{
return $this->result->valid();
}
@@ -224,7 +224,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* ArrayAccess: offsetExists
*/
public function offsetExists($offset)
public function offsetExists($offset): bool
{
return $this->result->offsetExists($offset);
}
@@ -232,6 +232,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
/**
* ArrayAccess: offsetGet
*/
#[\ReturnTypeWillChange]
public function offsetGet($offset)
{
if ($this->result->offsetExists($offset))
@@ -248,7 +249,7 @@ class ORM_Iterator_Core implements Iterator, ArrayAccess, Countable {
*
* @throws Kohana_Database_Exception
*/
public function offsetSet($offset, $value)
public function offsetSet($offset, $value): void
{
throw new Kohana_Database_Exception('database.result_read_only');
}