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 ( a9ce78...3cd954 )
by Sho
8s
created

RequestV2::__construct()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 10
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 2
eloc 6
nc 2
nop 2
1
<?php
2
3
namespace ShippoClient\Http;
4
5
class RequestV2 extends Request
6
{
7
    const BASE_URI = 'https://api.goshippo.com/';
8
9
    /**
10
     * @param $accessToken
11
     * @param null $apiVersion
12
     */
13
    public function __construct($accessToken, $apiVersion = null)
14
    {
15
        parent::__construct($accessToken);
16
        $request_headers = ['Authorization' => 'ShippoToken ' . $accessToken];
17
        if ($apiVersion) {
18
            $request_headers['Shippo-API-Version'] = $apiVersion;
19
        }
20
21
        $this->delegated->setConfig(['request.options' => ['headers' => $request_headers]]);
22
    }
23
}
24