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

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

@@ 31-49 (lines=19) @@
28
     * @return mixed
29
     * @throws \Gbowo\Exception\InvalidHttpResponseException if the response code is not 200
30
     */
31
    public function handle(...$args)
32
    {
33
34
        $link = $this->baseUrl.self::FETCH_PLAN_RELATIVE_LINK."?PlanId={$args[0]}";
35
36
        /**
37
         * @var ResponseInterface $response
38
         */
39
        $response = $this->adapter->getHttpClient()
40
            ->get($link);
41
42
        if (200 !== $response->getStatusCode()) {
43
            throw new InvalidHttpResponseException(
44
                "Expected 200. Got {$response->getStatusCode()}"
45
            );
46
        }
47
48
        return json_decode($response->getBody(), true);
49
    }
50
}
51

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

@@ 31-49 (lines=19) @@
28
     * @return mixed
29
     * @throws \Gbowo\Exception\InvalidHttpResponseException if ann http response of 200 isn't returned
30
     */
31
    public function handle(...$args)
32
    {
33
34
        $link = $this->baseUrl . str_replace(":identifier", $args[0], self::FETCH_PLAN_LINK);
35
36
        /**
37
         * @var ResponseInterface $response
38
         */
39
        $response = $this->adapter->getHttpClient()
40
            ->get($link);
41
42
        if (200 !== $response->getStatusCode()) {
43
            throw new InvalidHttpResponseException(
44
                "Expected 200. Got {$response->getStatusCode()} instead"
45
            );
46
        }
47
48
        return json_decode($response->getBody(), true)['data'];
49
    }
50
}
51