Code Duplication    Length = 13-15 lines in 2 locations

class.jetpack-user-agent.php 2 locations

@@ 567-579 (lines=13) @@
564
	 * Ver 5.0 or Higher - Mozilla/5.0 (iPad; CPU OS 5_1_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Mobile/9B206 Twitter for iPhone
565
	 *
566
	 */
567
	static function is_twitter_for_ipad( ) {
568
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
569
			return false;
570
571
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
572
573
		if ( strpos( $ua, 'twitter for ipad' ) !== false )
574
			return true;
575
		elseif( strpos( $ua, 'ipad' ) !== false && strpos( $ua, 'twitter for iphone' ) !== false )
576
			return true;
577
		else
578
			return false;
579
	}
580
581
582
	/*
@@ 980-994 (lines=15) @@
977
	    return false;
978
	}
979
980
	static function is_J2ME_platform() {
981
982
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) )
983
			return false;
984
985
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
986
987
		if ( strpos( $agent, 'j2me/midp' ) !== false ) {
988
			return true;
989
		} elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) {
990
			return true;
991
		}
992
993
	    return false;
994
	}
995
996
997
	/*