Pass JSON Parser instance to the traverse callback

This commit is contained in:
Andrea Marco Sartori 2023-01-16 17:00:21 +10:00
parent 13255eda6d
commit 5308163097

View File

@ -152,7 +152,7 @@ final class JsonParser implements IteratorAggregate
$callback ??= fn () => true; $callback ??= fn () => true;
foreach ($this as $key => $value) { foreach ($this as $key => $value) {
$callback($value, $key); $callback($value, $key, $this);
} }
} }