Code Duplication    Length = 18-18 lines in 2 locations

Apps/Model/Admin/Feedback/FormAnswerAdd.php 1 location

@@ 15-32 (lines=18) @@
12
 */
13
class FormAnswerAdd extends FrontAnswer
14
{
15
    public function make()
16
    {
17
        // update readed marker
18
        $this->_post->readed = 1;
19
        $this->_post->save();
20
21
        // add new answer row in database
22
        $record = new FeedbackAnswer();
23
        $record->feedback_id = $this->_post->id;
24
        $record->name = App::$Security->strip_tags($this->name);
25
        $record->email = App::$Security->strip_tags($this->email);
26
        $record->message = App::$Security->strip_tags($this->message);
27
        $record->user_id = $this->_userId;
28
        $record->is_admin = 1;
29
30
        $record->ip = $this->_ip;
31
        $record->save();
32
    }
33
}

Apps/Model/Front/Feedback/FormAnswerAdd.php 1 location

@@ 77-94 (lines=18) @@
74
    /**
75
     * Add new row to database and set post is unreaded
76
     */
77
    public function make()
78
    {
79
        // update readed marker
80
        $this->_post->readed = 0;
81
        $this->_post->save();
82
83
        // add new answer row in database
84
        $record = new FeedbackAnswer();
85
        $record->feedback_id = $this->_post->id;
86
        $record->name = App::$Security->strip_tags($this->name);
87
        $record->email = App::$Security->strip_tags($this->email);
88
        $record->message = App::$Security->strip_tags($this->message);
89
        if ($this->_userId > 0) {
90
            $record->user_id = $this->_userId;
91
        }
92
        $record->ip = $this->_ip;
93
        $record->save();
94
    }
95
}