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

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

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