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

ApiResponse::getHeaders()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 1
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 1
cts 1
cp 1
cc 1
nc 1
nop 0
crap 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