Skip to content

Commit

Permalink
refactor: Minor update in ArrayCacheIterator::valid().
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Dec 17, 2020
1 parent 1e843a3 commit 1ed8a16
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Iterator/ArrayCacheIterator.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ public function rewind(): void

public function valid(): bool
{
if (parent::valid()) {
return true;
}

return array_key_exists($this->key, $this->cache);
return parent::valid() || array_key_exists($this->key, $this->cache);
}

/**
Expand Down

0 comments on commit 1ed8a16

Please sign in to comment.