Code Duplication    Length = 12-12 lines in 2 locations

class/phpbrowscap/Browscap.php 2 locations

@@ 660-671 (lines=12) @@
657
                                               $matches
658
                );
659
660
                if (!$countMatches) {
661
                    $tmpPatterns[$pattern] = $i;
662
                } else {
663
                    $compressedPattern = preg_replace(
664
                        self::REGEX_DELIMITER . '\d' . self::REGEX_DELIMITER,
665
                        '(\d)',
666
                                                      $pattern
667
                    );
668
669
                    if (!isset($tmpPatterns[$compressedPattern])) {
670
                        $tmpPatterns[$compressedPattern] = ['first' => $pattern];
671
                    }
672
673
                    $tmpPatterns[$compressedPattern][$i] = $matches[0];
674
                }
@@ 769-780 (lines=12) @@
766
                                               $matches
767
                );
768
769
                if (!$countMatches) {
770
                    $tmpPatterns[$pattern] = $i;
771
                } else {
772
                    $compressedPattern = preg_replace(
773
                        self::REGEX_DELIMITER . '\d' . self::REGEX_DELIMITER,
774
                        '(\d)',
775
                                                      $pattern
776
                    );
777
778
                    if (!isset($tmpPatterns[$compressedPattern])) {
779
                        $tmpPatterns[$compressedPattern] = ['first' => $pattern];
780
                    }
781
782
                    $tmpPatterns[$compressedPattern][$i] = $matches[0];
783
                }