From 086d719dc61d2c531e0b9fa51678b8e2f34dafdb Mon Sep 17 00:00:00 2001 From: Asko Nõmm Date: Fri, 15 Nov 2024 17:22:24 +0200 Subject: Improve tests. --- src/Format.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/Format.php') diff --git a/src/Format.php b/src/Format.php index 33e986b..4517e0a 100644 --- a/src/Format.php +++ b/src/Format.php @@ -43,7 +43,7 @@ enum Format /** @var string $trace_line */ $trace_line = $message->trace['line']; - $json = json_encode([ + return json_encode([ 'date' => $dateTime->format('Y-m-d H:i:s'), 'level' => strtoupper($message->level->value), 'message' => $message->content, @@ -53,12 +53,6 @@ enum Format 'line' => $trace_line, ], ]); - - if ($json === false) { - return ''; - } - - return $json; } /** -- cgit v1.2.3