Test Failed
Push — master ( 466d37...8e9c57 )
by Maximo
06:16
created

HttpException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 34
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 34
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getHttpCode() 0 3 1
A getHttpMessage() 0 3 1
A getData() 0 3 1
1
<?php
0 ignored issues
show
Coding Style introduced by
End of line character is invalid; expected "\n" but found "\r\n"
Loading history...
2
3
declare(strict_types=1);
4
5
namespace Gewaer\Exception;
6
7
class HttpException extends Exception
8
{
9
    protected $httpCode;
10
    protected $httpMessage = 'FAILED';
11
    protected $data;
12
13
    /**
14
     * Returns the httpcode attached to the exception
15
     *
16
     * @return string
17
     */
18
    public function getHttpCode(): int
19
    {
20
        return $this->httpCode;
21
    }
22
23
    /**
24
     *  Returns the http message attached to the exception
25
     *
26
     * @return string
27
     */
28
    public function getHttpMessage(): string
29
    {
30
        return $this->httpMessage;
31
    }
32
33
    /**
34
    * Returns the data attached to the exception
35
    *
36
    * @return string
37
    */
38
    public function getData()
39
    {
40
        return $this->data;
41
    }
42
}
43