src/Internal/JsonDecodeReader.php 1 location
|
@@ 344-354 (lines=11) @@
|
| 341 |
|
* @param mixed $element |
| 342 |
|
* @param string $type |
| 343 |
|
*/ |
| 344 |
|
private function push($element, $type = null): void |
| 345 |
|
{ |
| 346 |
|
if (null === $type) { |
| 347 |
|
$type = gettype($element); |
| 348 |
|
} |
| 349 |
|
|
| 350 |
|
$this->stack[$this->stackSize] = $element; |
| 351 |
|
$this->stackTypes[$this->stackSize] = $type; |
| 352 |
|
$this->stackSize++; |
| 353 |
|
$this->currentToken = null; |
| 354 |
|
} |
| 355 |
|
|
| 356 |
|
/** |
| 357 |
|
* Pop the last element off the stack and return it |
src/Internal/JsonElementReader.php 1 location
|
@@ 347-357 (lines=11) @@
|
| 344 |
|
* @param JsonElement|Iterator $element |
| 345 |
|
* @param string $type |
| 346 |
|
*/ |
| 347 |
|
private function push($element, $type = null): void |
| 348 |
|
{ |
| 349 |
|
if (null === $type) { |
| 350 |
|
$type = get_class($element); |
| 351 |
|
} |
| 352 |
|
|
| 353 |
|
$this->stack[$this->stackSize] = $element; |
| 354 |
|
$this->stackTypes[$this->stackSize] = $type; |
| 355 |
|
$this->stackSize++; |
| 356 |
|
$this->currentToken = null; |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
/** |
| 360 |
|
* Pop the last element off the stack and return it |