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

RequestException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 4
dl 0
loc 5
ccs 4
cts 4
cp 1
crap 1
rs 9.4285
c 0
b 0
f 0
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