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.

Response   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 51
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
eloc 10
dl 0
loc 51
ccs 12
cts 12
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getStatus() 0 3 1
A getData() 0 3 1
A toHttpResponse() 0 5 1
1
<?php
2
3
4
namespace Kami\Component\RequestProcessor;
5
6
use Symfony\Component\HttpFoundation\Response as HttpResponse;
7
8
final class Response
9
{
10
    /**
11
     * @var mixed
12
     */
13
    protected $data;
14
15
    /**
16
     * @var int
17
     */
18
    protected $status;
19
20
    /**
21
     * Response constructor.
22
     *
23
     * @param $data
24
     * @param int $status
25
     */
26 5
    public function __construct($data, int $status)
27
    {
28 5
        $this->data = $data;
29 5
        $this->status = $status;
30 5
    }
31
32
    /**
33
     * @param iterable $headers
34
     *
35
     * @return HttpResponse
36
     */
37 1
    public function toHttpResponse() : HttpResponse
38
    {
39 1
        return new HttpResponse(
40 1
            $this->data,
41 1
            $this->status
42
        );
43
    }
44
45
    /**
46
     * @return mixed
47
     */
48 2
    public function getData()
49
    {
50 2
        return $this->data;
51
    }
52
53
    /**
54
     * @return int
55
     */
56 2
    public function getStatus(): int
57
    {
58 2
        return $this->status;
59
    }
60
61
}