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

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 2
dl 0
loc 27
ccs 14
cts 14
cp 1
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 21 2
1
<?php
2
3
namespace Vindi\Http;
4
5
use GuzzleHttp\Client as Guzzle;
6
use Vindi\Vindi;
7
8
/**
9
 * Class Client
10
 *
11
 * @package Vindi\Http
12
 */
13
class Client extends Guzzle
14
{
15
    /**
16
     * Client constructor.
17
     */
18 462
    public function __construct(array $config = [])
19
    {
20 462
        $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : '';
21
22 462
        $config = array_merge([
23 462
            'base_uri' => Vindi::getApiUri(),
24 462
            'auth' => [Vindi::getApiKey(), '', 'BASIC'],
25
            'headers' => [
26 462
                'Content-Type' => 'application/json',
27 462
                'User-Agent' => trim('Vindi-PHP/' . Vindi::$sdkVersion . "; {$host}"),
28 462
            ],
29 462
            'verify' => Vindi::getCertPath(),
30 462
            'timeout' => Vindi::getApiTimeOut(),
31
            'curl.options' => [
32 462
                'CURLOPT_SSLVERSION' => 'CURL_SSLVERSION_TLSv1_2',
33
            ]
34 462
        ], $config);
35
36
37 462
        parent::__construct($config);
38 462
    }
39
}
40