Completed
Push — master ( 73a5aa...d5d862 )
by Ryosuke
03:31
created

HttpException::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 6
ccs 6
cts 6
cp 1
rs 9.4285
cc 1
eloc 4
nc 1
nop 4
crap 1
1
<?php
2
3
namespace mpyw\Cowitter;
4
5
use mpyw\Cowitter\Response;
6
7
class HttpException extends \RuntimeException implements HttpExceptionInterface
8
{
9
    protected $ch;
10
    protected $response;
11
12 10
    public function __construct($message, $code, $ch, Response $response)
13 10
    {
14 10
        parent::__construct($message, $code);
15 10
        $this->ch = $ch;
16 10
        $this->response = $response;
17 10
    }
18
19 1
    public function getStatusCode()
20 1
    {
21 1
        return $this->response->getStatusCode();
22
    }
23
24 1
    public function getReasonPhrase()
25 1
    {
26 1
        return $this->response->getReasonPhrase();
27
    }
28
29 1
    public function getHandle()
30 1
    {
31 1
        return $this->ch;
32
    }
33
34 1
    public function getResponse()
35 1
    {
36 1
        return $this->response;
37
    }
38
}
39