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.

PrivateClaim   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 34
loc 34
c 0
b 0
f 0
wmc 3
lcom 0
cbo 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 6 6 1
A getName() 4 4 1
A setName() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

1
<?php
2
3
namespace Emarref\Jwt\Claim;
4
5
/**
6
 * Private Claim
7
 *
8
 * A producer and consumer of a JWT MAY agree to use Claim Names that are Private Names: names that are not Registered
9
 * Claim Names Section 4.1 or Public Claim Names Section 4.2. Unlike Public Claim Names, Private Claim Names are subject
10
 * to collision and should be used with caution.
11
 */
12 View Code Duplication
class PrivateClaim extends AbstractClaim
0 ignored issues
show
Duplication introduced by
This class seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
13
{
14
    /**
15
     * @var string
16
     */
17
    private $name;
18
19
    /**
20
     * @param string $name
21
     * @param mixed $value
22
     */
23
    public function __construct($name = null, $value = null)
24
    {
25
        parent::__construct($value);
26
27
        $this->setName($name);
28
    }
29
30
    /**
31
     * @return string
32
     */
33
    public function getName()
34
    {
35
        return $this->name;
36
    }
37
38
    /**
39
     * @param string $name
40
     */
41
    public function setName($name)
42
    {
43
        $this->name = $name;
44
    }
45
} 
46