Code Duplication    Length = 4-5 lines in 5 locations

src/base/extension/AssetsParser.php 4 locations

@@ 452-455 (lines=4) @@
449
    protected function extractSourceFilename($source)
450
    {
451
        $source_file = preg_replace("/'/", "", $source[1]);
452
        if (preg_match('/\#/', $source_file)) {
453
            $source_file = explode("#", $source_file);
454
            $source_file = $source_file[0];
455
        }
456
        if (preg_match('/\?/', $source_file)) {
457
            $source_file = explode("?", $source_file);
458
            $source_file = $source_file[0];
@@ 456-460 (lines=5) @@
453
            $source_file = explode("#", $source_file);
454
            $source_file = $source_file[0];
455
        }
456
        if (preg_match('/\?/', $source_file)) {
457
            $source_file = explode("?", $source_file);
458
            $source_file = $source_file[0];
459
            return $source_file;
460
        }
461
        return $source_file;
462
    }
463
@@ 50-53 (lines=4) @@
47
    protected static function calculateResourcePathname($filename_path, $source)
48
    {
49
        $source_file = preg_replace("/'/", "", $source[1]);
50
        if (preg_match('/\#/', $source_file)) {
51
            $source_file = explode("#", $source_file);
52
            $source_file = $source_file[0];
53
        }
54
        if (preg_match('/\?/', $source_file)) {
55
            $source_file = explode("?", $source_file);
56
            $source_file = $source_file[0];
@@ 54-57 (lines=4) @@
51
            $source_file = explode("#", $source_file);
52
            $source_file = $source_file[0];
53
        }
54
        if (preg_match('/\?/', $source_file)) {
55
            $source_file = explode("?", $source_file);
56
            $source_file = $source_file[0];
57
        }
58
        $orig = realpath(dirname($filename_path) . DIRECTORY_SEPARATOR . $source_file);
59
        return $orig;
60
    }

src/services/DocumentorService.php 1 location

@@ 195-198 (lines=4) @@
192
        $docs = explode("\n", $comments);
193
        if (count($docs)) {
194
            foreach ($docs as &$doc) {
195
                if (!preg_match('/(\*\*|\@)/i', $doc) && preg_match('/\*\ /i', $doc)) {
196
                    $doc = explode('* ', $doc);
197
                    $description = $doc[1];
198
                }
199
            }
200
        }
201