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

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

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/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

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

tests/Api/CertificatesModuleTest.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