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.
Completed
Push — master ( 7d318e...636af9 )
by Dragos
32:49 queued 17:45
created

ApiKeyInvalidException   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
c 1
b 0
f 0
lcom 0
cbo 3
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
1
<?php
2
3
namespace Speicher210\KontaktIO\Exception;
4
5
use Psr\Http\Message\ResponseInterface;
6
use Speicher210\KontaktIO\Model\ApiErrorResponse;
7
8
/**
9
 * Exception thrown whe the API key is not valid or not having enough permissions.
10
 */
11
class ApiKeyInvalidException extends ApiException
12
{
13
    /**
14
     * Constructor.
15
     *
16
     * @param ResponseInterface $response The API response.
17
     */
18
    public function __construct(ResponseInterface $response)
19
    {
20
        $apiErrorResponse = new ApiErrorResponse();
21
        $apiErrorResponse->setStatus($response->getStatusCode());
22
        $apiErrorResponse->setMessage($response->getReasonPhrase());
23
24
        parent::__construct($apiErrorResponse);
25
    }
26
}
27