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::json()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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