Code Duplication    Length = 14-16 lines in 2 locations

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

@@ 629-642 (lines=14) @@
626
		* The platform section will include 'Mobile' for phones and 'Tablet' for tablets.
627
		*
628
		*/
629
	static function is_firefox_desktop() {
630
631
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
632
			return false;
633
		}
634
635
		$ua = strtolower( $_SERVER['HTTP_USER_AGENT'] );
636
637
		if ( false !== strpos( $ua, 'firefox' ) && false === strpos( $ua, 'mobile' ) && false === strpos( $ua, 'tablet' ) ) {
638
			return true;
639
		} else {
640
			return false;
641
		}
642
	}
643
644
	/*
645
		* Detects if the current browser is FirefoxOS Native browser
@@ 959-974 (lines=16) @@
956
		return false;
957
	}
958
959
	static function is_J2ME_platform() {
960
961
		if ( empty( $_SERVER['HTTP_USER_AGENT'] ) ) {
962
			return false;
963
		}
964
965
		$agent = strtolower( $_SERVER['HTTP_USER_AGENT'] );
966
967
		if ( strpos( $agent, 'j2me/midp' ) !== false ) {
968
			return true;
969
		} elseif ( strpos( $agent, 'midp' ) !== false && strpos( $agent, 'cldc' ) ) {
970
			return true;
971
		}
972
973
		return false;
974
	}
975
976
977
	/*