GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 13-14 lines in 5 locations

app/controllers/CommentsController.php 2 locations

@@ 83-95 (lines=13) @@
80
     * so that the user can 'update' or even 'cancel' the edit request.
81
     *
82
     */
83
    public function getUpdateForm(){
84
85
        $commentId = Encryption::decryptIdWithDash($this->request->data("comment_id"));
86
87
        if(!$this->comment->exists($commentId)){
88
            return $this->error(404);
89
        }
90
91
        $comment = $this->comment->getById($commentId);
92
93
        $commentsHTML = $this->view->render(Config::get('VIEWS_PATH') . 'posts/commentUpdateForm.php', array("comment" => $comment[0]));
94
        $this->view->renderJson(array("data" => $commentsHTML));
95
    }
96
97
    /**
98
     * update comment
@@ 125-137 (lines=13) @@
122
     * get comment by Id
123
     *
124
     */
125
    public function getById(){
126
127
        $commentId = Encryption::decryptIdWithDash($this->request->data("comment_id"));
128
129
        if(!$this->comment->exists($commentId)){
130
            return $this->error(404);
131
        }
132
133
        $comment = $this->comment->getById($commentId);
134
135
        $commentsHTML = $this->view->render(Config::get('VIEWS_PATH') . 'posts/comments.php', array("comments" => $comment));
136
        $this->view->renderJson(array("data" => $commentsHTML));
137
    }
138
139
    public function delete(){
140

app/controllers/FilesController.php 1 location

@@ 43-56 (lines=14) @@
40
        $this->view->renderWithLayouts(Config::get('VIEWS_PATH') . "layout/default/", Config::get('VIEWS_PATH') . 'files/index.php', ['pageNum' => $pageNum]);
41
    }
42
43
    public function create(){
44
45
        $fileData  = $this->request->data("file");
46
47
        $file = $this->file->create(Session::getUserId(), $fileData);
48
49
        if(!$file){
50
            $this->view->renderErrors($this->file->errors());
51
        }else{
52
53
            $fileHTML = $this->view->render(Config::get('VIEWS_PATH') . 'files/files.php', array("files" => $file));
54
            $this->view->renderJson(array("data" => $fileHTML));
55
        }
56
    }
57
58
    public function delete(){
59

app/controllers/NewsFeedController.php 2 locations

@@ 65-77 (lines=13) @@
62
        }
63
    }
64
65
    public function getUpdateForm(){
66
67
        $newsfeedId = Encryption::decryptIdWithDash($this->request->data("newsfeed_id"));
68
69
        if(!$this->newsfeed->exists($newsfeedId)){
70
            return $this->error(404);
71
        }
72
73
        $newsfeed = $this->newsfeed->getById($newsfeedId);
74
75
        $html = $this->view->render(Config::get('VIEWS_PATH') . 'newsfeed/updateForm.php', array("newsfeed" => $newsfeed[0]));
76
        $this->view->renderJson(array("data" => $html));
77
    }
78
79
    public function update(){
80
@@ 99-111 (lines=13) @@
96
        }
97
    }
98
99
    public function getById(){
100
101
        $newsfeedId = Encryption::decryptIdWithDash($this->request->data("newsfeed_id"));
102
103
        if(!$this->newsfeed->exists($newsfeedId)){
104
            return $this->error(404);
105
        }
106
107
        $newsfeed = $this->newsfeed->getById($newsfeedId);
108
109
        $html = $this->view->render(Config::get('VIEWS_PATH') . 'newsfeed/newsfeed.php', array("newsfeed" => $newsfeed));
110
        $this->view->renderJson(array("data" => $html));
111
    }
112
113
    public function delete(){
114