diff program/lib/Roundcube/rcube_result_set.php @ 22:303b85d5b561

More cleaning up php8 Warnings/deprecations
author Charlie Root
date Wed, 15 Oct 2025 14:06:27 -0400
parents 4681f974d28b
children bea5a38be938
line wrap: on
line diff
--- a/program/lib/Roundcube/rcube_result_set.php	Thu Oct 09 11:31:41 2025 -0400
+++ b/program/lib/Roundcube/rcube_result_set.php	Wed Oct 15 14:06:27 2025 -0400
@@ -63,7 +63,7 @@
 
     /*** Implement PHP ArrayAccess interface ***/
 
-    public function offsetSet($offset, $value)
+    public function offsetSet(mixed $offset,mixed $value): void
     {
         if (is_null($offset)) {
             $offset = count($this->records);
@@ -74,12 +74,12 @@
         }
     }
 
-    public function offsetExists($offset)
+    public function offsetExists(mixed $offset): bool
     {
         return isset($this->records[$offset]);
     }
 
-    public function offsetUnset($offset)
+    public function offsetUnset(mixed $offset): void
     {
         unset($this->records[$offset]);
     }
@@ -91,27 +91,28 @@
 
     /***  PHP 5 Iterator interface  ***/
 
-    function rewind()
+    function rewind(): void
     {
         $this->current = 0;
     }
 
-    function current()
+    function current(): mixed
     {
         return $this->records[$this->current];
     }
 
-    function key()
+    function key(): mixed
     {
         return $this->current;
     }
 
+    #[ReturnTypeWillChange]
     function next()
     {
         return $this->iterate();
     }
 
-    function valid()
+    function valid(): bool
     {
         return isset($this->records[$this->current]);
     }