Skip to content

Commit

Permalink
fix: Fix typing.
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Jul 18, 2022
1 parent 2923f73 commit 95da1a1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/CachingIteratorAggregate.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ public function __construct(Iterator $iterator)
*/
public function getIterator(): Generator
{
foreach ($this->iterator->getCache() as [$key, $current]) {
/** @var array<int, array{0:TKey, 1:T}> $cache */
$cache = $this->iterator->getCache();

foreach ($cache as [$key, $current]) {
yield $key => $current;
}

Expand Down

0 comments on commit 95da1a1

Please sign in to comment.