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 = 15-15 lines in 4 locations

src/LPTracker/LPTracker.php 4 locations

@@ 115-129 (lines=15) @@
112
     * @throws exceptions\LPTrackerResponseException
113
     * @throws exceptions\LPTrackerServerException
114
     */
115
    public function getProjectCustoms($project)
116
    {
117
        if ($project instanceof Project) {
118
            $project = $project->getId();
119
        } else {
120
            $project = (int) $project;
121
        }
122
        $url = '/project/' . $project . '/customs';
123
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
124
        $result = [];
125
        foreach ($response as $customData) {
126
            $result[] = new Custom($customData);
127
        }
128
        return $result;
129
    }
130
131
    /**
132
     * @param Project|int $project
@@ 137-151 (lines=15) @@
134
     * @throws exceptions\LPTrackerResponseException
135
     * @throws exceptions\LPTrackerServerException
136
     */
137
    public function getProjectStages($project)
138
    {
139
        if ($project instanceof Project) {
140
            $project = $project->getId();
141
        } else {
142
            $project = (int) $project;
143
        }
144
        $url = '/project/' . $project . '/funnel';
145
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
146
        $result = [];
147
        foreach ($response as $stageData) {
148
            $result[] = new Stage($stageData);
149
        }
150
        return $result;
151
    }
152
153
    /**
154
     * @param Project|int $project
@@ 159-173 (lines=15) @@
156
     * @throws exceptions\LPTrackerResponseException
157
     * @throws exceptions\LPTrackerServerException
158
     */
159
    public function getProjectFields($project)
160
    {
161
        if ($project instanceof Project) {
162
            $project = $project->getId();
163
        } else {
164
            $project = (int) $project;
165
        }
166
        $url = '/project/' . $project . '/fields';
167
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
168
        $result = [];
169
        foreach ($response as $customData) {
170
            $result[] = new ContactField($customData);
171
        }
172
        return $result;
173
    }
174
175
    /**
176
     * @param Project|int $project
@@ 831-845 (lines=15) @@
828
     * @throws exceptions\LPTrackerResponseException
829
     * @throws exceptions\LPTrackerServerException
830
     */
831
    public function getLeadComments($lead)
832
    {
833
        if ($lead instanceof Lead) {
834
            $lead = $lead->getId();
835
        } else {
836
            $lead = (int) $lead;
837
        }
838
        $url = '/lead/' . $lead . '/comments';
839
        $response = LPTrackerRequest::sendRequest($url, [], 'GET', $this->token, $this->address);
840
        $result = [];
841
        foreach ($response as $commentData) {
842
            $result[] = new Comment($commentData);
843
        }
844
        return $result;
845
    }
846
847
    /**
848
     * @param Lead|int $lead