CurlResponse   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
eloc 10
c 1
b 0
f 0
dl 0
loc 43
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A getBody() 0 3 1
A getCode() 0 3 1
A __construct() 0 5 1
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
}