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 (#18)
by Cees-Jan
02:38 queued 30s
created

Job::number()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 4
Ratio 100 %

Code Coverage

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