mirror of
https://github.com/cerbero90/json-parser.git
synced 2025-07-07 15:32:59 +02:00
Call method directly
This commit is contained in:
@ -148,9 +148,8 @@ final class State
|
|||||||
{
|
{
|
||||||
$treeChanged = false;
|
$treeChanged = false;
|
||||||
$shouldTrackTree = $this->pointer == '' || $this->tree->depth() < $this->pointer->depth();
|
$shouldTrackTree = $this->pointer == '' || $this->tree->depth() < $this->pointer->depth();
|
||||||
$tokenIsValue = $token->isValue();
|
|
||||||
|
|
||||||
if ($shouldTrackTree && $tokenIsValue && !$this->inObject()) {
|
if ($shouldTrackTree && $token->isValue() && !$this->inObject()) {
|
||||||
$this->tree->traverseArray($this->pointer->referenceTokens());
|
$this->tree->traverseArray($this->pointer->referenceTokens());
|
||||||
$treeChanged = true;
|
$treeChanged = true;
|
||||||
}
|
}
|
||||||
@ -166,7 +165,7 @@ final class State
|
|||||||
|
|
||||||
$shouldBuffer = $this->tree->depth() >= 0
|
$shouldBuffer = $this->tree->depth() >= 0
|
||||||
&& $this->pointer->matchesTree($this->tree)
|
&& $this->pointer->matchesTree($this->tree)
|
||||||
&& (($tokenIsValue && !$this->expectsKey) || $this->treeIsDeep());
|
&& ((!$this->expectsKey && $token->isValue()) || $this->treeIsDeep());
|
||||||
|
|
||||||
if ($shouldBuffer) {
|
if ($shouldBuffer) {
|
||||||
$this->buffer .= $token;
|
$this->buffer .= $token;
|
||||||
|
Reference in New Issue
Block a user