[REF][PHP8.1] Add in type hints to fix deprecations and add in #[\ReturnTypeWillChang...
[civicrm-core.git] / Civi / Api4 / Service / Spec / RequestSpec.php
index 7899ebe46ef65e5a33bcc1e3b7ff61e95fd91ffb..c18381c1ebb1a4288e9e95e9c57b140df6fca722 100644 (file)
@@ -176,23 +176,26 @@ class RequestSpec implements \Iterator {
     return $this->action;
   }
 
+  #[\ReturnTypeWillChange]
   public function rewind() {
     return reset($this->fields);
   }
 
+  #[\ReturnTypeWillChange]
   public function current() {
     return current($this->fields);
   }
 
+  #[\ReturnTypeWillChange]
   public function key() {
     return key($this->fields);
   }
 
-  public function next() {
-    return next($this->fields);
+  public function next(): void {
+    next($this->fields);
   }
 
-  public function valid() {
+  public function valid(): bool {
     return key($this->fields) !== NULL;
   }