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.

BaseCoverFishResult   A
last analyzed

Complexity

Total Complexity 24

Size/Duplication

Total Lines 230
Duplicated Lines 0 %

Coupling/Cohesion

Components 6
Dependencies 0

Importance

Changes 3
Bugs 1 Features 0
Metric Value
wmc 24
lcom 6
cbo 0
dl 0
loc 230
rs 9.0909
c 3
b 1
f 0

23 Methods

Rating   Name   Duplication   Size   Complexity  
A isPass() 0 4 1
A setPass() 0 4 1
A getPassCount() 0 4 1
A setPassCount() 0 4 1
A addPassCount() 0 4 1
A getFailureCount() 0 4 1
A setFailureCount() 0 4 1
A addFailureCount() 0 4 1
A getErrorCount() 0 4 1
A setErrorCount() 0 4 1
A addErrorCount() 0 4 1
A getTestCount() 0 4 1
A setTestCount() 0 4 1
A addTestCount() 0 4 1
A getFileCount() 0 4 1
A setFileCount() 0 4 1
A addFileCount() 0 4 1
A getTaskStartAt() 0 4 1
A setTaskStartAt() 0 4 1
A getTaskFinishedAt() 0 4 1
A setTaskFinishedAt() 0 4 1
A getTaskTime() 0 8 2
A __construct() 0 4 1
1
<?php
2
3
namespace DF\PHPCoverFish\Common\Base;
4
5
/**
6
 * Class BaseCoverFishResult
7
 *
8
 * @package   DF\PHPCoverFish
9
 * @author    Patrick Paechnatz <[email protected]>
10
 * @copyright 2015 Patrick Paechnatz <[email protected]>
11
 * @license   http://www.opensource.org/licenses/MIT
12
 * @link      http://github.com/dunkelfrosch/phpcoverfish/tree
13
 * @since     class available since Release 0.9.9
14
 * @version   1.0.0
15
 *
16
 * @codeCoverageIgnore
17
 */
18
class BaseCoverFishResult
19
{
20
    /**
21
     * @var bool
22
     */
23
    private $pass = false;
24
25
    /**
26
     * @var int
27
     */
28
    private $passCount = 0;
29
30
    /**
31
     * @var int
32
     */
33
    private $failureCount = 0;
34
35
    /**
36
     * @var int
37
     */
38
    private $errorCount = 0;
39
40
    /**
41
     * @var int
42
     */
43
    private $testCount = 0;
44
45
    /**
46
     * @var int
47
     */
48
    private $fileCount = 0;
49
50
    /**
51
     * @var \DateTime
52
     */
53
    private $taskStartAt;
54
55
    /**
56
     * @var \DateTime
57
     */
58
    private $taskFinishedAt;
59
60
    /**
61
     * @return boolean
62
     */
63
    public function isPass()
64
    {
65
        return $this->pass;
66
    }
67
68
    /**
69
     * @param boolean $pass
70
     */
71
    public function setPass($pass)
72
    {
73
        $this->pass = $pass;
74
    }
75
76
    /**
77
     * @return int
78
     */
79
    public function getPassCount()
80
    {
81
        return $this->passCount;
82
    }
83
84
    /**
85
     * @param int $passCount
86
     */
87
    public function setPassCount($passCount)
88
    {
89
        $this->passCount = $passCount;
90
    }
91
92
    /**
93
     * @return int
94
     */
95
    public function addPassCount()
96
    {
97
        return $this->passCount++;
98
    }
99
100
    /**
101
     * @return int
102
     */
103
    public function getFailureCount()
104
    {
105
        return $this->failureCount;
106
    }
107
108
    /**
109
     * @param int $failureCount
110
     */
111
    public function setFailureCount($failureCount)
112
    {
113
        $this->failureCount = $failureCount;
114
    }
115
116
    /**
117
     * @return int
118
     */
119
    public function addFailureCount()
120
    {
121
        return $this->failureCount++;
122
    }
123
124
    /**
125
     * @return int
126
     */
127
    public function getErrorCount()
128
    {
129
        return $this->errorCount;
130
    }
131
132
    /**
133
     * @param int $errorCount
134
     */
135
    public function setErrorCount($errorCount)
136
    {
137
        $this->errorCount = $errorCount;
138
    }
139
140
    /**
141
     * @return int
142
     */
143
    public function addErrorCount()
144
    {
145
        return $this->errorCount++;
146
    }
147
148
    /**
149
     * @return int
150
     */
151
    public function getTestCount()
152
    {
153
        return $this->testCount;
154
    }
155
156
    /**
157
     * @param int $testCount
158
     */
159
    public function setTestCount($testCount)
160
    {
161
        $this->testCount = $testCount;
162
    }
163
164
    /**
165
     * @return int
166
     */
167
    public function addTestCount()
168
    {
169
        return $this->testCount++;
170
    }
171
172
    /**
173
     * @return int
174
     */
175
    public function getFileCount()
176
    {
177
        return $this->fileCount;
178
    }
179
180
    /**
181
     * @param int $fileCount
182
     */
183
    public function setFileCount($fileCount)
184
    {
185
        $this->fileCount = $fileCount;
186
    }
187
188
    /**
189
     * @return int
190
     */
191
    public function addFileCount()
192
    {
193
        return $this->fileCount++;
194
    }
195
196
    /**
197
     * @return \DateTime
198
     */
199
    public function getTaskStartAt()
200
    {
201
        return $this->taskStartAt;
202
    }
203
204
    /**
205
     * @param \DateTime $taskStartAt
206
     */
207
    public function setTaskStartAt($taskStartAt)
208
    {
209
        $this->taskStartAt = $taskStartAt;
210
    }
211
212
    /**
213
     * @return \DateTime
214
     */
215
    public function getTaskFinishedAt()
216
    {
217
        return $this->taskFinishedAt;
218
    }
219
220
    /**
221
     * @param \DateTime $taskFinishedAt
222
     */
223
    public function setTaskFinishedAt($taskFinishedAt)
224
    {
225
        $this->taskFinishedAt = $taskFinishedAt;
226
    }
227
228
    /**
229
     * @return int
230
     */
231
    public function getTaskTime()
232
    {
233
        if ($this->taskFinishedAt !== null) {
234
            return $this->taskFinishedAt - $this->taskStartAt;
235
        }
236
237
        return -1;
238
    }
239
240
    /**
241
     * class constructor
242
     */
243
    public function __construct()
244
    {
245
        $this->taskStartAt = new \DateTime();
246
    }
247
}