Code Duplication    Length = 18-19 lines in 2 locations

class/files/user/UserPages.php 1 location

@@ 183-200 (lines=18) @@
180
     *
181
     * @return bool|string
182
     */
183
    public function renderFile()
184
    {
185
        $module = $this->getModule();
186
        $table = $this->getTable();
187
        $tableName = $table->getVar('table_name');
188
        $tableSoleName = $table->getVar('table_solename');
189
        $filename = $this->getFileName();
190
        $moduleDirname = $module->getVar('mod_dirname');
191
        $language = $this->getLanguage($moduleDirname, 'MA');
192
        $content = $this->getHeaderFilesComments($module, $filename);
193
        $content .= $this->getUserPagesHeader($moduleDirname, $tableName);
194
        $content .= $this->getUserPages($moduleDirname, $tableName, $tableSoleName);
195
        $content .= $this->getUserPagesFooter($moduleDirname, $tableName, $tableSoleName, $language);
196
        //
197
        $this->tdmcfile->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
198
199
        return $this->tdmcfile->renderFile();
200
    }
201
}
202

class/files/user/UserSubmit.php 1 location

@@ 225-243 (lines=19) @@
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
        $tableName = $table->getVar('table_name');
232
        $tableCategory = $table->getVar('table_category');
233
        $tableSoleName = $table->getVar('table_solename');
234
        $language = $this->getLanguage($moduleDirname, 'MA');
235
        $content = $this->getHeaderFilesComments($module, $filename);
236
        $content .= $this->getUserSubmitHeader($moduleDirname);
237
        $content .= $this->getUserSubmitSwitch($moduleDirname, $tableName, $tableSoleName, $language);
238
        $content .= $this->getUserSubmitFooter($moduleDirname, $language);
239
240
        $this->create($moduleDirname, '/', $filename, $content, _AM_TDMCREATE_FILE_CREATED, _AM_TDMCREATE_FILE_NOTCREATED);
241
242
        return $this->renderFile();
243
    }
244
}
245