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   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 5

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
c 2
b 0
f 0
lcom 0
cbo 5
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
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