Code Duplication    Length = 4-4 lines in 2 locations

lib/timber-image-helper.php 2 locations

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