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.

Token::addHeader()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
3
namespace Emarref\Jwt;
4
5
use Emarref\Jwt\Claim;
6
use Emarref\Jwt\HeaderParameter;
7
use Emarref\Jwt\Token\Header;
8
use Emarref\Jwt\Token\Payload;
9
10
class Token
11
{
12
    /**
13
     * @var Header
14
     */
15
    private $header;
16
17
    /**
18
     * @var Payload
19
     */
20
    private $payload;
21
22
    /**
23
     * @var string
24
     */
25
    private $signature;
26
27
    public function __construct()
28
    {
29
        $this->header  = new Header();
30
        $this->payload = new Payload();
31
    }
32
33
    /**
34
     * @param HeaderParameter\ParameterInterface $parameter
35
     * @param bool                               $critical
36
     */
37
    public function addHeader(HeaderParameter\ParameterInterface $parameter, $critical = false)
38
    {
39
        $this->header->setParameter($parameter, $critical);
40
    }
41
42
    /**
43
     * @param Claim\ClaimInterface $claim
44
     */
45
    public function addClaim(Claim\ClaimInterface $claim)
46
    {
47
        $this->payload->setClaim($claim);
48
    }
49
50
    /**
51
     * @return Token\Header
52
     */
53
    public function getHeader()
54
    {
55
        return $this->header;
56
    }
57
58
    /**
59
     * @return Token\Payload
60
     */
61
    public function getPayload()
62
    {
63
        return $this->payload;
64
    }
65
66
    /**
67
     * @return string
68
     */
69
    public function getSignature()
70
    {
71
        return $this->signature;
72
    }
73
74
    /**
75
     * @param string $signature
76
     */
77
    public function setSignature($signature)
78
    {
79
        $this->signature = $signature;
80
    }
81
}
82