Code Duplication    Length = 20-20 lines in 2 locations

src/BrowserDetector.php 2 locations

@@ 755-774 (lines=20) @@
752
     *
753
     * @return bool
754
     */
755
    public static function checkBrowserFirefox()
756
    {
757
        if (stripos(self::$userAgentString, 'safari') === false) {
758
            if (preg_match("/Firefox[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) {
759
                if (isset($matches[1])) {
760
                    self::$browser->setVersion($matches[1]);
761
                }
762
                self::$browser->setName(Browser::FIREFOX);
763
764
                return true;
765
            } elseif (preg_match('/Firefox$/i', self::$userAgentString, $matches)) {
766
                self::$browser->setVersion('');
767
                self::$browser->setName(Browser::FIREFOX);
768
769
                return true;
770
            }
771
        }
772
773
        return false;
774
    }
775
776
    /**
777
     * Determine if the browser is SeaMonkey.
@@ 781-800 (lines=20) @@
778
     *
779
     * @return bool
780
     */
781
    public static function checkBrowserSeaMonkey()
782
    {
783
        if (stripos(self::$userAgentString, 'safari') === false) {
784
            if (preg_match("/SeaMonkey[\/ \(]([^ ;\)]+)/i", self::$userAgentString, $matches)) {
785
                if (isset($matches[1])) {
786
                    self::$browser->setVersion($matches[1]);
787
                }
788
                self::$browser->setName(Browser::SEAMONKEY);
789
790
                return true;
791
            } elseif (preg_match('/SeaMonkey$/i', self::$userAgentString, $matches)) {
792
                self::$browser->setVersion('');
793
                self::$browser->setName(Browser::SEAMONKEY);
794
795
                return true;
796
            }
797
        }
798
799
        return false;
800
    }
801
802
    /**
803
     * Determine if the browser is Iceweasel.