Skip to content

Commit 8244a7c

Browse files
committed
refactor: remove variable
1 parent e79b338 commit 8244a7c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

system/Format/JSONFormatter.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,14 @@ public function format($data)
3434
{
3535
$config = new Format();
3636

37-
$jsonDepth = $config->jsonDepthOptions ?? 512;
38-
3937
$options = $config->formatterOptions['application/json'] ?? JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES;
4038
$options |= JSON_PARTIAL_OUTPUT_ON_ERROR;
4139

4240
if (ENVIRONMENT !== 'production') {
4341
$options |= JSON_PRETTY_PRINT;
4442
}
4543

46-
$result = json_encode($data, $options, $jsonDepth);
44+
$result = json_encode($data, $options, $config->jsonDepthOptions ?? 512);
4745

4846
if (! in_array(json_last_error(), [JSON_ERROR_NONE, JSON_ERROR_RECURSION], true)) {
4947
throw FormatException::forInvalidJSON(json_last_error_msg());

0 commit comments

Comments
 (0)