Completed
Push — master ( 2d6ec7...4d1653 )
by Jared
03:06
created

JCResponse::body()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: jaredchu
5
 * Date: 31/05/2017
6
 * Time: 09:50
7
 */
8
9
namespace JC;
10
11
12
use Psr\Http\Message\ResponseInterface;
13
14
class JCResponse implements iJCResponse
15
{
16
17
    /**
18
     * @var ResponseInterface
19
     */
20
    public $response;
21
22
    /**
23
     * JCResponse constructor.
24
     * @param $response
25
     */
26
    public function __construct($response)
27
    {
28
        $this->response = $response;
29
    }
30
31
32
    public function status()
33
    {
34
        return $this->response->getStatusCode();
35
    }
36
37
    public function body()
38
    {
39
        return $this->response->getBody();
40
    }
41
}