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   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 44
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getRequest() 0 3 1
A __construct() 0 10 1
A getResponse() 0 3 1
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