Optimize native function calls

This commit is contained in:
Andrea Marco Sartori 2023-01-24 17:30:13 +10:00
parent 18ea75da4b
commit 898e1feff0
13 changed files with 34 additions and 0 deletions

View File

@ -2,6 +2,9 @@
namespace Cerbero\JsonParser\Concerns;
use function is_array;
use function in_array;
/**
* The trait to detect endpoints.
*

View File

@ -4,6 +4,8 @@ namespace Cerbero\JsonParser\Decoders;
use Cerbero\JsonParser\Config;
use function call_user_func;
/**
* The configurable decoder.
*

View File

@ -7,6 +7,11 @@ use Cerbero\JsonParser\Tree;
use Closure;
use Stringable;
use function count;
use function call_user_func;
use function is_int;
use function array_slice;
/**
* The JSON pointer.
*

View File

@ -4,6 +4,8 @@ namespace Cerbero\JsonParser\Pointers;
use Cerbero\JsonParser\Tree;
use function count;
/**
* The JSON pointers collection.
*

View File

@ -2,6 +2,8 @@
namespace Cerbero\JsonParser;
use function is_null;
/**
* The parsing progress.
*

View File

@ -8,6 +8,8 @@ use Psr\Http\Message\ResponseInterface;
use Psr\Http\Message\UriInterface;
use Traversable;
use function is_string;
/**
* The endpoint source.
*

View File

@ -4,6 +4,8 @@ namespace Cerbero\JsonParser\Sources;
use Traversable;
use function is_string;
/**
* The filename source.
*

View File

@ -4,6 +4,9 @@ namespace Cerbero\JsonParser\Sources;
use Traversable;
use function is_array;
use function count;
/**
* The iterable source.
*

View File

@ -5,6 +5,9 @@ namespace Cerbero\JsonParser\Sources;
use Cerbero\JsonParser\Concerns\DetectsEndpoints;
use Traversable;
use function is_string;
use function strlen;
/**
* The JSON source.
*

View File

@ -4,6 +4,9 @@ namespace Cerbero\JsonParser\Sources;
use Traversable;
use function is_string;
use function is_resource;
/**
* The resource source.
*

View File

@ -5,6 +5,8 @@ namespace Cerbero\JsonParser\Sources;
use Psr\Http\Message\StreamInterface;
use Traversable;
use function in_array;
/**
* The PSR-7 stream source.
*

View File

@ -6,6 +6,8 @@ use Cerbero\JsonParser\Pointers\Pointer;
use Cerbero\JsonParser\Pointers\Pointers;
use Cerbero\JsonParser\Tokens\Token;
use function is_string;
/**
* The JSON parsing state.
*

View File

@ -2,6 +2,9 @@
namespace Cerbero\JsonParser;
use function is_int;
use function is_string;
/**
* The JSON tree.
*