Code Duplication    Length = 4-4 lines in 2 locations

library/Requests/IRI.php 2 locations

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