Code Duplication    Length = 10-10 lines in 2 locations

src/Comment/CommentController.php 2 locations

@@ 101-110 (lines=10) @@
98
     *
99
     * @return void
100
     */
101
    public function postComment()
102
    {
103
        // Catch post variables
104
        $post = $this->di->get("request")->getPost();
105
        // Instruct Model to add comment:
106
        $this->di->get("com")->addComment($post);
107
        // Send user back to comment page.
108
        $url = $this->di->get("url")->create("comment");
109
        $this->di->get("response")->redirect($url);
110
    }
111
112
113
    /**
@@ 132-141 (lines=10) @@
129
     *
130
     * @return void
131
     */
132
    public function deleteComment()
133
    {
134
        // Get id-variable from request.
135
        $id = $this->di->get("request")->getGet("id");
136
        // Instruct Model to delete comment:
137
        $this->di->get("com")->deleteComment($id);
138
        // Send user back to comment page.
139
        $url = $this->di->get("url")->create("comment");
140
        $this->di->get("response")->redirect($url);
141
    }
142
}
143