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 = 18-18 lines in 2 locations

src/Server/Server.php 2 locations

@@ 304-321 (lines=18) @@
301
     *
302
     * @return string the regular expression directive
303
     */
304
    private function setRegexDirective($directive, $message1, $message2)
305
    {
306
        if (!$this->checker->setString($directive)->getString()) {
307
            throw ServerException::forInvalidMatcher(
308
                $directive,
309
                $message1
310
            );
311
        }
312
313
        if (!$this->checker->isValidRegex()) {
314
            throw ServerException::forInvalidMatcher(
315
                $directive,
316
                $message2
317
            );
318
        }
319
320
        return $directive;
321
    }
322
323
    /**
324
     * Confirms if a directive matcher is a valid regex.
@@ 334-351 (lines=18) @@
331
     *
332
     * @return bool true if the directive matcher is valid
333
     */
334
    private function isValidDirective($directive, $message1, $message2)
335
    {
336
        if (!$this->checker->setString($directive)->getString()) {
337
            throw ServerException::forInvalidMatcher(
338
                $directive,
339
                $message1
340
            );
341
        }
342
343
        if (!$this->checker->hasKeyAndValueSubPattern()) {
344
            throw ServerException::forInvalidMatcher(
345
                $directive,
346
                $message2
347
            );
348
        }
349
350
        return true;
351
    }
352
353
    /**
354
     * Gets the list of binaries that can be run to analyze.