Code Duplication    Length = 6-6 lines in 2 locations

packages/redirect/src/class-redirect.php 1 location

@@ 28-33 (lines=6) @@
25
	 * @param string $url the full URL.
26
	 * @return string $url without the guff
27
	 */
28
	private static function build_raw_urls( $url ) {
29
		$strip_http = '/.*?:\/\//i';
30
		$url        = preg_replace( $strip_http, '', $url );
31
		$url        = str_replace( '/', '::', $url );
32
		return $url;
33
	}
34
35
	/**
36
	 * Builds and returns an URL using the jetpack.com/redirect service

class.jetpack.php 1 location

@@ 7016-7021 (lines=6) @@
7013
	 * @param string | url
7014
	 * @return string | url without the guff
7015
	 */
7016
	public static function build_raw_urls( $url ) {
7017
		$strip_http = '/.*?:\/\//i';
7018
		$url        = preg_replace( $strip_http, '', $url );
7019
		$url        = str_replace( '/', '::', $url );
7020
		return $url;
7021
	}
7022
7023
	/**
7024
	 * Stores and prints out domains to prefetch for page speed optimization.