Code Duplication    Length = 11-11 lines in 2 locations

src/Internal/JsonDecodeReader.php 1 location

@@ 235-245 (lines=11) @@
232
     * @param mixed $element
233
     * @param string $type
234
     */
235
    protected function push($element, $type = null): void
236
    {
237
        if (null === $type) {
238
            $type = gettype($element);
239
        }
240
241
        $this->stack[$this->stackSize] = $element;
242
        $this->stackTypes[$this->stackSize] = $type;
243
        $this->stackSize++;
244
        $this->currentToken = null;
245
    }
246
}
247

src/Internal/JsonElementReader.php 1 location

@@ 238-248 (lines=11) @@
235
     * @param JsonElement|Iterator $element
236
     * @param string $type
237
     */
238
    protected function push($element, $type = null): void
239
    {
240
        if (null === $type) {
241
            $type = get_class($element);
242
        }
243
244
        $this->stack[$this->stackSize] = $element;
245
        $this->stackTypes[$this->stackSize] = $type;
246
        $this->stackSize++;
247
        $this->currentToken = null;
248
    }
249
}
250