Code Duplication    Length = 16-18 lines in 2 locations

core/functions/actions/files.php 1 location

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

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