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   A

Complexity

Total Complexity 8

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 78.95%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 8
c 2
b 0
f 0
lcom 2
cbo 0
dl 0
loc 49
ccs 15
cts 19
cp 0.7895
rs 10

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A addHeader() 0 4 1
A setData() 0 4 1
A setStatusCode() 0 4 1
A getStatusCode() 0 4 1
A getJsonData() 0 6 2
A getData() 0 4 1
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