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.

HttpException::getResponse()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
1
<?php
2
declare(strict_types=1);
3
/**
4
 */
5
6
namespace CommerceLeague\ActiveCampaignApi\Exception;
7
8
use Psr\Http\Message\RequestInterface;
9
use Psr\Http\Message\ResponseInterface;
10
11
/**
12
 * Class HttpException
13
 */
14
class HttpException extends RuntimeException
15
{
16
    /**
17
     * @var RequestInterface
18
     */
19
    protected $request;
20
21
    /**
22
     * @var ResponseInterface
23
     */
24
    protected $response;
25
26
    /**
27
     * @param string $message
28
     * @param RequestInterface $request
29
     * @param ResponseInterface $response
30
     * @param \Exception|null $previous
31
     */
32
    public function __construct(
33
        string $message,
34
        RequestInterface $request,
35
        ResponseInterface $response,
36
        ?\Exception $previous = null
37
    ) {
38
        parent::__construct($message, $response->getStatusCode(), $previous);
39
40
        $this->request = $request;
41
        $this->response = $response;
42
    }
43
44
    /**
45
     * @return RequestInterface
46
     */
47
    public function getRequest(): RequestInterface
48
    {
49
        return $this->request;
50
    }
51
52
    /**
53
     * @return ResponseInterface
54
     */
55
    public function getResponse(): ResponseInterface
56
    {
57
        return $this->response;
58
    }
59
}
60