Skip to content

Commit

Permalink
Use function FQNs everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveRandom committed May 31, 2017
1 parent bf1fe4f commit 7dfa853
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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);
}
}

Expand All @@ -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);
}
}
}

0 comments on commit 7dfa853

Please sign in to comment.