Code Duplication    Length = 16-17 lines in 2 locations

packages/device-detection/src/class-user-agent-info.php 2 locations

@@ 585-601 (lines=17) @@
582
	 * - 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]
583
	 * - 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]
584
	 */
585
	public static function is_facebook_for_ipad() {
586
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
587
			return false;
588
		}
589
590
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
591
592
		if ( false === strpos( $ua, 'ipad' ) ) {
593
			return false;
594
		}
595
596
		if ( false !== strpos( $ua, 'facebook' ) || false !== strpos( $ua, 'fbforiphone' ) || false !== strpos( $ua, 'fban/fbios;' ) ) {
597
			return true;
598
		} else {
599
			return false;
600
		}
601
	}
602
603
	/**
604
	 *  Detects if the current UA is WordPress for iOS
@@ 978-993 (lines=16) @@
975
	 * Nokia Browser for Series 40 is a proxy based browser, previously known as Ovi Browser.
976
	 * This browser will report 'NokiaBrowser' in the header, however some older version will also report 'OviBrowser'.
977
	 */
978
	public static function is_symbian_s40_platform() {
979
980
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
981
			return false;
982
		}
983
984
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
985
986
		if ( strpos( $agent, 'series40' ) !== false ) {
987
			if ( strpos( $agent, 'nokia' ) !== false || strpos( $agent, 'ovibrowser' ) !== false || strpos( $agent, 'nokiabrowser' ) !== false ) {
988
				return true;
989
			}
990
		}
991
992
		return false;
993
	}
994
995
	/**
996
	 * Returns if the device belongs to J2ME capable family.