Code Duplication    Length = 20-20 lines in 2 locations

src/BrowserDetector.php 2 locations

@@ 772-791 (lines=20) @@
769
     *
770
     * @return bool
771
     */
772
    public static function checkBrowserFirefox()
773
    {
774
        if (stripos(self::$userAgentString, 'safari') === false) {
775
            if (preg_match("/Firefox[\\/ \\(]([^ ;\\)]+)/i", self::$userAgentString, $matches)) {
776
                if (isset($matches[1])) {
777
                    self::$browser->setVersion($matches[1]);
778
                }
779
                self::$browser->setName(Browser::FIREFOX);
780
781
                return true;
782
            } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) {
783
                self::$browser->setVersion('');
784
                self::$browser->setName(Browser::FIREFOX);
785
786
                return true;
787
            }
788
        }
789
790
        return false;
791
    }
792
793
    /**
794
     * Determine if the browser is SeaMonkey.
@@ 798-817 (lines=20) @@
795
     *
796
     * @return bool
797
     */
798
    public static function checkBrowserSeaMonkey()
799
    {
800
        if (stripos(self::$userAgentString, 'safari') === false) {
801
            if (preg_match("/SeaMonkey[\\/ \\(]([^ ;\\)]+)/i", self::$userAgentString, $matches)) {
802
                if (isset($matches[1])) {
803
                    self::$browser->setVersion($matches[1]);
804
                }
805
                self::$browser->setName(Browser::SEAMONKEY);
806
807
                return true;
808
            } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) {
809
                self::$browser->setVersion('');
810
                self::$browser->setName(Browser::SEAMONKEY);
811
812
                return true;
813
            }
814
        }
815
816
        return false;
817
    }
818
819
    /**
820
     * Determine if the browser is Iceweasel.