Completed
Push — master ( cbc64b...6891c3 )
by Colin
01:07
created

Response::getBody()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace MacsiDigital\Xero\Support;
4
5
use GuzzleHttp\Psr7\Response as GuzzleResponse;
6
7
class Response
8
{
9
    protected $response;
10
11
    public function __construct(GuzzleResponse $response)
12
    {
13
        $this->response = $response;
14
    }
15
16
    public function getResponse()
17
    {
18
        return $this->response;
19
    }
20
21
    public function getBody()
22
    {
23
        return json_decode($this->response->getBody(), true);
24
    }
25
26
    public function getStatusCode()
27
    {
28
        return $this->response->getStatusCode();
29
    }
30
31
    public function getReason()
32
    {
33
        return $this->response->getReasonPhrase();
34
    }
35
}
36