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.

Client::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 7
nc 1
nop 2
1
<?php
2
3
declare(strict_types = 1);
4
5
namespace Speicher210\KontaktIO;
6
7
use function GuzzleHttp\default_user_agent;
8
9
class Client extends \GuzzleHttp\Client
10
{
11
    public const API_VERSION_STABLE = '9';
12
13
    public const API_VERSION_LATEST = '10';
14
15
    /**
16
     * @param string $apiKey
17
     * @param string $version
18
     */
19
    public function __construct($apiKey, $version = self::API_VERSION_STABLE)
20
    {
21
        parent::__construct(
22
            [
23
                'base_uri' => 'https://api.kontakt.io',
24
                'headers' => [
25
                    'Accept' => 'application/vnd.com.kontakt+json;version=' . $version,
26
                    'Api-Key' => $apiKey,
27
                    'User-Agent' => 'Speicher210/KontaktIO ' . default_user_agent()
28
                ]
29
            ]
30
        );
31
    }
32
}
33