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 ( fc97d6...1c42e5 )
by Thomas
02:30
created

B2Response::getJsonData()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 2.0625

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 3
cts 4
cp 0.75
rs 9.4285
cc 2
eloc 3
nc 2
nop 0
crap 2.0625
1
<?php
2
namespace B2;
3
4
/**
5
 * Class B2Response
6
 * @package B2
7
 */
8
class B2Response
9
{
10
11
    private $data = null;
12
13
    private $statusCode = 0;
14
15
    private $headers = [];
16
17 4
    public function __construct()
18
    {
19 4
    }
20
21
    /**
22
     * @param $header
23
     */
24
    public function addHeader($header)
25
    {
26
        $this->headers[] = $header;
27
    }
28
29 4
    public function setData($data)
30
    {
31 4
        $this->data = $data;
32 4
    }
33
34 4
    public function setStatusCode($statusCode)
35
    {
36 4
        $this->statusCode = $statusCode;
37 4
    }
38
39 4
    public function getStatusCode()
40
    {
41 4
        return $this->statusCode;
42
    }
43
44 3
    public function getJsonData()
45
    {
46 3
        if ($this->data) {
47 3
            return json_decode($this->data, true);
48
        }
49
    }
50
51 1
    public function getData()
52
    {
53 1
        return $this->data;
54
    }
55
56
}
57
58