Code Duplication    Length = 14-18 lines in 3 locations

src/BrowserDetector.php 3 locations

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