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

Complexity

Total Complexity 7

Size/Duplication

Total Lines 72
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 2

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 7
c 2
b 0
f 0
lcom 2
cbo 2
dl 0
loc 72
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A addClaim() 0 4 1
A getHeader() 0 4 1
A getPayload() 0 4 1
A getSignature() 0 4 1
A setSignature() 0 4 1
A __construct() 0 5 1
A addHeader() 0 4 1
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