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

Job   A

Complexity

Total Complexity 13

Size/Duplication

Total Lines 134
Duplicated Lines 100 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 92.31%
Metric Value
wmc 13
lcom 0
cbo 1
dl 134
loc 134
ccs 24
cts 26
cp 0.9231
rs 10

13 Methods

Rating   Name   Duplication   Size   Complexity  
A id() 4 4 1
A buildId() 4 4 1
A repositoryId() 4 4 1
A commitId() 4 4 1
A logId() 4 4 1
A number() 4 4 1
A config() 4 4 1
A state() 4 4 1
A startedAt() 4 4 1
A finishedAt() 4 4 1
A queue() 4 4 1
A allowFailure() 4 4 1
A annotationIds() 4 4 1

How to fix   Duplicated Code   

Duplicated Code

Duplicate code is one of the most pungent code smells. A rule that is often used is to re-structure code once it is duplicated in three or more places.

Common duplication problems, and corresponding solutions are:

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 2
    public function id() : int
78
    {
79 2
        return $this->id;
80
    }
81
82
    public function buildId() : int
83
    {
84
        return $this->build_id;
85
    }
86
87 2
    public function repositoryId() : int
88
    {
89 2
        return $this->repository_id;
90
    }
91
92 2
    public function commitId() : int
93
    {
94 2
        return $this->commit_id;
95
    }
96
97 2
    public function logId() : int
98
    {
99 2
        return $this->log_id;
100
    }
101
102 2
    public function number() : string
103
    {
104 2
        return $this->number;
105
    }
106
107 2
    public function config() : array
108
    {
109 2
        return $this->config;
110
    }
111
112 2
    public function state() : string
113
    {
114 2
        return $this->state;
115
    }
116
117 2
    public function startedAt() : DateTimeInterface
118
    {
119 2
        return $this->started_at;
120
    }
121
122 2
    public function finishedAt() : DateTimeInterface
123
    {
124 2
        return $this->finished_at;
125
    }
126
127 2
    public function queue() : string
128
    {
129 2
        return $this->queue;
130
    }
131
132 2
    public function allowFailure() : bool
133
    {
134 2
        return $this->allow_failure;
135
    }
136
137 2
    public function annotationIds() : array
138
    {
139 2
        return $this->annotation_ids;
140
    }
141
}
142