Code Duplication    Length = 13-13 lines in 2 locations

src/Comment/CommentController.php 1 location

@@ 22-34 (lines=13) @@
19
     *
20
     * @return void
21
     */
22
    public function getPostCreateComment($id)
23
    {
24
        $question = new Question($this->di->get("db"));
25
26
        $views = [
27
            ["comment/question/view-all", ["questions" => $question->getQuestions()], "main"]
28
        ];
29
30
        $this->di->get("pageRenderComment")->renderPage([
31
            "views" => $views,
32
            "title" => "All questions"
33
        ]);
34
    }
35
}
36

src/Comment/QuestionController.php 1 location

@@ 23-35 (lines=13) @@
20
     *
21
     * @return void
22
     */
23
    public function getIndex()
24
    {
25
        $question = new Question($this->di->get("db"));
26
27
        $views = [
28
            ["comment/question/view-all", ["questions" => $question->getQuestions()], "main"]
29
        ];
30
31
        $this->di->get("pageRenderComment")->renderPage([
32
            "views" => $views,
33
            "title" => "All questions"
34
        ]);
35
    }
36
37
    /**
38
     * View specific question and create answer form