Code Duplication    Length = 11-15 lines in 2 locations

src/wp-includes/SimplePie/File.php 1 location

@@ 171-185 (lines=15) @@
168
				else
169
				{
170
					stream_set_timeout($fp, $timeout);
171
					if (isset($url_parts['path']))
172
					{
173
						if (isset($url_parts['query']))
174
						{
175
							$get = "$url_parts[path]?$url_parts[query]";
176
						}
177
						else
178
						{
179
							$get = $url_parts['path'];
180
						}
181
					}
182
					else
183
					{
184
						$get = '/';
185
					}
186
					$out = "GET $get HTTP/1.1\r\n";
187
					$out .= "Host: $url_parts[host]\r\n";
188
					$out .= "User-Agent: $useragent\r\n";

src/wp-includes/Requests/Transport/fsockopen.php 1 location

@@ 359-369 (lines=11) @@
356
			$url_parts['query'] .= '&' . http_build_query($data, null, '&');
357
			$url_parts['query'] = trim($url_parts['query'], '&');
358
		}
359
		if (isset($url_parts['path'])) {
360
			if (isset($url_parts['query'])) {
361
				$get = $url_parts['path'] . '?' . $url_parts['query'];
362
			}
363
			else {
364
				$get = $url_parts['path'];
365
			}
366
		}
367
		else {
368
			$get = '/';
369
		}
370
		return $get;
371
	}
372