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::__construct()   A

Complexity

Conditions 3
Paths 4

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 3

Importance

Changes 0
Metric Value
cc 3
eloc 3
nc 4
nop 1
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 3
rs 9.4285
c 0
b 0
f 0
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