Code Duplication    Length = 16-18 lines in 2 locations

install/functions.php 1 location

@@ 35-52 (lines=18) @@
32
    }
33
}
34
35
if( ! function_exists('parse')) {
36
    /**
37
     * @param string $src
38
     * @param array $ph
39
     * @param string $left
40
     * @param string $right
41
     * @return string
42
     */
43
    function parse($src, $ph, $left = '[+', $right = '+]')
44
    {
45
        foreach ($ph as $k => $v) {
46
            $k = $left . $k . $right;
47
            $src = str_replace($k, $v, $src);
48
        }
49
50
        return $src;
51
    }
52
}
53
54
if( ! function_exists('ph')) {
55
    /**

manager/includes/functions/actions/files.php 1 location

@@ 519-534 (lines=16) @@
516
    }
517
}
518
519
if(!function_exists('parsePlaceholder')) {
520
    /**
521
     * @param string $tpl
522
     * @param array $ph
523
     * @return string
524
     */
525
    function parsePlaceholder($tpl, $ph)
526
    {
527
        foreach ($ph as $k => $v) {
528
            $k = "[+{$k}+]";
529
            $tpl = str_replace($k, $v, $tpl);
530
        }
531
532
        return $tpl;
533
    }
534
}
535
536
if(!function_exists('checkToken')) {
537
    /**