src/Internal/JsonDecodeReader.php 1 location
|
@@ 370-380 (lines=11) @@
|
| 367 |
|
* @param mixed $element |
| 368 |
|
* @param string $type |
| 369 |
|
*/ |
| 370 |
|
private function push($element, $type = null): void |
| 371 |
|
{ |
| 372 |
|
if (null === $type) { |
| 373 |
|
$type = gettype($element); |
| 374 |
|
} |
| 375 |
|
|
| 376 |
|
$this->stack[$this->stackSize] = $element; |
| 377 |
|
$this->stackTypes[$this->stackSize] = $type; |
| 378 |
|
$this->stackSize++; |
| 379 |
|
$this->currentToken = null; |
| 380 |
|
} |
| 381 |
|
|
| 382 |
|
/** |
| 383 |
|
* Pop the last element off the stack and return it |
src/Internal/JsonElementReader.php 1 location
|
@@ 374-384 (lines=11) @@
|
| 371 |
|
* @param JsonElement|Iterator $element |
| 372 |
|
* @param string $type |
| 373 |
|
*/ |
| 374 |
|
private function push($element, $type = null): void |
| 375 |
|
{ |
| 376 |
|
if (null === $type) { |
| 377 |
|
$type = get_class($element); |
| 378 |
|
} |
| 379 |
|
|
| 380 |
|
$this->stack[$this->stackSize] = $element; |
| 381 |
|
$this->stackTypes[$this->stackSize] = $type; |
| 382 |
|
$this->stackSize++; |
| 383 |
|
$this->currentToken = null; |
| 384 |
|
} |
| 385 |
|
|
| 386 |
|
/** |
| 387 |
|
* Pop the last element off the stack and return it |