Passed
Pull Request — master (#56)
by
unknown
02:23
created

PsrResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A getHeaders() 0 4 1
A getStatusCode() 0 4 1
A getBody() 0 4 1
1
<?php
2
namespace ByJG\ApiTools\Response;
3
4
use Psr\Http\Message\ResponseInterface as PsrResponseInterface;
5
6
class PsrResponse implements ResponseInterface
7
{
8
    protected $interface;
9
10
    public function __construct(PsrResponseInterface $interface)
11
    {
12
        $this->interface = $interface;
13
    }
14
15
    public function getHeaders()
16
    {
17
        return $this->interface->getHeaders();
18
    }
19
20
    public function getStatusCode()
21
    {
22
        return $this->interface->getStatusCode();
23
    }
24
25
    public function getBody()
26
    {
27
        return $this->interface->getBody();
28
    }
29
30
}
31