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.
Completed
Pull Request — master (#21)
by Cees-Jan
08:23
created

Repository::lastBuildNumber()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php declare(strict_types=1);
2
3
namespace WyriHaximus\Travis\Resource;
4
5
use ApiClients\Foundation\Hydrator\Annotations\EmptyResource;
6
use ApiClients\Foundation\Resource\AbstractResource;
7
8
/**
9
 * @EmptyResource("EmptyRepository")
10
 */
11
abstract class Repository extends AbstractResource implements RepositoryInterface
12
{
13
    /**
14
     * @var int
15
     */
16
    protected $id;
17
18
    /**
19
     * @var string
20
     */
21
    protected $slug;
22
23
    /**
24
     * @var string
25
     */
26
    protected $description;
27
28
    /**
29
     * @var int
30
     */
31
    protected $last_build_id;
32
33
    /**
34
     * @var int
35
     */
36
    protected $last_build_number;
37
38
    /**
39
     * @var string
40
     */
41
    protected $last_build_state;
42
43
    /**
44
     * @var int
45
     */
46
    protected $last_build_duration;
47
48
    /**
49
     * @var int
50
     */
51
    protected $last_build_started_at;
52
53
    /**
54
     * @var int
55
     */
56
    protected $last_build_finished_at;
57
58
    /**
59
     * @var string
60
     */
61
    protected $github_language;
62
63 2
    /**
64
     * @return int
65 2
     */
66
    public function id() : int
67
    {
68 2
        return $this->id;
69
    }
70 2
71
    /**
72
     * @return string
73 2
     */
74
    public function slug() : string
75 2
    {
76
        return $this->slug;
77
    }
78 2
79
    /**
80 2
     * @return string
81
     */
82
    public function description() : string
83 2
    {
84
        return $this->description;
85 2
    }
86
87
    /**
88 2
     * @return int
89
     */
90 2
    public function lastBuildId() : int
91
    {
92
        return (int)$this->last_build_id;
93 2
    }
94
95 2
    /**
96
     * @return int
97
     */
98 2
    public function lastBuildNumber() : int
99
    {
100 2
        return $this->last_build_number;
101
    }
102
103 2
    /**
104
     * @return string
105 2
     */
106
    public function lastBuildState() : string
107
    {
108 2
        return $this->last_build_state;
109
    }
110 2
111
    /**
112
     * @return int
113
     */
114
    public function lastBuildDuration() : int
115
    {
116
        return $this->last_build_duration;
117
    }
118
119
    /**
120
     * @return int
121
     */
122
    public function lastBuildStartedAt() : int
123
    {
124
        return $this->last_build_started_at;
125
    }
126
127
    /**
128
     * @return int
129
     */
130
    public function lastBuildFinishedAt() : int
131
    {
132
        return $this->last_build_finished_at;
133
    }
134
135
    /**
136
     * @return string
137
     */
138
    public function githubLanguage() : string
139
    {
140
        return $this->github_language;
141
    }
142
}
143