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

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