Skip to content

Commit 8e003c0

Browse files
committed
Pass key to callback in CallbackIterator
1 parent 4d21326 commit 8e003c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Model/CallbackIterator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function __construct(Traversable $traversable, Closure $callback)
4949
#[ReturnTypeWillChange]
5050
public function current()
5151
{
52-
return ($this->callback)($this->iterator->current());
52+
return ($this->callback)($this->iterator->current(), $this->iterator->key());
5353
}
5454

5555
/**

0 commit comments

Comments
 (0)