diff --git a/src/Expectation.php b/src/Expectation.php index 8dc287a0..300820c1 100644 --- a/src/Expectation.php +++ b/src/Expectation.php @@ -125,8 +125,8 @@ final class Expectation } if (is_callable($callback)) { - foreach ($this->value as $item) { - $callback(new self($item)); + foreach ($this->value as $key => $item) { + $callback(new self($item), $key); } }