Code Duplication    Length = 4-6 lines in 3 locations

class/files/admin/AdminHeader.php 1 location

@@ 111-114 (lines=4) @@
108
            $ret .= $this->xoopscode->getXoopsCodeEqualsOperator("\${$moduleDirname}", "{$ucfModuleDirname}Helper::getInstance()");
109
        }
110
        if (is_array($tables)) {
111
            foreach (array_keys($tables) as $i) {
112
                $tableName = $tables[$i]->getVar('table_name');
113
                $ret .= $this->xoopscode->getXoopsCodeEqualsOperator("\${$tableName}Handler", "\${$moduleDirname}->getHandler('{$tableName}')", true);
114
            }
115
        }
116
        $ret .= $this->xoopscode->getXoopsCodeEqualsOperator('$myts', 'MyTextSanitizer::getInstance()', true);
117
        $ret .= $this->phpcode->getPhpCodeCommentLine();

class/files/admin/AdminIndex.php 2 locations

@@ 97-101 (lines=5) @@
94
        $ret = $this->getInclude();
95
        $ret .= $this->getCommentLine('Count elements');
96
        $tableName = null;
97
        foreach (array_keys($tables) as $i) {
98
            $tableName = $tables[$i]->getVar('table_name');
99
            $ucfTableName = ucfirst($tableName);
100
            $ret .= $this->xoopscode->getXoopsCodeEqualsOperator("\$count{$ucfTableName}", "\${$tableName}Handler->getCount()");
101
        }
102
        $ret .= $this->phpcode->getPhpCodeCommentLine('Template Index');
103
        $ret .= $this->xoopscode->getXoopsCodeTemplateMain("{$moduleDirname}", 'index');
104
        $ret .= $this->phpcode->getPhpCodeCommentLine('InfoBox Statistics');
@@ 122-127 (lines=6) @@
119
            $ret .= $this->phpcode->getPhpCodeCommentLine('Upload Folders');
120
            $ret .= $this->getSimpleString('$folder = array(');
121
            $stuModuleDirname = strtoupper($moduleDirname);
122
            foreach (array_keys($tables) as $i) {
123
                $tableName = $tables[$i]->getVar('table_name');
124
                if (1 == $tables[$i]->getVar('table_install')) {
125
                    $ret .= $this->getSimpleString("\t{$stuModuleDirname}_UPLOAD_PATH . '/{$tableName}/',");
126
                }
127
            }
128
            $ret .= $this->getSimpleString(');');
129
            $ret .= $this->getCommentLine('Uploads Folders Created');
130
            $boxLine = $this->xoopscode->getXoopsCodeAddInfoBoxLine('$folder[$i]', "'folder'");