Code Duplication    Length = 20-20 lines in 2 locations

src/BrowserDetector.php 2 locations

@@ 715-734 (lines=20) @@
712
     *
713
     * @return bool
714
     */
715
    public static function checkBrowserFirefox()
716
    {
717
        if (stripos(self::$userAgentString, 'safari') === false) {
718
            if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) {
719
                if (isset($matches[1])) {
720
                    self::$browser->setVersion($matches[1]);
721
                }
722
                self::$browser->setName(Browser::FIREFOX);
723
724
                return true;
725
            } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) {
726
                self::$browser->setVersion('');
727
                self::$browser->setName(Browser::FIREFOX);
728
729
                return true;
730
            }
731
        }
732
733
        return false;
734
    }
735
736
    /**
737
     * Determine if the browser is SeaMonkey.
@@ 741-760 (lines=20) @@
738
     *
739
     * @return bool
740
     */
741
    public static function checkBrowserSeaMonkey()
742
    {
743
        if (stripos(self::$userAgentString, 'safari') === false) {
744
            if (preg_match("/SeaMonkey[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) {
745
                if (isset($matches[1])) {
746
                    self::$browser->setVersion($matches[1]);
747
                }
748
                self::$browser->setName(Browser::SEAMONKEY);
749
750
                return true;
751
            } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) {
752
                self::$browser->setVersion('');
753
                self::$browser->setName(Browser::SEAMONKEY);
754
755
                return true;
756
            }
757
        }
758
759
        return false;
760
    }
761
762
    /**
763
     * Determine if the browser is Iceweasel.