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
Push — master ( a5712b...663867 )
by Cees-Jan
6s
created

Build::refresh()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2
Metric Value
dl 0
loc 4
ccs 0
cts 2
cp 0
rs 10
cc 1
eloc 1
nc 1
nop 0
crap 2
1
<?php
2
declare(strict_types=1);
3
4
namespace WyriHaximus\Travis\Resource;
5
6
use DateTimeInterface;
7
use WyriHaximus\ApiClient\Resource\TransportAwareTrait;
8
9 View Code Duplication
abstract class Build implements BuildInterface
0 ignored issues
show
Duplication introduced by
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...
10
{
11
    use TransportAwareTrait;
12
13
    /**
14
     * @var int
15
     */
16
    protected $id;
17
18
    /**
19
     * @var int
20
     */
21
    protected $repository_id;
22
23
    /**
24
     * @var int
25
     */
26
    protected $commit_id;
27
28
    /**
29
     * @var string
30
     */
31
    protected $number;
32
33
    /**
34
     * @var bool
35
     */
36
    protected $pull_request;
37
38
    /**
39
     * @var string
40
     */
41
    protected $pull_request_title;
42
43
    /**
44
     * @var int
45
     */
46
    protected $pull_request_number;
47
48
    /**
49
     * @var array
50
     */
51
    protected $config = [];
52
53
    /**
54
     * @var string
55
     */
56
    protected $state;
57
58
    /**
59
     * @var DateTimeInterface
60
     */
61
    protected $started_at;
62
63
    /**
64
     * @var DateTimeInterface
65
     */
66
    protected $finished_at;
67
68
    /**
69
     * @var int
70
     */
71
    protected $duration;
72
73
    /**
74
     * @var int[]
75
     */
76
    protected $job_ids = [];
77
78 2
    public function id() : int
79
    {
80 2
        return $this->id;
81
    }
82
83 2
    public function repositoryId() : int
84
    {
85 2
        return $this->repository_id;
86
    }
87
88 2
    public function commitId() : int
89
    {
90 2
        return $this->commit_id;
91
    }
92
93 2
    public function number() : int
94
    {
95 2
        return $this->number;
96
    }
97
98 2
    public function pullRequest() : bool
99
    {
100 2
        return $this->pull_request;
101
    }
102
103 2
    public function pullRequestTitle() : string
104
    {
105 2
        return $this->pull_request_title;
106
    }
107
108 2
    public function pullRequestNumber() : int
109
    {
110 2
        return $this->pull_request_number;
111
    }
112
113 2
    public function config() : array
114
    {
115 2
        return $this->config;
116
    }
117
118 2
    public function state() : string
119
    {
120 2
        return $this->state;
121
    }
122
123 2
    public function startedAt() : DateTimeInterface
124
    {
125 2
        return $this->started_at;
126
    }
127
128 2
    public function finishedAt() : DateTimeInterface
129
    {
130 2
        return $this->finished_at;
131
    }
132
133 2
    public function duration() : int
134
    {
135 2
        return $this->duration;
136
    }
137
138 2
    public function jobIds() : array
139
    {
140 2
        return $this->job_ids;
141
    }
142
143
    public function refresh()
144
    {
145
        // TODO
146
    }
147
}
148