Completed
Push — master ( 287f22...5329e5 )
by Tobias
11s
created

RequestException   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 37
ccs 9
cts 9
cp 1
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getType() 0 3 1
A getResponseCode() 0 3 1
1
<?php
2
3
namespace SolutionDrive\HipchatAPIv2Client\Exception;
4
5
use Throwable;
6
7
class RequestException extends \Exception implements RequestExceptionInterface
8
{
9
    protected $responseCode;
10
11
    protected $message;
12
13
    protected $type;
14
15
    /**
16
     * Request exception constructor
17
     *
18
     * @param string $message
19
     * @param int $code
20
     * @param string $type
21
     * @param Throwable|null $previous
22
     */
23 4
    public function __construct($message = "", $code = 0, $type = '', Throwable $previous = null)
24
    {
25 4
        $this->responseCode = $code;
26 4
        $this->type = $type;
27 4
        parent::__construct($message, $code, $previous);
28 4
    }
29
30
    /**
31
     * @inheritdoc
32
     */
33 1
    public function getResponseCode()
34
    {
35 1
        return $this->responseCode;
36
    }
37
38
    /**
39
     * @inheritdoc
40
     */
41 1
    public function getType()
42
    {
43 1
        return $this->type;
44
    }
45
}
46