Code Duplication    Length = 14-14 lines in 2 locations

packages/device-detection/src/class-device-detection.php 2 locations

@@ 669-682 (lines=14) @@
666
	 * - Mozilla/5.0 (iPad; U; CPU iPhone OS 5_0 like Mac OS X; en_US) AppleWebKit (KHTML, like Gecko) Mobile [FBAN/FBForIPhone;FBAV/4.0.2;FBBV/4020.0;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/5.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US;FBSF/1.0]
667
	 * - Mozilla/5.0 (iPad; CPU OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Mobile/10A403 [FBAN/FBIOS;FBAV/5.0;FBBV/47423;FBDV/iPad2,1;FBMD/iPad;FBSN/iPhone OS;FBSV/6.0;FBSS/1; FBCR/;FBID/tablet;FBLC/en_US]
668
	 */
669
	static function is_facebook_for_ipad() {
670
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
671
			return false;
672
		}
673
674
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
675
676
		if ( false === strpos( $ua, 'ipad' ) ) {
677
			return false;
678
		}
679
680
		if ( false !== strpos( $ua, 'facebook' ) || false !== strpos( $ua, 'fbforiphone' ) || false !== strpos( $ua, 'fban/fbios;' ) ) {
681
			return true;
682
		} else {
683
			return false;
684
		}
685
	}
@@ 1075-1088 (lines=14) @@
1072
	 * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'.
1073
	 *
1074
	 */
1075
	static function is_symbian_s40_platform() {
1076
1077
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
1078
			return false;
1079
		}
1080
1081
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1082
1083
		if ( strpos( $agent, 'series40' ) !== false ) {
1084
			if ( strpos( $agent, 'nokia' ) !== false || strpos( $agent, 'ovibrowser' ) !== false || strpos( $agent, 'nokiabrowser' ) !== false ) {
1085
				return true;
1086
			}
1087
		}
1088
1089
		return false;
1090
	}
1091