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.

Route   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 68
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 0
dl 68
loc 68
c 0
b 0
f 0
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getName() 4 4 1
A getParameters() 4 4 1
A isAbsolute() 4 4 1
A getGenerator() 4 4 1
A __construct() 7 7 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 Hateoas\Configuration;
4
5
/**
6
 * @author Adrien Brault <[email protected]>
7
 */
8 View Code Duplication
class Route
0 ignored issues
show
Duplication introduced by Adrien Brault
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...
9
{
10
    /**
11
     * @var string
12
     */
13
    private $name;
14
15
    /**
16
     * @var string|array
17
     */
18
    private $parameters;
19
20
    /**
21
     * @var boolean
22
     */
23
    private $absolute;
24
25
    /**
26
     * @var null|string
27
     */
28
    private $generator;
29
30
    /**
31
     * @param string       $name
32
     * @param string|array $parameters
33
     * @param boolean      $absolute
34
     * @param string|null  $generator
35
     */
36
    public function __construct($name, $parameters = array(), $absolute = false, $generator = null)
37
    {
38
        $this->name       = $name;
39
        $this->parameters = $parameters;
40
        $this->absolute   = $absolute;
41
        $this->generator  = $generator;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getName()
48
    {
49
        return $this->name;
50
    }
51
52
    /**
53
     * @return string|array
54
     */
55
    public function getParameters()
56
    {
57
        return $this->parameters;
58
    }
59
60
    /**
61
     * @return boolean
62
     */
63
    public function isAbsolute()
64
    {
65
        return $this->absolute;
66
    }
67
68
    /**
69
     * @return null|string
70
     */
71
    public function getGenerator()
72
    {
73
        return $this->generator;
74
    }
75
}
76