GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Completed
Push — master ( 42287f...fba610 )
by Andy
03:33
created

HttpGuzzleResponse   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 41
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 41
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getStatusCode() 0 4 1
A getBody() 0 4 1
A json() 0 4 1
1
<?php
2
/**
3
 * @package: chapi
4
 *
5
 * @author:  msiebeneicher
6
 * @since:   2015-07-28
7
 *
8
 */
9
10
namespace Chapi\Component\Http;
11
12
use Psr\Http\Message\ResponseInterface;
13
14
class HttpGuzzleResponse implements HttpClientResponseInterface
15
{
16
17
    /**
18
     * @var ResponseInterface
19
     */
20
    private $guzzleResponse;
21
22
    /**
23
     * @param ResponseInterface $guzzleResponse
24
     */
25 10
    public function __construct(
26
        ResponseInterface $guzzleResponse
27
    ) {
28 10
        $this->guzzleResponse = $guzzleResponse;
29 10
    }
30
31
    /**
32
     * @return int
33
     */
34 1
    public function getStatusCode()
35
    {
36 1
        return $this->guzzleResponse->getStatusCode();
37
    }
38
39
    /**
40
     * @return string
41
     */
42 3
    public function getBody()
43
    {
44 3
        return (string) $this->guzzleResponse->getBody();
45
    }
46
47
    /**
48
     * @return array
49
     */
50 2
    public function json()
51
    {
52 2
        return json_decode($this->getBody(), true);
53
    }
54
}
55