Code Duplication    Length = 11-11 lines in 2 locations

src/Internal/JsonDecodeReader.php 1 location

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

src/Internal/JsonElementReader.php 1 location

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