Code Duplication    Length = 21-21 lines in 2 locations

class/files/user/UserRate.php 1 location

@@ 225-245 (lines=21) @@
222
    /**
223
     * @return bool|string
224
     */
225
    public function render()
226
    {
227
        $module = $this->getModule();
228
        $table = $this->getTable();
229
        $filename = $this->getFileName();
230
        $moduleDirname = $module->getVar('mod_dirname');
231
        $tableId = $table->getVar('table_id');
232
        $tableMid = $table->getVar('table_mid');
233
        $tableName = $table->getVar('table_name');
234
        $tableSoleName = $table->getVar('table_solename');
235
        $fields = $this->getTableFields($tableMid, $tableId);
236
        $language = $this->getLanguage($moduleDirname, 'MA');
237
        $content = $this->getHeaderFilesComments($module, $filename);
238
        $content .= $this->getUserRateHeader($moduleDirname, $tableName);
239
        $content .= $this->getUserRateSwitch($moduleDirname, $tableId, $tableMid, $tableName, $tableSoleName, $language);
240
        $content .= $this->getUserRateFooter($moduleDirname, $language);
241
242
        $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
243
244
        return $this->renderFile();
245
    }
246
}
247

class/files/user/UserSubmit.php 1 location

@@ 230-250 (lines=21) @@
227
    /**
228
     * @return bool|string
229
     */
230
    public function render()
231
    {
232
        $module = $this->getModule();
233
        $table = $this->getTable();
234
        $filename = $this->getFileName();
235
        $moduleDirname = $module->getVar('mod_dirname');
236
        $tableId = $table->getVar('table_id');
237
        $tableMid = $table->getVar('table_mid');
238
        $tableName = $table->getVar('table_name');
239
        $tableCategory = $table->getVar('table_category');
240
        $tableSoleName = $table->getVar('table_solename');
241
        $language = $this->getLanguage($moduleDirname, 'MA');
242
        $content = $this->getHeaderFilesComments($module, $filename);
243
        $content .= $this->getUserSubmitHeader($moduleDirname);
244
        $content .= $this->getUserSubmitSwitch($moduleDirname, $tableId, $tableMid, $tableName, $tableSoleName, $language);
245
        $content .= $this->getUserSubmitFooter($moduleDirname, $language);
246
247
        $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
248
249
        return $this->renderFile();
250
    }
251
}
252