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.
Passed
Push — master ( 6f49e2...e22812 )
by Dominik
02:36
created

JobStatus   A

Complexity

Total Complexity 7

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 41
c 0
b 0
f 0
wmc 7
lcom 1
cbo 0
ccs 10
cts 10
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 3
A isKnown() 0 4 1
A isRunning() 0 4 1
A isCompleted() 0 4 2
1
<?php
2
namespace dmank\gearman;
3
4
class JobStatus
5
{
6
    /**
7
     * @var bool
8
     */
9
    private $isKnown;
10
    /**
11
     * @var bool
12
     */
13
    private $isRunning;
14
15 4
    public function __construct(array $status = array())
16
    {
17 4
        $this->isKnown = array_key_exists(0, $status) ? $status[0] : false;
18 4
        $this->isRunning = array_key_exists(1, $status) ? $status[1] : false;
19 4
    }
20
21
    /**
22
     * @return bool
23
     */
24 2
    public function isKnown()
25
    {
26 2
        return (bool)$this->isKnown;
27
    }
28
29
    /**
30
     * @return bool
31
     */
32 2
    public function isRunning()
33
    {
34 2
        return (bool)$this->isRunning;
35
    }
36
37
    /**
38
     * @return bool
39
     */
40 1
    public function isCompleted()
41
    {
42 1
        return (!$this->isKnown() && !$this->isRunning());
43
    }
44
}
45