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.

APIException::getStatusCode()   A
last analyzed

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
namespace Solvire\API\Exceptions;
3
4
/**
5
 * APIException
6
 * Base class for the API exceptions
7
 *
8
 * TODO need to combined this with the API excpeption - duplicate
9
 *
10
 *
11
 * @author solvire <[email protected]>
12
 * @package API
13
 * @namespace Solvire\API\Exceptions
14
 */
15
abstract class APIException extends \RuntimeException
16
{
17
18
    private $statusCode;
19
20
    private $headers;
21
22
    private $errors;
23
24
25
    /**
26
     *
27
     * @param string $message
28
     * @param integer $statusCode
29
     * @param \Exception $previous
30
     * @param array $errors
31
     * @param array $headers
32
     */
33 6
    public function __construct($message, $statusCode = 0, \Exception $previous = null, array $errors = [], array $headers = [])
34
    {
35 6
        $this->statusCode = $statusCode;
36 6
        $this->headers = $headers;
37 6
        $this->errors = $errors;
38
39 6
        parent::__construct($message, $statusCode, $previous);
40 6
    }
41
42 5
    public function getStatusCode()
43
    {
44 5
        return $this->statusCode;
45
    }
46
47 2
    public function getHeaders()
48
    {
49 2
        return $this->headers;
50
    }
51
52 2
    public function getErrors()
53
    {
54 2
        return $this->errors;
55
    }
56
57 1
    public function setStatusCode($val)
58
    {
59 1
        $this->statusCode = $val;
60 1
        return $this;
61
    }
62
63 1
    public function setHeaders($val)
64
    {
65 1
        $this->headers = $val;
66 1
        return $this;
67
    }
68
69 1
    public function setErrors($val)
70
    {
71 1
        $this->errors = $val;
72 1
        return $this;
73
    }
74
}
75