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.

System::getRemoteIP()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 2
1
<?php
2
3
namespace JumpCloud\Model;
4
5
class System
6
{
7
    /**
8
     * @var string
9
     */
10
    private $id;
11
12
    /**
13
     * @var string
14
     */
15
    private $hostname;
16
17
    /**
18
     * @var string
19
     */
20
    private $displayName;
21
22
    /**
23
     * @var string
24
     */
25
    private $remoteIP;
26
27
    /**
28
     * @var array
29
     */
30
    private $networkInterfaces;
31
32
    /**
33
     * @var bool
34
     */
35
    private $active;
36
37
    public static function createFromApi($data)
38
    {
39
        $system = new self();
40
41
        $system->setId($data->id);
42
        $system->setHostname($data->hostname);
43
        $system->setDisplayName($data->displayName);
44
        $system->setRemoteIP($data->remoteIP);
45
        $system->setActive((bool)$data->active);
46
        $system->setNetworkInterfaces((array)$data->networkInterfaces);
47
48
        return $system;
49
    }
50
51
    /**
52
     * @return string
53
     */
54
    public function getId()
55
    {
56
        return $this->id;
57
    }
58
59
    /**
60
     * @param string $id
61
     */
62
    public function setId($id)
63
    {
64
        $this->id = $id;
65
    }
66
67
    /**
68
     * @return string
69
     */
70
    public function getHostname()
71
    {
72
        return $this->hostname;
73
    }
74
75
    /**
76
     * @param string $hostname
77
     */
78
    public function setHostname($hostname)
79
    {
80
        $this->hostname = $hostname;
81
    }
82
83
    /**
84
     * @return string
85
     */
86
    public function getDisplayName()
87
    {
88
        return $this->displayName;
89
    }
90
91
    /**
92
     * @param string $displayName
93
     */
94
    public function setDisplayName($displayName)
95
    {
96
        $this->displayName = $displayName;
97
    }
98
99
    /**
100
     * @return string
101
     */
102
    public function getRemoteIP()
103
    {
104
        return $this->remoteIP;
105
    }
106
107
    /**
108
     * @param string $remoteIP
109
     */
110
    public function setRemoteIP($remoteIP)
111
    {
112
        $this->remoteIP = $remoteIP;
113
    }
114
115
    /**
116
     * @return boolean
117
     */
118
    public function isActive()
119
    {
120
        return $this->active;
121
    }
122
123
    /**
124
     * @param boolean $active
125
     */
126
    public function setActive($active)
127
    {
128
        $this->active = $active;
129
    }
130
131
    /**
132
     * @return array
133
     */
134
    public function getNetworkInterfaces()
135
    {
136
        return $this->networkInterfaces;
137
    }
138
139
    /**
140
     * @param array $networkInterfaces
141
     */
142
    public function setNetworkInterfaces($networkInterfaces)
143
    {
144
        $this->networkInterfaces = $networkInterfaces;
145
    }
146
}
147