Completed
Push — master ( ee875b...07ff5e )
by Colin
01:17
created

Response   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

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

4 Methods

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