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.

Build::getNumber()   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
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Jamal\JenkinsArduino\Jenkins;
4
5
use StdClass;
6
7
/**
8
 * @author Caio Almeida <[email protected]>
9
 * @codeCoverageIgnore
10
 */
11
class Build
12
{
13
    protected $number;
14
15
    protected $isBuilding;
16
17
    protected $status;
18
19
    protected $displayName;
20
21
    protected $actions;
22
23
    /**
24
     * @param array $data
25
     */
26
    public function __construct(StdClass $data)
27
    {
28
        $this->isBuilding  = (boolean) $data->building;
29
        $this->number      = $data->number;
30
        $this->actions     = $data->actions;
31
        $this->displayName = $data->fullDisplayName;
32
        $this->status      = new BuildStatus($data->result);
33
    }
34
35
    public function getDisplayName()
36
    {
37
        return $this->displayName;
38
    }
39
40
    public function getNumber()
41
    {
42
        return $this->number;
43
    }
44
45
    public function getStatus()
46
    {
47
        return $this->status;
48
    }
49
50
    public function getStatusCode()
51
    {
52
        return $this->status->getCode();
53
    }
54
55
    public function getActions()
56
    {
57
        return $this->actions;
58
    }
59
60
    public function isBuilding()
61
    {
62
        return $this->isBuilding;
63
    }
64
}
65