Code Duplication    Length = 10-11 lines in 2 locations

app/src/CommentDb/CommentController.php 2 locations

@@ 38-48 (lines=11) @@
35
     *
36
     * @return void
37
     */
38
    public function listAction()
39
    {
40
        $all = $this->comments->findAll();
41
        $flow = $this->request->getRoute();
42
        $link = $this->url->create('comment/add/' . $flow);
43
        $this->theme->setTitle("List all users");
44
        $this->views->add('comment/commentsdb', [
45
            'comments' => $all,
46
            'comment_link' => $link,
47
        ]);
48
    }
49
    /**
50
     * View all comments in page flow.
51
     *
@@ 54-63 (lines=10) @@
51
     *
52
     * @return void
53
     */
54
    public function viewAction()
55
    {
56
        $flow = $this->request->getRoute();
57
        $all = $this->comments->findFlow($flow);
58
        $link = $this->url->create('comment/add/' . $flow);
59
        $this->views->add('comment/commentsdb', [
60
            'comments' => $all,
61
            'comment_link' => $link,
62
        ]);
63
    }
64
65
    /**
66
     * Add new comment.