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.

HttpException::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 10
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 8
nc 1
nop 4
1
<?php
2
3
namespace M6Web\Bundle\ApiExceptionBundle\Exception;
4
5
use M6Web\Bundle\ApiExceptionBundle\Exception\Interfaces\HttpExceptionInterface;
6
7
/**
8
 * class HttpException
9
 */
10
class HttpException extends Exception implements HttpExceptionInterface
11
{
12
    /**
13
     * @var integer
14
     */
15
    protected $statusCode;
16
17
    /**
18
     * @var array
19
     */
20
    protected $headers;
21
22
    /**
23
     * Constructor
24
     *
25
     * @param integer $statusCode
26
     * @param integer $code
27
     * @param string  $message
28
     * @param array   $headers
29
     */
30
    public function __construct(
31
        $statusCode = 500,
32
        $code = 0,
33
        $message = '',
34
        array $headers = []
35
    ) {
36
        $this->statusCode = $statusCode;
37
        $this->headers    = $headers;
38
        parent::__construct($code, $message);
39
    }
40
41
    /**
42
     * Set status code
43
     *
44
     * @param integer $statusCode
45
     *
46
     * @return self
47
     */
48
    public function setStatusCode($statusCode)
49
    {
50
        $this->statusCode = $statusCode;
51
52
        return $this;
53
    }
54
55
    /**
56
     * Get status code
57
     *
58
     * @return string
59
     */
60
    public function getStatusCode()
61
    {
62
        return $this->statusCode;
63
    }
64
65
    /**
66
     * Set headers
67
     *
68
     * @param array $headers
69
     *
70
     * @return self
71
     */
72
    public function setHeaders(array $headers)
73
    {
74
        $this->headers = $headers;
75
76
        return $this;
77
    }
78
79
    /**
80
     * Get headers
81
     *
82
     * @return array
83
     */
84
    public function getHeaders()
85
    {
86
        return $this->headers;
87
    }
88
}
89