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

Complexity

Total Complexity 5

Size/Duplication

Total Lines 79
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 1
dl 0
loc 79
rs 10
c 0
b 0
f 0

5 Methods

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