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 = 30-30 lines in 6 locations

tests/Api/InfoModuleTest.php 1 location

@@ 92-121 (lines=30) @@
89
        );
90
    }
91
92
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
93
    {
94
        $response = $this->service->run(
95
            new Request(
96
                [
97
                    'SERVER_PORT' => 80,
98
                    'SERVER_NAME' => 'vpn.example',
99
                    'REQUEST_METHOD' => $requestMethod,
100
                    'SCRIPT_NAME' => '/index.php',
101
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
102
                    'PHP_AUTH_USER' => $basicAuth[0],
103
                    'PHP_AUTH_PW' => $basicAuth[1],
104
                ],
105
                $getData,
106
                $postData
107
            )
108
        );
109
110
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
111
        if ($responseArray['ok']) {
112
            if (array_key_exists('data', $responseArray)) {
113
                return $responseArray['data'];
114
            }
115
116
            return true;
117
        }
118
119
        // in case of errors...
120
        return $responseArray;
121
    }
122
}
123

tests/Api/CertificatesModuleTest.php 1 location

@@ 114-143 (lines=30) @@
111
        );
112
    }
113
114
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
115
    {
116
        $response = $this->service->run(
117
            new Request(
118
                [
119
                    'SERVER_PORT' => 80,
120
                    'SERVER_NAME' => 'vpn.example',
121
                    'REQUEST_METHOD' => $requestMethod,
122
                    'SCRIPT_NAME' => '/index.php',
123
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
124
                    'PHP_AUTH_USER' => $basicAuth[0],
125
                    'PHP_AUTH_PW' => $basicAuth[1],
126
                ],
127
                $getData,
128
                $postData
129
            )
130
        );
131
132
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
133
        if ($responseArray['ok']) {
134
            if (array_key_exists('data', $responseArray)) {
135
                return $responseArray['data'];
136
            }
137
138
            return true;
139
        }
140
141
        // in case of errors...
142
        return $responseArray;
143
    }
144
}
145

tests/Api/ConnectionsModuleTest.php 1 location

@@ 188-217 (lines=30) @@
185
        );
186
    }
187
188
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
189
    {
190
        $response = $this->service->run(
191
            new Request(
192
                [
193
                    'SERVER_PORT' => 80,
194
                    'SERVER_NAME' => 'vpn.example',
195
                    'REQUEST_METHOD' => $requestMethod,
196
                    'SCRIPT_NAME' => '/index.php',
197
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
198
                    'PHP_AUTH_USER' => $basicAuth[0],
199
                    'PHP_AUTH_PW' => $basicAuth[1],
200
                ],
201
                $getData,
202
                $postData
203
            )
204
        );
205
206
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
207
        if ($responseArray['ok']) {
208
            if (array_key_exists('data', $responseArray)) {
209
                return $responseArray['data'];
210
            }
211
212
            return true;
213
        }
214
215
        // in case of errors...
216
        return $responseArray;
217
    }
218
}
219

tests/Api/OpenVpnModuleTest.php 1 location

@@ 126-155 (lines=30) @@
123
        );
124
    }
125
126
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
127
    {
128
        $response = $this->service->run(
129
            new Request(
130
                [
131
                    'SERVER_PORT' => 80,
132
                    'SERVER_NAME' => 'vpn.example',
133
                    'REQUEST_METHOD' => $requestMethod,
134
                    'SCRIPT_NAME' => '/index.php',
135
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
136
                    'PHP_AUTH_USER' => $basicAuth[0],
137
                    'PHP_AUTH_PW' => $basicAuth[1],
138
                ],
139
                $getData,
140
                $postData
141
            )
142
        );
143
144
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
145
        if ($responseArray['ok']) {
146
            if (array_key_exists('data', $responseArray)) {
147
                return $responseArray['data'];
148
            }
149
150
            return true;
151
        }
152
153
        // in case of errors...
154
        return $responseArray;
155
    }
156
}
157

tests/Api/SystemMessagesTest.php 1 location

@@ 131-160 (lines=30) @@
128
        );
129
    }
130
131
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
132
    {
133
        $response = $this->service->run(
134
            new Request(
135
                [
136
                    'SERVER_PORT' => 80,
137
                    'SERVER_NAME' => 'vpn.example',
138
                    'REQUEST_METHOD' => $requestMethod,
139
                    'SCRIPT_NAME' => '/index.php',
140
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
141
                    'PHP_AUTH_USER' => $basicAuth[0],
142
                    'PHP_AUTH_PW' => $basicAuth[1],
143
                ],
144
                $getData,
145
                $postData
146
            )
147
        );
148
149
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
150
        if ($responseArray['ok']) {
151
            if (array_key_exists('data', $responseArray)) {
152
                return $responseArray['data'];
153
            }
154
155
            return true;
156
        }
157
158
        // in case of errors...
159
        return $responseArray;
160
    }
161
}
162

tests/Api/UsersModuleTest.php 1 location

@@ 333-362 (lines=30) @@
330
        );
331
    }
332
333
    private function makeRequest(array $basicAuth, $requestMethod, $pathInfo, array $getData = [], array $postData = [])
334
    {
335
        $response = $this->service->run(
336
            new Request(
337
                [
338
                    'SERVER_PORT' => 80,
339
                    'SERVER_NAME' => 'vpn.example',
340
                    'REQUEST_METHOD' => $requestMethod,
341
                    'SCRIPT_NAME' => '/index.php',
342
                    'REQUEST_URI' => sprintf('/%s', $pathInfo),
343
                    'PHP_AUTH_USER' => $basicAuth[0],
344
                    'PHP_AUTH_PW' => $basicAuth[1],
345
                ],
346
                $getData,
347
                $postData
348
            )
349
        );
350
351
        $responseArray = json_decode($response->getBody(), true)[$pathInfo];
352
        if ($responseArray['ok']) {
353
            if (array_key_exists('data', $responseArray)) {
354
                return $responseArray['data'];
355
            }
356
357
            return true;
358
        }
359
360
        // in case of errors...
361
        return $responseArray;
362
    }
363
}
364