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 — 1.x ( f2247a...73fe3f )
by Jakub
04:00
created

AuthorizedResourceBase::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 8
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
1
<?php
2
3
namespace zaporylie\Vipps\Resource;
4
5
use zaporylie\Vipps\VippsInterface;
6
7
/**
8
 * Class AuthorizedResourceBase
9
 *
10
 * @package Vipps\Resource
11
 */
12
abstract class AuthorizedResourceBase extends ResourceBase
13
{
14
15
    /**
16
     * {@inheritdoc}
17
     *
18
     * In addition to setting Vipps this base class adds authorization header
19
     * to each request.
20
     */
21
    public function __construct(VippsInterface $vipps, $subscription_key)
22
    {
23
        parent::__construct($vipps, $subscription_key);
24
        $this->headers['Authorization'] =
25
                $this->app->getClient()->getTokenStorage()->get()->getTokenType()
26
                .' '.
27
                $this->app->getClient()->getTokenStorage()->get()->getAccessToken();
28
    }
29
}
30