Code Duplication    Length = 8-8 lines in 2 locations

src/base/extension/AssetsParser.php 2 locations

@@ 364-371 (lines=8) @@
361
            if ($debug) {
362
                $file = str_replace(".js", "_".$original_filename, $file);
363
            }
364
        } elseif (preg_match("/image/i", mime_content_type($filename_path))) {
365
            $ext = explode(".", $string);
366
            $file = "/".substr(md5($string), 0, 8).".".$ext[count($ext) - 1];
367
            $html_base = "img";
368
            if ($debug) {
369
                $file = str_replace(".".$ext[count($ext) - 1], "_".$original_filename, $file);
370
            }
371
        } elseif (preg_match("/(doc|pdf)/i", mime_content_type($filename_path))) {
372
            $ext = explode(".", $string);
373
            $file = "/".substr(md5($string), 0, 8).".".$ext[count($ext) - 1];
374
            $html_base = "docs";
@@ 378-385 (lines=8) @@
375
            if ($debug) {
376
                $file = str_replace(".".$ext[count($ext) - 1], "_".$original_filename, $file);
377
            }
378
        } elseif (preg_match("/(video|audio|ogg)/i", mime_content_type($filename_path))) {
379
            $ext = explode(".", $string);
380
            $file = "/".substr(md5($string), 0, 8).".".$ext[count($ext) - 1];
381
            $html_base = "media";
382
            if ($debug) {
383
                $file = str_replace(".".$ext[count($ext) - 1], "_".$original_filename, $file);
384
            }
385
        } elseif (!$return && !is_null($name)) {
386
            $html_base = '';
387
            $file = $name;
388
        }