Code Duplication    Length = 14-16 lines in 2 locations

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

@@ 822-835 (lines=14) @@
819
	 * The platform section will include 'Mobile' for phones and 'Tablet' for tablets.
820
	 *
821
	 */
822
	static function is_firefox_desktop() {
823
824
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
825
			return false;
826
		}
827
828
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
829
830
		if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) {
831
			return true;
832
		} else {
833
			return false;
834
		}
835
	}
836
837
	/*
838
	 * Detects if the current browser is FirefoxOS Native browser
@@ 1152-1167 (lines=16) @@
1149
		return false;
1150
	}
1151
1152
	static function is_J2ME_platform() {
1153
1154
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
1155
			return false;
1156
		}
1157
1158
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1159
1160
		if ( strpos( $agent, 'j2me/midp' ) !== false ) {
1161
			return true;
1162
		} elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) {
1163
			return true;
1164
		}
1165
1166
		return false;
1167
	}
1168
1169
1170
	/*