Code Duplication    Length = 11-11 lines in 2 locations

src/CMPayments/JsonLint/JsonLinter.php 2 locations

@@ 524-534 (lines=11) @@
521
                        $e->setJsonColumnNo($this->lexer->yColumnNo);
522
523
                        throw $e;
524
                    } elseif (($this->flags & self::ALLOW_DUPLICATE_KEYS) && isset($tokens[$len - 2][$key])) {
525
526
                        $duplicateCount = 1;
527
528
                        do {
529
530
                            $duplicateKey = $key . '.' . $duplicateCount++;
531
                        } while (isset($tokens[$len - 2][$duplicateKey]));
532
533
                        $key = $duplicateKey;
534
                    }
535
536
                    $tokens[$len - 2][$key] = $tokens[$len][1];
537
                } else {
@@ 552-562 (lines=11) @@
549
                        $e->setJsonColumnNo($this->lexer->yColumnNo);
550
551
                        throw $e;
552
                    } elseif (($this->flags & self::ALLOW_DUPLICATE_KEYS) && isset($tokens[$len - 2]->{$key})) {
553
554
                        $duplicateCount = 1;
555
556
                        do {
557
558
                            $duplicateKey = $key . '.' . $duplicateCount++;
559
                        } while (isset($tokens[$len - 2]->$duplicateKey));
560
561
                        $key = $duplicateKey;
562
                    }
563
564
                    $tokens[$len - 2]->$key = $tokens[$len][1];
565
                }