Code Duplication    Length = 5-5 lines in 2 locations

Apps/Controller/Admin/Comments.php 2 locations

@@ 174-178 (lines=5) @@
171
        $model = new FormCommentDelete($query, $type);
172
173
        // check if delete is submited
174
        if ($model->send() && $model->validate()) {
175
            $model->make();
176
            App::$Session->getFlashBag()->add('success', __('Comments or answers are successful deleted!'));
177
            $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index'));
178
        }
179
180
        // render view
181
        return $this->view->render('delete', [
@@ 229-233 (lines=5) @@
226
        $model = new FormCommentModerate($query, $type);
227
228
        // check if form is submited
229
        if ($model->send()) {
230
            $model->make();
231
            App::$Session->getFlashBag()->add('success', __('Comments or answers are successful published'));
232
            $this->response->redirect('comments/' . ($type === 'answer' ? 'answerlist' : 'index'));
233
        }
234
235
        return $this->view->render('publish', [
236
            'model' => $model