Code Duplication    Length = 4-4 lines in 2 locations

library/Requests/IRI.php 2 locations

@@ 386-389 (lines=4) @@
383
			// where ".." is a complete path segment, then replace that prefix
384
			// with "/" in the input buffer and remove the last segment and its
385
			// preceding "/" (if any) from the output buffer; otherwise,
386
			elseif (strpos($input, '/../') === 0) {
387
				$input = substr($input, 3);
388
				$output = substr_replace($output, '', strrpos($output, '/'));
389
			}
390
			elseif ($input === '/..') {
391
				$input = '/';
392
				$output = substr_replace($output, '', strrpos($output, '/'));
@@ 403-406 (lines=4) @@
400
			// the output buffer, including the initial "/" character (if any)
401
			// and any subsequent characters up to, but not including, the next
402
			// "/" character or the end of the input buffer
403
			elseif (($pos = strpos($input, '/', 1)) !== false) {
404
				$output .= substr($input, 0, $pos);
405
				$input = substr_replace($input, '', 0, $pos);
406
			}
407
			else {
408
				$output .= $input;
409
				$input = '';