Code Duplication    Length = 14-18 lines in 3 locations

src/BrowserDetector.php 3 locations

@@ 532-545 (lines=14) @@
529
     *
530
     * @return bool
531
     */
532
    public static function checkBrowserPhoenix()
533
    {
534
        if (stripos(self::$userAgentString, 'Phoenix') !== false) {
535
            $aversion = explode('/', stristr(self::$userAgentString, 'Phoenix'));
536
            if (isset($aversion[1])) {
537
                self::$browser->setVersion($aversion[1]);
538
            }
539
            self::$browser->setName(Browser::PHOENIX);
540
541
            return true;
542
        }
543
544
        return false;
545
    }
546
547
    /**
548
     * Determine if the browser is Firebird.
@@ 552-565 (lines=14) @@
549
     *
550
     * @return bool
551
     */
552
    public static function checkBrowserFirebird()
553
    {
554
        if (stripos(self::$userAgentString, 'Firebird') !== false) {
555
            $aversion = explode('/', stristr(self::$userAgentString, 'Firebird'));
556
            if (isset($aversion[1])) {
557
                self::$browser->setVersion($aversion[1]);
558
            }
559
            self::$browser->setName(Browser::FIREBIRD);
560
561
            return true;
562
        }
563
564
        return false;
565
    }
566
567
    /**
568
     * Determine if the browser is Netscape Navigator 9+.
@@ 862-879 (lines=18) @@
859
     *
860
     * @return bool
861
     */
862
    public static function checkBrowserAndroid()
863
    {
864
        // Navigator
865
        if (stripos(self::$userAgentString, 'Android') !== false) {
866
            if (preg_match('/Version\/([\d\.]*)/i', self::$userAgentString, $matches)) {
867
                if (isset($matches[1])) {
868
                    self::$browser->setVersion($matches[1]);
869
                }
870
            } else {
871
                self::$browser->setVersion(Browser::VERSION_UNKNOWN);
872
            }
873
            self::$browser->setName(Browser::NAVIGATOR);
874
875
            return true;
876
        }
877
878
        return false;
879
    }
880
}
881