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 ( 3abaaf...dcd0c7 )
by Cees-Jan
8s
created

Build::state()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

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