Code Duplication    Length = 9-9 lines in 2 locations

includes/GlobalFunctions.php 2 locations

@@ 1926-1934 (lines=9) @@
1923
function wfNegotiateType( $cprefs, $sprefs ) {
1924
	$combine = [];
1925
1926
	foreach ( array_keys( $sprefs ) as $type ) {
1927
		$subType = explode( '/', $type )[1];
1928
		if ( $subType != '*' ) {
1929
			$ckey = mimeTypeMatch( $type, $cprefs );
1930
			if ( $ckey ) {
1931
				$combine[$type] = $sprefs[$type] * $cprefs[$ckey];
1932
			}
1933
		}
1934
	}
1935
1936
	foreach ( array_keys( $cprefs ) as $type ) {
1937
		$subType = explode( '/', $type )[1];
@@ 1936-1944 (lines=9) @@
1933
		}
1934
	}
1935
1936
	foreach ( array_keys( $cprefs ) as $type ) {
1937
		$subType = explode( '/', $type )[1];
1938
		if ( $subType != '*' && !array_key_exists( $type, $sprefs ) ) {
1939
			$skey = mimeTypeMatch( $type, $sprefs );
1940
			if ( $skey ) {
1941
				$combine[$type] = $sprefs[$skey] * $cprefs[$type];
1942
			}
1943
		}
1944
	}
1945
1946
	$bestq = 0;
1947
	$besttype = null;