Skip to content

Commit 8bd1358

Browse files
committed
- chore: simplify FQN
1 parent 25daf60 commit 8bd1358

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Serializer/JsonSerializer.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
namespace Koded\Stdlib\Serializer;
1313

14+
use JsonException;
1415
use Koded\Stdlib\Serializer;
1516
use function Koded\Stdlib\error_log;
1617

@@ -51,7 +52,7 @@ public function serialize(mixed $value): ?string
5152
{
5253
try {
5354
return json_encode($value, $this->options);
54-
} catch (\JsonException $e) {
55+
} catch (JsonException $e) {
5556
error_log(__METHOD__, $e->getMessage(), $value);
5657
return '';
5758
}
@@ -66,7 +67,7 @@ public function unserialize(string $value): mixed
6667
| JSON_BIGINT_AS_STRING
6768
| JSON_THROW_ON_ERROR);
6869

69-
} catch (\JsonException $e) {
70+
} catch (JsonException $e) {
7071
error_log(__METHOD__, $e->getMessage(), $value);
7172
return '';
7273
}

0 commit comments

Comments
 (0)