Skip to content

Commit 996f0ab

Browse files
committed
Add to json method
1 parent 529da10 commit 996f0ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Traverse.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@ public function valid(string $method, array $args = []): bool
197197
* @param int $depth
198198
* @return string|false
199199
*/
200-
public function toJson(mixed $value, int $flags = 0, int $depth = 512): string|false
200+
public function toJson(int $flags = 0, int $depth = 512): string|false
201201
{
202-
return json_encode($value, $flags, $depth);
202+
return json_encode($this->get(), $flags, $depth);
203203
}
204204

205205
/**

0 commit comments

Comments
 (0)