Code Duplication    Length = 10-14 lines in 4 locations

class.jetpack-user-agent.php 4 locations

@@ 1044-1057 (lines=14) @@
1041
	/*
1042
	 is_webkit() can be used to check the User Agent for an webkit generic browser
1043
	 */
1044
	static function is_webkit() {
1045
1046
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
1047
		return false;
1048
1049
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1050
1051
		$pos_webkit = strpos( $agent, 'webkit' );
1052
1053
		if ( $pos_webkit !== false )
1054
			return true;
1055
		else
1056
			return false;
1057
	}
1058
1059
    /**
1060
     * Detects if the current browser is the Native Android browser.
@@ 1134-1143 (lines=10) @@
1131
 	*
1132
 	* @return boolean true if the browser is Kindle monochrome Native browser otherwise false
1133
 	*/
1134
 	static function is_kindle_touch( ) {
1135
 		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
1136
 			return false;
1137
 		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1138
 		$pos_kindle_touch = strpos( $agent, 'kindle/3.0+' );
1139
 		if ( $pos_kindle_touch !== false && self::is_kindle_fire() === false )
1140
 			return true;
1141
 		else
1142
 			return false;
1143
 		}
1144
1145
1146
	// Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet)
@@ 1147-1157 (lines=11) @@
1144
1145
1146
	// Detect if user agent is the WordPress.com Windows 8 app (used ONLY on the custom oauth stylesheet)
1147
	static function is_windows8_auth( ) {
1148
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
1149
			return false;
1150
1151
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1152
		$pos = strpos( $agent, 'msauthhost' );
1153
		if ( $pos !== false )
1154
	   		return true;
1155
		else
1156
			return false;
1157
	}
1158
1159
	// Detect if user agent is the WordPress.com Windows 8 app.
1160
	static function is_wordpress_for_win8( ) {
@@ 1160-1170 (lines=11) @@
1157
	}
1158
1159
	// Detect if user agent is the WordPress.com Windows 8 app.
1160
	static function is_wordpress_for_win8( ) {
1161
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
1162
			return false;
1163
1164
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
1165
		$pos   = strpos( $agent, 'wp-windows8' );
1166
		if ( $pos !== false )
1167
			return true;
1168
		else
1169
			return false;
1170
	}
1171
1172
1173
	/*