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 = 22-27 lines in 3 locations

lib/Util.php 3 locations

@@ 231-257 (lines=27) @@
228
     * @throws Model\Exception\UnknownApiException
229
     * @throws Model\Exception\UnknownException
230
     */
231
    public function autoReplaceSSL(array $params)
232
    {
233
        // Two choices, we want url-encoded
234
        $params['responseFormat'] = CommunicationAdapter::RESPONSE_URL_ENCODED;
235
236
        // Send request
237
        $arr = $this
238
            ->communicationAdapter
239
            ->sendToApi(
240
                self::COMODO_AUTO_REPLACE_URL,
241
                $params,
242
                CommunicationAdapter::RESPONSE_URL_ENCODED
243
            );
244
245
        // Successful
246
        if ($arr['errorCode'] == 0) {
247
            $result = new AutoReplaceResult();
248
249
            $result
250
                ->setCertificateID($arr['certificateID'])
251
                ->setExpectedDeliveryTime($arr['expectedDeliveryTime']);
252
253
            return $result;
254
        } else {
255
            throw $this->createException($arr);
256
        }
257
    }
258
259
    /**
260
     * Function to revoke order
@@ 469-492 (lines=24) @@
466
     * @throws Model\Exception\UnknownApiException
467
     * @throws Model\Exception\UnknownException
468
     */
469
    public function getMDCDomainDetails(array $params)
470
    {
471
        // Response is always new line encoded
472
        $responseArray = $this
473
            ->communicationAdapter
474
            ->sendToApi(
475
                self::COMODO_MDC_DOMAIN_DETAILS_URL,
476
                $params,
477
                CommunicationAdapter::RESPONSE_URL_ENCODED
478
            );
479
480
        if ($responseArray['errorCode'] == 0) {
481
            $result = new GetMDCDomainDetailsResult();
482
483
            $result
484
                ->setDomainName($responseArray['1_domainName'])
485
                ->setDcvMethod($responseArray['1_dcvMethod'])
486
                ->setDcvStatus($responseArray['1_dcvStatus']);
487
488
            return $result;
489
        } else {
490
            throw $this->createException($responseArray);
491
        }
492
    }
493
494
    /**
495
     * Function to do a sslcheck
@@ 584-605 (lines=22) @@
581
     * @throws Model\Exception\UnknownApiException
582
     * @throws Model\Exception\UnknownException
583
     */
584
    public function webHostReport(array $params) {
585
586
        if (empty($params['lastResultNo'])) {
587
            $params['lastResultNo'] = 10;
588
        }
589
590
        // Response is always new line encoded
591
        $responseArray = $this
592
            ->communicationAdapter
593
            ->sendToApi(
594
                self::COMODO_WEB_HOST_REPORT,
595
                $params,
596
                CommunicationAdapter::RESPONSE_URL_ENCODED
597
            );
598
        if ($responseArray['error_code'] == 0) {
599
            $result = new WebHostReportResult();
600
            $result->importEntries($responseArray);
601
            return $result;
602
        } else {
603
            throw $this->createException($responseArray);
604
        }
605
    }
606
607
    /**
608
     * Function to enter the DCV code, coming from DCV E-Mail