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/Gbowo/Adapter/Amplifypay/Plugin/FetchPlan.php 1 location

@@ 42-59 (lines=18) @@
39
     * @return mixed
40
     * @throws \Gbowo\Exception\InvalidHttpResponseException if the response code is not 200
41
     */
42
    public function handle($planIdentifier)
43
    {
44
        $link = $this->baseUrl."?PlanId={$planIdentifier}";
45
46
        /**
47
         * @var ResponseInterface $response
48
         */
49
        $response = $this->adapter->getHttpClient()
50
            ->get($link);
51
52
        if (200 !== $response->getStatusCode()) {
53
            throw new InvalidHttpResponseException(
54
                "Expected 200. Got {$response->getStatusCode()}"
55
            );
56
        }
57
58
        return json_decode($response->getBody(), true);
59
    }
60
}
61

src/Gbowo/Adapter/Paystack/Plugin/FetchPlan.php 1 location

@@ 39-56 (lines=18) @@
36
     * @return mixed
37
     * @throws \Gbowo\Exception\InvalidHttpResponseException if ann http response of 200 isn't returned
38
     */
39
    public function handle(string $planIdentifier)
40
    {
41
        $link = $this->baseUrl . str_replace(":identifier", $planIdentifier, self::FETCH_PLAN_LINK);
42
43
        /**
44
         * @var ResponseInterface $response
45
         */
46
        $response = $this->adapter->getHttpClient()
47
            ->get($link);
48
49
        if (200 !== $response->getStatusCode()) {
50
            throw new InvalidHttpResponseException(
51
                "Expected 200. Got {$response->getStatusCode()} instead"
52
            );
53
        }
54
55
        return json_decode($response->getBody(), true)['data'];
56
    }
57
}
58