Code Duplication    Length = 10-12 lines in 2 locations

src/Comment/CommentController.php 2 locations

@@ 24-33 (lines=10) @@
21
     *
22
     * @return void
23
     */
24
    public function getComments()
25
    {
26
        $key = "comPage";
27
        // Get comments from model
28
        $comments = $this->di->get("com")->getComments($key);
29
        // Add views to a specific region, add comments
30
        $this->di->get("view")->add("comment/index", ["comments"=>$comments], "main");
31
        // Render a standard page using layout
32
        $this->di->get("pageRender")->renderPage(["title" => "Kommentarssystem"]);
33
    }
34
35
36
    /**
@@ 56-67 (lines=12) @@
53
     *
54
     * @return void
55
     */
56
    public function getCommentToEdit()
57
    {
58
        $id = $this->di->get("request")->getGet("id");
59
        // Get the comment from Model.
60
        $comment = $this->di->get("com")->getComment($id);
61
        // Add views to a specific region
62
        $this->di->get("view")->add("comment/edit", ["comment"=>$comment], "main");
63
        // Render a standard page using layout
64
        $this->di->get("pageRender")->renderPage([
65
            "title" => "Redigera kommentar",
66
        ]);
67
    }
68
69
70
    /**