From 7dfa85369633669d9694cbc79db005268718f15a Mon Sep 17 00:00:00 2001 From: Chris Wright Date: Wed, 31 May 2017 17:37:55 +0100 Subject: [PATCH] Use function FQNs everywhere --- src/functions.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/functions.php b/src/functions.php index f967d4c..f493df9 100644 --- a/src/functions.php +++ b/src/functions.php @@ -48,9 +48,6 @@ function encode($value, int $options = 0, int $depth = 512) namespace { - use function ExceptionalJSON\decode; - use function ExceptionalJSON\encode; - if (!function_exists('json_try_decode')) { /** * Decodes a JSON string. @@ -64,7 +61,7 @@ function encode($value, int $options = 0, int $depth = 512) */ function json_try_decode(string $json, bool $assoc = false, int $depth = 512, int $options = 0) { - return decode($json, $assoc, $depth, $options); + return \ExceptionalJSON\decode($json, $assoc, $depth, $options); } } @@ -80,7 +77,7 @@ function json_try_decode(string $json, bool $assoc = false, int $depth = 512, in */ function json_try_encode($value, int $options = 0, int $depth = 512) { - return encode($value, $options, $depth); + return \ExceptionalJSON\encode($value, $options, $depth); } } }