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   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 60
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A getStatusCode() 0 4 1
A getHeaders() 0 4 1
A getErrors() 0 4 1
A setStatusCode() 0 5 1
A setHeaders() 0 5 1
A setErrors() 0 5 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