Response   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 3
eloc 7
c 1
b 0
f 0
dl 0
loc 19
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getStatusCode() 0 3 1
A getBody() 0 3 1
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