Code Duplication    Length = 5-5 lines in 2 locations

htdocs/src/Oc/Cache/WebCache.php 1 location

@@ 125-129 (lines=5) @@
122
    public function preCompileAllTemplates()
123
    {
124
        if ($hDir = opendir($this->opt['stylepath'])) {
125
            while (($sFilename = readdir($hDir)) !== false) {
126
                if (substr($sFilename, -4) === '.tpl') {
127
                    $this->preCompileTemplate(substr($sFilename, 0, strlen($sFilename) - 4));
128
                }
129
            }
130
            closedir($hDir);
131
        }
132

htdocs/translate.php 1 location

@@ 590-594 (lines=5) @@
587
    $retval = [];
588
    if (is_dir($dir)) {
589
        if ($dh = opendir($dir)) {
590
            while (($file = readdir($dh)) !== false) {
591
                if (substr($file, - 4) == '.sql') {
592
                    $retval[] = substr($file, 0, strlen($file) - 4);
593
                }
594
            }
595
            closedir($dh);
596
        }
597
    }