Code Duplication    Length = 10-10 lines in 2 locations

src/Internal/JsonDecodeReader.php 1 location

@@ 420-429 (lines=10) @@
417
    /**
418
     * Increment the path index. This should be called any time a new value is parsed.
419
     */
420
    private function incrementPathIndex(): void
421
    {
422
        $index = $this->stackSize - 1;
423
        if ($index >= 0) {
424
            if (!isset($this->pathIndices[$index])) {
425
                $this->pathIndices[$index] = 0;
426
            }
427
            $this->pathIndices[$index]++;
428
        }
429
    }
430
}
431

src/Internal/JsonElementReader.php 1 location

@@ 424-433 (lines=10) @@
421
    /**
422
     * Increment the path index. This should be called any time a new value is parsed.
423
     */
424
    private function incrementPathIndex(): void
425
    {
426
        $index = $this->stackSize - 1;
427
        if ($index >= 0) {
428
            if (!isset($this->pathIndices[$index])) {
429
                $this->pathIndices[$index] = 0;
430
            }
431
            $this->pathIndices[$index]++;
432
        }
433
    }
434
}
435