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.

ApiResponseException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 4
cts 4
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 4
crap 1
1
<?php
2
3
namespace Speicher210\Monsum\Api\Exception;
4
5
/**
6
 * Exception thrown when the API returns an error in the response.
7
 */
8
class ApiResponseException extends \RuntimeException
9
{
10
    /**
11
     * Errors in the API response.
12
     *
13
     * @var array
14
     */
15
    protected $errors = [];
16
17
    /**
18
     * Constructor.
19
     *
20
     * @param string $message The error message.
21
     * @param array $errors The errors in the API response.
22
     * @param \Exception $previous Previous exception.
23
     * @param integer $code The error code.
24
     */
25 18
    public function __construct($message, array $errors = [], \Exception $previous = null, $code = 0)
26
    {
27 18
        parent::__construct($message, $code, $previous);
28
29 18
        $this->errors = $errors;
30 18
    }
31
32
    /**
33
     * Get the errors in the API response.
34
     *
35
     * @return array
36
     */
37
    public function getErrors()
38
    {
39
        return $this->errors;
40
    }
41
}
42