Code Duplication    Length = 16-18 lines in 2 locations

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
    /**

install/src/functions.php 1 location

@@ 64-81 (lines=18) @@
61
    }
62
}
63
64
if (!function_exists('parse')) {
65
    /**
66
     * @param string $src
67
     * @param array $ph
68
     * @param string $left
69
     * @param string $right
70
     * @return string
71
     */
72
    function parse($src, $ph, $left = '[+', $right = '+]')
73
    {
74
        foreach ($ph as $k => $v) {
75
            $k = $left . $k . $right;
76
            $src = str_replace($k, $v, $src);
77
        }
78
79
        return $src;
80
    }
81
}
82
83
if (!function_exists('ph')) {
84
    /**