Skip to content

Commit

Permalink
Merge pull request #5807 from Soean/5806
Browse files Browse the repository at this point in the history
  • Loading branch information
swissspidy committed Jun 21, 2023
2 parents ad16e53 + 8871acd commit 90be24d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions php/WP_CLI/Iterators/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,19 +88,23 @@ private function load_items_from_db() {
return true;
}

#[\ReturnTypeWillChange]
public function current() {
return $this->results[ $this->index_in_results ];
}

#[\ReturnTypeWillChange]
public function key() {
return $this->global_index;
}

#[\ReturnTypeWillChange]
public function next() {
$this->index_in_results++;
$this->global_index++;
}

#[\ReturnTypeWillChange]
public function rewind() {
$this->results = [];
$this->global_index = 0;
Expand All @@ -109,6 +113,7 @@ public function rewind() {
$this->depleted = false;
}

#[\ReturnTypeWillChange]
public function valid() {
if ( $this->depleted ) {
return false;
Expand Down

0 comments on commit 90be24d

Please sign in to comment.