Completed
Push — master ( 08bb42...22e813 )
by
unknown
23:44
created

ApiResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 32
rs 10
c 0
b 0
f 0
ccs 7
cts 7
cp 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A getHeaders() 0 3 1
A getData() 0 4 1
A getStatusCode() 0 4 1
A __construct() 0 4 1
1
<?php
2
3
/*
4
 * To change this license header, choose License Headers in Project Properties.
5
 * To change this template file, choose Tools | Templates
6
 * and open the template in the editor.
7
 */
8
9
/**
10
 * Response Wrapper for requests made by ApiService
11
 *
12
 * @author matias
13
 */
14
namespace Columnis\Model;
15
16
use GuzzleHttp\Message\Response as GuzzleResponse;
17
18
class ApiResponse
19
{
20
    
21
    /**
22
     * The response from Guzzle
23
     *
24
     * @var GuzzleResponse
25
     */
26
    private $response;
27
    public function getHeaders() {
28 4
	return $this->response->getHeaders();
29
    }
30 4
    
31
    public function getData()
32 1
    {
33
        return $this->response->json();
34 1
    }
35
    public function getStatusCode()
36
    {
37
        return $this->response->getStatusCode();
38
    }
39
    
40
    /**
41
     * Construct ApiResponse with GuzzleResponse
42 4
     *
43
     * @param GuzzleResponse $response
44 4
     */
45 4
    public function __construct(GuzzleResponse $response)
46
    {
47
        $this->response = $response;
48
    }
49
}
50