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/SystemMessagesTest.php 1 location

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

tests/Api/CertificatesModuleTest.php 1 location

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

tests/Api/ConnectionsModuleTest.php 1 location

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

tests/Api/OpenVpnModuleTest.php 1 location

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

tests/Api/UsersModuleTest.php 1 location

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