Response::getStatusCode()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Kosv\RandomUser\Transport;
6
7
use Kosv\RandomUser\Interfaces\TransportResponseInterface;
8
9
final class Response implements TransportResponseInterface
10
{
11
    private string $response;
12
    private int $statusCode;
13
14
    public function __construct(int $statusCode, string $response)
15
    {
16
        $this->statusCode = $statusCode;
17
        $this->response = $response;
18
    }
19
20
    public function getBody(): string
21
    {
22
        return $this->response;
23
    }
24
25
    public function getStatusCode(): int
26
    {
27
        return $this->statusCode;
28
    }
29
}
30