Code Duplication    Length = 4-4 lines in 2 locations

lib/timber-image-helper.php 2 locations

@@ 336-339 (lines=4) @@
333
				$result['base']= self::BASE_UPLOADS; // upload based
334
				$tmp = str_replace($upload_dir['basedir'], '', $tmp);
335
			}
336
			if ( 0 === strpos($tmp, WP_CONTENT_DIR) ) {
337
				$result['base']= self::BASE_CONTENT; // content based
338
				$tmp = str_replace(WP_CONTENT_DIR, '', $tmp);
339
			}
340
		} else {
341
			if (!$result['absolute']) {
342
				$tmp = home_url().$tmp;
@@ 348-351 (lines=4) @@
345
				$result['base']= self::BASE_UPLOADS; // upload based
346
				$tmp = str_replace($upload_dir['baseurl'], '', $tmp);
347
			}
348
			if (0 === strpos($tmp, content_url())) {
349
				$result['base']= self::BASE_CONTENT; // content-based
350
				$tmp = str_replace(content_url(), '', $tmp);
351
			}
352
		}
353
		$parts = pathinfo($tmp);
354
		$result['subdir'] = $parts['dirname'];