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.

Relation::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Hateoas\Configuration;
4
5
/**
6
 * @author Adrien Brault <[email protected]>
7
 */
8
class Relation
9
{
10
    /**
11
     * @var string The link "rel" attribute
12
     */
13
    private $name;
14
15
    /**
16
     * @var string|Route|null
17
     */
18
    private $href;
19
20
    /**
21
     * @var array Extra link attributes
22
     */
23
    private $attributes;
24
25
    /**
26
     * @var Embedded|null
27
     */
28
    private $embedded;
29
30
    /**
31
     * @var Exclusion|null
32
     */
33
    private $exclusion;
34
35
    /**
36
     * @param string                $name
37
     * @param string|Route          $href
38
     * @param Embedded|string|mixed $embedded
39
     * @param array                 $attributes
40
     * @param Exclusion             $exclusion
41
     */
42
    public function __construct($name, $href = null, $embedded = null, array $attributes = array(), Exclusion $exclusion = null)
43
    {
44
        if (null !== $embedded && !$embedded instanceof Embedded) {
45
            $embedded = new Embedded($embedded);
46
        }
47
48
        if (null === !$href && null === $embedded) {
49
            throw new \InvalidArgumentException('$href and $embedded cannot be both null.');
50
        }
51
52
        $this->name       = $name;
53
        $this->href       = $href;
54
        $this->embedded   = $embedded;
55
        $this->attributes = $attributes;
56
        $this->exclusion  = $exclusion;
57
    }
58
59
    /**
60
     * @return string
61
     */
62
    public function getName()
63
    {
64
        return $this->name;
65
    }
66
67
    /**
68
     * @return Route|string|null
69
     */
70
    public function getHref()
71
    {
72
        return $this->href;
73
    }
74
75
    /**
76
     * @return array
77
     */
78
    public function getAttributes()
79
    {
80
        return $this->attributes;
81
    }
82
83
    /**
84
     * @return Embedded|null
85
     */
86
    public function getEmbedded()
87
    {
88
        return $this->embedded;
89
    }
90
91
    /**
92
     * @return Exclusion|null
93
     */
94
    public function getExclusion()
95
    {
96
        return $this->exclusion;
97
    }
98
}
99