Code Duplication    Length = 14-14 lines in 2 locations

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

@@ 729-742 (lines=14) @@
726
	 * - 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]
727
	 * - 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]
728
	 */
729
	static function is_facebook_for_ipad() {
730
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
731
			return false;
732
		}
733
734
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
735
736
		if ( false === strpos( $ua, 'ipad' ) ) {
737
			return false;
738
		}
739
740
		if ( false !== strpos( $ua, 'facebook' ) || false !== strpos( $ua, 'fbforiphone' ) || false !== strpos( $ua, 'fban/fbios;' ) ) {
741
			return true;
742
		} else {
743
			return false;
744
		}
745
	}
@@ 1135-1148 (lines=14) @@
1132
	 * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'.
1133
	 *
1134
	 */
1135
	static function is_symbian_s40_platform() {
1136
1137
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
1138
			return false;
1139
		}
1140
1141
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1142
1143
		if ( strpos( $agent, 'series40' ) !== false ) {
1144
			if ( strpos( $agent, 'nokia' ) !== false || strpos( $agent, 'ovibrowser' ) !== false || strpos( $agent, 'nokiabrowser' ) !== false ) {
1145
				return true;
1146
			}
1147
		}
1148
1149
		return false;
1150
	}
1151