CurlResponse::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 3
c 1
b 0
f 0
dl 0
loc 5
rs 10
cc 1
nc 1
nop 3
1
<?php
2
3
4
namespace talismanfr\psbbank\shared;
5
6
7
class CurlResponse
8
{
9
    private $code;
10
11
    private $headers;
12
13
    private $body;
14
15
    /**
16
     * CurlResponse constructor.
17
     * @param $code
18
     * @param $headers
19
     * @param $body
20
     */
21
    public function __construct(int $code, $headers, ?string $body)
22
    {
23
        $this->code = $code;
24
        $this->headers = $headers;
25
        $this->body = $body;
26
    }
27
28
    /**
29
     * @return int
30
     */
31
    public function getCode(): int
32
    {
33
        return $this->code;
34
    }
35
36
    /**
37
     * @return mixed
38
     */
39
    public function getHeaders()
40
    {
41
        return $this->headers;
42
    }
43
44
    /**
45
     * @return string
46
     */
47
    public function getBody(): ?string
48
    {
49
        return $this->body;
50
    }
51
}